Dumb (Linux) compile question...

General discussion about Celestia that doesn't fit into other forums.
Topic author
jproulx

Dumb (Linux) compile question...

Post #1by jproulx » 29.12.2004, 21:03

being tired of the 1.3.0 version available in Debian I attempted to build 1.3.2 but have run into an odd (to me) ./configure problem:

<bla bla bla>
checking for int... yes
checking size of int... configure: error: cannot compute sizeof (int), 77

I can't even begin to imagine what's wrong here, anyone else know, it must be somehting stupid simple.

Thanks,
-Jon

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 7 months
Location: San Sebastian (Spain)

Post #2by jamarsa » 29.12.2004, 22:33

Could you supply the relevant portion of config.log? Something like this:

Code: Select all

configure:25791: checking size of int
configure:26110: gcc -o conftest -ansi -W -Wall -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2    -I/usr/X11R6/include  -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer   conftest.c -lGLU -lGL  -lSM -lICE  -lm   -L/usr/X11R6/lib -lXmu -lXi -lXext -lX11 -lm -lz  -lGL >&5
conftest.c:71: warning: no previous prototype for 'longval'
conftest.c:72: warning: no previous prototype for 'ulongval'
configure:26113: $? = 0
configure:26115: ./conftest
configure:26118: $? = 0


Thanks in advance.

Guest

Post #3by Guest » 30.12.2004, 14:20

The first run is with "CFLAGS=-march=pentium4 -mfpmath=sse -msse2" the second is without any wacky optimization attempts on my part.

Code: Select all

configure:22151: gcc -o conftest -ansi -W -Wall -Wshadow -Wpointer-arith -Wmissi
ng-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2  -m
arch=pentium4 -mfpmath=sse -msse2  -I/usr/X11R6/include  -O2 -Wall -ffast-math -
fexpensive-optimizations -fomit-frame-pointer   conftest.c -lucb  -lGLU -lGL -lz
  -lSM -lICE  -lm   -L/usr/X11R6/lib -lXmu -lXi -lXext -lX11 -lm -lz  -lGL >&5
/usr/bin/ld: cannot find -lucb
collect2: ld returned 1 exit status
configure:22154: $? = 1
configure: failed program was:
#line 22125 "configure"
#include "confdefs.h"

Without the wacky pentium4 sse2 optimization attempt it still fails:

Code: Select all

configure:22294: checking size of int
configure:22572: gcc -o conftest -ansi -W -Wall -Wshadow -Wpointer-arith -Wmissi
ng-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2
-I/usr/X11R6/include  -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-fra
me-pointer   conftest.c -lGLU -lGL -lz  -lSM -lICE  -lm   -L/usr/X11R6/lib -lXmu
 -lXi -lXext -lX11 -lm -lz  -lGL >&5
configure:22565: warning: no previous prototype for `longval'
configure:22566: warning: no previous prototype for `ulongval'
configure:22575: $? = 0
configure:22577: ./conftest
./configure: line 22578: 28214 Segmentation fault      ./conftest$ac_exeext
configure:22580: $? = 139
configure: program exited with status 139


I'm using gcc (GCC) 3.3.5 (Debian 1:3.3.5-5), which does compile other things, I swear

Thanks
-Jon

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 7 months
Location: San Sebastian (Spain)

Post #4by jamarsa » 30.12.2004, 22:03

I have reviewed the source of the conftest used for that test, and can't think of anything that can go wrong enough to give you a segfault.
I suggest you to capture the source by inserting a copy command before the 22577 line, in the configure script:

cp conftest.c /tmp/conftest_int.c

and try to debug it.


Added later: The only thing I can think faulty enough is the ferror() routine (perhaps wrong language settings?)

jproulx
Posts: 1
Joined: 30.12.2004
With us: 19 years 10 months

Post #5by jproulx » 04.01.2005, 17:23

I don't know what I did, but when I assed the "cp" line to capture the test code that was failing, it didn't fail anymore. Heisenbugs yum...

Running Debian sarge I did need to add --with-qt-includes=/usr/include/qt3 to configure --with-kde to get it to find the kde headers, which is inconvinient, but completely survivable

Builds like a charm <shrug>

Thanks,
-Jon
-Jon


Return to “Celestia Users”