Compile Celestia in Ubuntu.

General discussion about Celestia that doesn't fit into other forums.
Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Compile Celestia in Ubuntu.

Post #1by tech2000 » 22.05.2007, 23:55

My Vista installation went down the drain. Windows Vista really sucks. :evil: :evil: :evil:

I thought that it's about time to get back to Linux so I now have Ubuntu 7.04 Desktop and Windows XP SP2 Professional in a dualboot system, I really can't leave Windows completely for many reasons, Photoshop is a really good reason... :wink:

I was hoping I could get some help to set up an environment to compile Celestia for myself.. :wink:

What programs has to be installed?

Cheers, Anders

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #2by Christophe » 23.05.2007, 08:52

Code: Select all

apt-get dep-build celestia
is a good first step as it will install everything needed to compile celestia 1.3.2.

The latest CVS has some added requirements:

Code: Select all

aptitude install lua5.1-dev libtheora-dev libogg-dev


Plus you need to install some build tools:

Code: Select all

aptitude install autoconf automake cvs g++


That should be it.

You also need to set up your environment:

Code: Select all

echo 'export KDEDIRS=/usr/local/kde:$KDEDIRS' >> ~/.bashrc
echo 'export PATH=/usr/local/kde/bin:$PATH' >> ~/.bashrc


Then log off and back on, you're now ready to build:

Code: Select all

cvs -d:pserver:anonymous@celestia.cvs.sourceforge.net:/cvsroot/celestia login
cvs -z3 -d:pserver:anonymous@celestia.cvs.sourceforge.net:/cvsroot/celestia co -P celestia
cd celestia
make -f Makefile.cvs
./configure --prefix=/usr/local/kde --with-kde --with-lua --enable-theora
make
sudo make install
celestia
Christophe

julesstoop
Posts: 408
Joined: 27.03.2002
With us: 22 years 7 months
Location: Leiden, The Netherlands

Re: Compile Celestia in Ubuntu.

Post #3by julesstoop » 23.05.2007, 18:18

tech2000 wrote:
I thought that it's about time to get back to Linux so I now have Ubuntu 7.04 Desktop and Windows XP SP2 Professional in a dualboot system, I really can't leave Windows completely for many reasons, Photoshop is a really good reason... :wink:

Cheers, Anders


As an off topic remark I'd like to say that you should be craving for a Mac by now :)
Lapinism matters!
http://settuno.com/

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #4by t00fri » 23.05.2007, 20:33

Christophe wrote:...
You also need to set up your environment:

Code: Select all

echo 'export KDEDIRS=/usr/local/kde:$KDEDIRS' >> ~/.bashrc
echo 'export PATH=/usr/local/kde/bin:$PATH' >> ~/.bashrc


I WANT ZSH ;-)

Image

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #5by tech2000 » 23.05.2007, 22:33

Thank you for your answer Christophe, it does seems that I have to do something before I enter this into the terminal.
Christophe wrote:

Code: Select all

apt-get dep-build celestia
.


That gives me this output:
"E: Felaktig operation dep-build" meaning something like:
"E: Bad operation dep-build"

It's been a bit over 10 years a last had a look at Linux, so I must say I'm a n00b on that platform. My Ubuntu installation is based on the x64 bit version if that makes a difference.

Any suggestions about what went wrong? - Do I need any preinstalled programs before I can enter this into the terminal?

Bye, Anders

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #6by steffens » 24.05.2007, 07:04

tech2000 wrote:Thank you for your answer Christophe, it does seems that I have to do something before I enter this into the terminal.
Christophe wrote:

Code: Select all

apt-get dep-build celestia
.

That gives me this output:
"E: Felaktig operation dep-build" meaning something like:
"E: Bad operation dep-build"

I think it should be

Code: Select all

apt-get build-dep celestia


steffens

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #7by tech2000 » 24.05.2007, 12:45

steffens wrote:
tech2000 wrote:Thank you for your answer Christophe, it does seems that I have to do something before I enter this into the terminal.
Christophe wrote:

Code: Select all

apt-get dep-build celestia
.

That gives me this output:
"E: Felaktig operation dep-build" meaning something like:
"E: Bad operation dep-build"

I think it should be

Code: Select all

apt-get build-dep celestia


steffens


That did the trick, thx Steffens.

Bye, Anders

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #8by tech2000 » 24.05.2007, 13:32

tech2000@cyberdyne-systems:~/celestia$ ./configure --prefix=/usr/local/gnome --with-gnome --with-lua --enable-theora
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking how to run the C++ preprocessor... g++ -E
checking for a BSD-compatible install... /usr/bin/install -c -p
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking whether a program can dlopen itself... (cached) yes
checking whether a statically linked program can dlopen itself... (cached) yes
appending configuration tag "F77" to libtool
checking whether to include debugging code... no
checking whether to be pedantic... no
checking whether to do profiling... no
checking whether to enable GLUT... no
checking whether to enable GTK... yes
checking whether to enable Gnome... yes
checking whether to enable KDE... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking whether g++ supports -Wmissing-format-attribute... yes
checking whether gcc supports -Wmissing-format-attribute... yes
checking whether g++ supports -Wundef... yes
checking whether g++ supports -Wno-long-long... yes
checking whether g++ supports -Wnon-virtual-dtor... yes
checking whether g++ supports -fno-exceptions... yes
checking whether g++ supports -fno-check-new... yes
checking whether g++ supports -fno-common... yes
checking whether g++ supports -fexceptions... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ supports -O0... yes
checking whether g++ supports -Wl,--no-undefined... yes
checking whether g++ supports -Wl,--allow-shlib-undefined... yes
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for deflate in -lz... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for glNewList in -lGL... no
checking for glNewList in -lMesaGL... no
configure: error: GL library was not found

I get this error from the last line. I have changed from './configure --prefix=/usr/local/kde --with-kde --with-lua --enable-theora' to './configure --prefix=/usr/local/gnome --with-gnome --with-lua --enable-theora' since I'm using Ubuntu with Gnome and not Kubuntu which uses KDE, that is correct right?

Thanks for your help.

Cheers, Anders

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #9by Christophe » 24.05.2007, 14:17

Check your config.log, I suppose it is the compilation of the test OpenGL program that fails, probably due to a missing library. The error message in config.log should be clear enough, finding it in the mess that this files usually ends up being might be a bit difficult though.
Christophe

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #10by tech2000 » 24.05.2007, 15:13

Christophe wrote:Check your config.log, I suppose it is the compilation of the test OpenGL program that fails, probably due to a missing library. The error message in config.log should be clear enough, finding it in the mess that this files usually ends up being might be a bit difficult though.


I'm sorry, but it isn't that clear to me.

Can anyone help me find the failure in the config.log

Bye, Anders

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #11by Christophe » 24.05.2007, 15:56

Yep, I told you, not that easy to find.

Line 1009:
configure:28187: checking for glNewList in -lGL
configure:28222: gcc -o conftest -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2 -g -O2 -Wformat-security -Wmissing-format-attribute -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer conftest.c -lGL -lz -lSM -lICE -lm -lXmu -lXi -lXext -lX11 -lm -lz -lGL >&5
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status

and line 1056:
configure:28260: checking for glNewList in -lMesaGL
configure:28295: gcc -o conftest -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2 -g -O2 -Wformat-security -Wmissing-format-attribute -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer conftest.c -lMesaGL -lz -lSM -lICE -lm -lXmu -lXi -lXext -lX11 -lm -lz -lGL >&5
/usr/bin/ld: cannot find -lMesaGL
collect2: ld returned 1 exit status


which confirms the configure output: the linker can't find the OpenGL lib, which is a bit strange. Do you have an ATI or NVidia? are you using the proprietary drivers or the open source ones? does 'locate libGL' return anything?
Christophe

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #12by tech2000 » 24.05.2007, 16:06

Christophe wrote:Yep, I told you, not that easy to find.

Line 1009:
configure:28187: checking for glNewList in -lGL
configure:28222: gcc -o conftest -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2 -g -O2 -Wformat-security -Wmissing-format-attribute -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer conftest.c -lGL -lz -lSM -lICE -lm -lXmu -lXi -lXext -lX11 -lm -lz -lGL >&5
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status

and line 1056:
configure:28260: checking for glNewList in -lMesaGL
configure:28295: gcc -o conftest -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2 -g -O2 -Wformat-security -Wmissing-format-attribute -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer conftest.c -lMesaGL -lz -lSM -lICE -lm -lXmu -lXi -lXext -lX11 -lm -lz -lGL >&5
/usr/bin/ld: cannot find -lMesaGL
collect2: ld returned 1 exit status

which confirms the configure output: the linker can't find the OpenGL lib, which is a bit strange. Do you have an ATI or NVidia? are you using the proprietary drivers or the open source ones? does 'locate libGL' return anything?


I'm using nVidia's proprietary drivers to a GeForce 7600GS 512 mb DDR2 card.

This is returned from 'locate libGL':

/usr/lib/libGLU.so.1
/usr/lib/libGL.so.1
/usr/lib/xorg/modules/extensions/libGLcore.so
/usr/lib/libGLEW.so.1.3.4
/usr/lib/libGLEW.so.1.3
/usr/lib/libGLU.so.1.3.060502
/usr/lib/libGLcore.so.1
/usr/lib/libGL.so.1.0.9755
/usr/lib/libGLcore.so.1.0.9755

Regards, Anders

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #13by Christophe » 24.05.2007, 17:05

It seems that you are missing some symbolic links in /usr/lib:

Code: Select all

cd /usr/lib
ln -s libGL.so.1 libGL.so
ln -s libGLU.so.1 libGLU.so


give it a try...
Christophe

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #14by tech2000 » 24.05.2007, 18:15

Christophe wrote:It seems that you are missing some symbolic links in /usr/lib:

Code: Select all

cd /usr/lib
ln -s libGL.so.1 libGL.so
ln -s libGLU.so.1 libGLU.so


give it a try...

Unfortunately without result. This is the output:

SWE:
'ln: skapa symbolisk l?¤nk "libGLU.so" till "libGLU.so.1": Filen existerar'

ENG:
'ln: create symbolic link "libGLU.so" to "libGLU.so.1": File exist'

Other suggestions?

And thank you for your time.

Bye, Anders

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #15by selden » 24.05.2007, 18:56

The arguments to ln are reversed.

They should be
ln -s new-entry-name old-entry-name
Selden

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #16by Christophe » 25.05.2007, 06:51

selden wrote:The arguments to ln are reversed.

They should be
ln -s new-entry-name old-entry-name


Yes Selden, you're right. I always tend to reverse ln arguments, I should have been more careful. Thanks for the correction.
Christophe

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #17by tech2000 » 20.06.2007, 03:26

So, I have finally taken the time to compile celestia in ubuntu 64 bit... I will never boot Celestia in windows again... The Linux version is actually way neater..

I have a question though.. the files I got from the cvs by following the guide in this thread said v1.4.1... How do I get the latest files?

And a big thanks to all who have helped out here..

Bye, Anders Pamdal

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #18by Christophe » 20.06.2007, 08:56

I'm glad you got it going Anders.

The version string is changed only at release time in CVS, so although it says 1.4.1 in the splash screen and about box, it is HEAD that you're running.
Christophe

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #19by tech2000 » 20.06.2007, 12:21

Christophe wrote:I'm glad you got it going Anders.

The version string is changed only at release time in CVS, so although it says 1.4.1 in the splash screen and about box, it is HEAD that you're running.


Thanks for the info..

Bye, Anders

Topic author
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #20by tech2000 » 20.06.2007, 18:05

I have another question though...

How do I create a *.deb file for distribution?

Bye, Anders


Return to “Celestia Users”