Compile error

Report bugs, bug fixes and workarounds here.
Topic author
TWW

Compile error

Post #1by TWW » 14.01.2003, 10:56

1.2.4 compiled and ran fine. 1.2.5 configures and the build goes well until reaching:

make[4]: Entering directory `/usr/src/celestia-1.2.5/src/celestia'

Then I get the following line and errors
/bin/sh ../../libtool --silent --mode=link g++ -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -o celestia celestiacore.o configfile.o destination.o favorites.o imagecapture.o url.o ../celengine/libcelengine.a ../celtxf/libceltxf.a ../cel3ds/libcel3ds.a ../celmath/libcelmath.a ../celutil/libcelutil.a -lpng -ljpeg -lglut -lGLU -lGL -lSM -lICE -lm -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -lGL -L/usr/X11R6/lib -lXmu -lXi -lXext -lX11 -lm -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm

/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function `_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status


As you can see from the error I'm using gcc 2.96 on a RedHat system (7.3). Nothing else has given this error and, as I said, 1.2.4 compiled fine.

I've tried different options (and none at all) to configure and it makes no difference. Any ideas, anyone?

TWW

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

Post #2by Christophe » 14.01.2003, 12:01

gtkmain.o is missing from the command, so obviously the linker can't find main().

What configure options did you use? Did you explicitly specify --with-gtk?

Topic author
TWW

Post #3by TWW » 14.01.2003, 15:25

What configure options did you use? Did you explicitly specify --with-gtk?

When I do that I get

checking for gnome-config... no
checking for gnomeConf.sh file in /usr/local/lib... not found

Which isn't surprising since I don't have KDE/Gnome installed. Is there no way to install without one of these bloatware packages? I have QT and Gtk insalled, including the headers.
TWW

Guest

Post #4by Guest » 16.01.2003, 23:06

I'm getting a similiar, if not the same problem trying to compile on my Slackware 9 beta system:

./configure --prefix=/usr

-----clip-----
g++ -z combreloc -DHAVE_CONFIG_H -I. -I. -I../.. -I.. -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -c -o url.o `test -f 'url.cpp' || echo './'`url.cpp
/bin/sh ../../libtool --silent --mode=link g++ -z combreloc -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -z combreloc -o celestia celestiacore.o configfile.o destination.o favorites.o imagecapture.o url.o ../celengine/libcelengine.a ../celtxf/libceltxf.a ../cel3ds/libcel3ds.a ../celmath/libcelmath.a ../celutil/libcelutil.a -lpng -ljpeg -lglut -lGLU -lGL -lSM -lICE -lm -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXext -lX11 -lm -lGL -L/usr/X11R6/lib -lXmu -lXi -lXext -lX11 -lm -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXext -lX11 -lm
/usr/lib/gcc-lib/i386-slackware-linux/3.2.1/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make[4]: *** [celestia] Error 1

I'm using gcc-3.2.1, glib-1.2.10, glibc-2.3.1, and kernel 2.4.20.

Any suggestions?

Thanks -

Chuck

Bohdan

Pseudosolution

Post #5by Bohdan » 25.01.2003, 17:42

This is again problem on celestia side. Celestia has 4 frontends Windows, KDE, GTK and GLUT. GLUT is probably "menu-on-screen". Anyway if want to install with GLUT, there is a problem. When specifying
./configure --without-gtk and you have installed Qt, it will try to install KDE frontend even if youhave no KDE. Moreover
./configure --without-gtk --without-kde should lead to GLUT frontend, but it is not true. there is a file glutmain.cpp, which has its main method, but Makefile wont proccess it, thus celestia won't compile.

Another problem is with gtkglarea. I have compiled it under Gtk 2, thus it creates libgtql-2.so. Because check for -lgtkgl is hardcoded and not done interactively, celestia can't go on with gtk frontend(I need -lgtkgl-2 instead). Any solution for this?

Bohdan

Guest

Post #6by Guest » 25.01.2003, 19:30

You are right. I got a successful build by specifying --without-gtk. This built the KDE interface. It's nice to have a functioning version of it again.


Return to “Bugs”