Page 1 of 1
Compilation issue on Linux
Posted: 05.01.2018, 17:53
by pirogronian
Hi.
My attempt to compilation of GIT version of celestia broken with several errors like this:
Code: Select all
src/celephem/scriptorbit.cpp:78:32: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope
lua_gettable(luaState, LUA_GLOBALSINDEX);
I searched whole project, and found definition of macro LUA_GLOBALSINDEX in
macosx/lua.h and
windows/inc/lua/lua.h
However, there seems to be no definition for Linux. Can You fix that?
Posted: 06.01.2018, 22:42
by John Van Vliet
what github page did you use ?
i know that the qt5 version that i have on mine dose build using qmake-qt5 on my OpenSUSE 42.3 install
https://github.com/JohnVV/MyCelestiaBuildi have not yet updated it with my working copy on my home system
-- to many bugs yet
this is a NAIF spice build
"cspice" needs to be installed
( see the readme files )
Posted: 07.01.2018, 19:54
by pirogronian
I used oficial github repo:
https://github.com/CelestiaProject/CelestiaSounds interesting, however perhaps it won't replace the original one. However, I'll try to install cspice and compile Your version, then let You know.
Thanks!
Posted: 08.01.2018, 06:38
by John Van Vliet
i really do not care for he Microsoft centric
https://github.com/CelestiaProject/Celestiaqt is cross platform , but i am right now focusing on Linux only
Now i might be merging the code base with a very similar VS 2013 build
just fallow the basic build instructions and have the devel rpm's or dev deb's installed for the prerequisites
if something is missing this will tell you from the error in the output
Posted: 08.01.2018, 16:07
by pirogronian
Hi John
Is the official Celestia repo Windows-centric? I remember, that Alexel also switch to Qt only, or maybe I'm wrong...
Anyway, I got the same error, while compiling Your sources:
Code: Select all
src/celephem/scriptorbit.cpp:78:32: error: ‘LUA_GLOBALSINDEX’ was not declared in this scope
lua_gettable(luaState, LUA_GLOBALSINDEX);
^~~~~~~~~~~~~~~~
So perhaps there is something not right with my system, but what?
Edit:
A described
here, this is LUA version 5.1 -> 5.2 transition issue. Has Your system Lua 5.1?
Cannot compile Celestia 1.6.1
Posted: 28.05.2018, 23:42
by Randall
Hi all:
I spent 2.5 hours fixing problems with the source code for Celestia 1.6.1 on my up-to-date openSuse leap 42.3 linux system, only to discover that apparently Celestia 1.6.1 expects to use the lua library version 5.1, NOT the present version 5.2 which eliminated the LUA_GLOBALSINDEX global variable. The Lua website discusses this. My openSuse is stuck on lua 5.2, not 5.1
Someone with more knowledge than me of lua, is going to have to migrate the Celestia software from lua v5.1 to the newer version 5.2 to fix the compile errors.
I also had to fix lots of compiler warnings and the -Weffc++ flag really needs to be added to catch uninitialized member variables inside the class definitions. One class even had the private variables at the end of the class definition but used these variables for the member functions, it is always a good idea to put the private variables first, as the C++ compiler (in my case g++) can find the reference first, and not be stymied trying to find them as it encouters the member functions.
I also encoutered some include packages missing other mandatory include packages, one such example was the macro square() for the mathlib library.
Anyone know how to migrate from lua v5.1 to lua v5.2?
Posted: 28.05.2018, 23:48
by Alexell
Randall, hi. Please check
repository on Github. There are already fixes for compatibility with Lua 5.2 and 5.3, especially for Linux.
Posted: 29.05.2018, 02:14
by Janus
I have already updated Lua to 5.3.4 in my fork, which is so far windows only, but the fix should be multiplatform.
There is even a minor improvement in script speed that goes with it.
A warning to those trying to compile Celestia from scratch.
Have copies of or whole support libraries used specifically and only for for Celestia.
Mix and match lib files will drive you nuts tracing random stuff down.
Janus.
Posted: 29.05.2018, 20:01
by randallrathbun
Alexell:
I pulled directly from the git site live today, but when I run autoconf, the following errors occur:
configure.ac:9: error: possibly undefined macro: AC_CONFIG_MACRO_DIRS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:83: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:84: error: possibly undefined macro: AM_CONFIG_HEADER
configure.ac:86: error: possibly undefined macro: AM_PO_SUBDIRS
configure.ac:91: error: possibly undefined macro: AM_GNU_GETTEXT
configure.ac:99: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:118: error: possibly undefined macro: AC_MSG_RESULT
configure.ac:161: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:200: error: possibly undefined macro: AC_CHECK_COMPILERS
configure.ac:257: error: possibly undefined macro: AM_GCONF_SOURCE_2
configure.ac:296: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:297: error: possibly undefined macro: AC_ENABLE_STATIC
configure.ac:300: error: possibly undefined macro: AM_KDE_WITH_NLS
configure.ac:303: error: possibly undefined macro: AC_PATH_KDE
---------
What is wrong?
Posted: 30.05.2018, 20:52
by randallrathbun
Alexell:
I used the git clone command to pull the latest, but got the following errors upon running the autoconf command:
owner@linux:~/Celestia> autoconf
configure.ac:9: error: possibly undefined macro: AC_CONFIG_MACRO_DIRS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:83: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:84: error: possibly undefined macro: AM_CONFIG_HEADER
configure.ac:86: error: possibly undefined macro: AM_PO_SUBDIRS
configure.ac:91: error: possibly undefined macro: AM_GNU_GETTEXT
configure.ac:99: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:118: error: possibly undefined macro: AC_MSG_RESULT
configure.ac:161: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:200: error: possibly undefined macro: AC_CHECK_COMPILERS
configure.ac:257: error: possibly undefined macro: AM_GCONF_SOURCE_2
configure.ac:296: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:297: error: possibly undefined macro: AC_ENABLE_STATIC
configure.ac:300: error: possibly undefined macro: AM_KDE_WITH_NLS
configure.ac:303: error: possibly undefined macro: AC_PATH_KDE
Any ideas what I need to do, to fix these missing macros?
Posted: 30.05.2018, 21:20
by randallrathbun
Another update on my attempts to compile celestia from github on an openSuse Leap 42.3 linux system.
A user name emcrisostomo on the github forum writes:
That's correct, in fact. autoconf is telling you that some macros are missing, and they are missing because, as their prefix also suggests, they have not been added yet by the corresponding program (in the case of AM_* macros, automake).
It's a bad idea to run autoconf unless you know exactly which other macros are needed by the package being configured and where they are.
Instead of using autoconf, use autoreconf instead, or better yet, the included autogen.sh script.
This procedure is described in the README and a specific document also exists (README.gnu-build-system).
------
Following his advice I ran the following autoreconf command, which almost was successful, but came up with an error:
owner@linux:~/Celestia> autoreconf
autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
configure.ac:99: error: required file 'admin/ltmain.sh' not found
autoreconf: automake failed with exit status: 1
Where do I go from here?
Posted: 30.05.2018, 22:25
by randallrathbun
I finally got celestia to build on the openSuse Leap v42.3 version using the github clone pull, but I had to carefully do the following steps:
1. Make sure that the lua development and theora development files are installed by Yast.
2. Run the libtoolize command in the local build directory to fix the missing ltmain.sh error message
3. Run the autoreconf command to reconfigure and correctly create the appropriate makefiles.
4. Run the configure command with display type ( I chooose the gtk build: ./configure --with-gtk )
5. Run the make command
6. Run the "make install" command with sudoer privileges
Celestia built without error, I am happy now.
Posted: 02.06.2018, 08:26
by Alexell
randallrathbun, I'm happy for you.
Unfortunately, I could not help you, because I do not use Linux and I have no idea about Celestia compilation on Linux.
But I recommend doing a compilation with QT. Perhaps in the future, GTK and others will be deleted.
Added after 55 seconds:
As for Linux, you can always consult with pirogronian. He's a Linux expert.