Thread: [TuxKart-users] I have a compilation problem(corection)
Status: Alpha
Brought to you by:
sjbaker
From: al <al...@te...> - 2000-07-05 17:21:51
|
Mandrake 7.1 Glide_V3-2.60.15-3mdk.rpm & devel rpm Mesa3.2(compiled from source) plib-1.2.0-i586.rpm (NOT source) freeglut-alpha-1.3(source) VooDoo3 1000 AGP Q3Ademo, UTdemo, TerminusDemo, several other 3d apps run fine but...... when I tried to compile tuxkart... ./configure runs without a hitch make gives this: Making all in src make[1]: Entering directory `/opt/src/tuxkart-0.0.3/src' c++ -DPACKAGE=\"tuxkart\" -DVERSION=\"0.0.3\" -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBGLUT=1 -DSTDC_HEADERS=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLUT_H=1 -DLINUX_JOYSTICK_IS_PRESENT=1 -DTUXKART_DATADIR=\"/usr/local/share/games/tuxkart\" -I. -I. -g -O2 -O6 -Wall -c start_tuxkart.cxx In file included from /usr/include/plib/ssg.h:15, from start_tuxkart.h:18, from start_tuxkart.cxx:2: /usr/include/plib/sg.h: In method `void sgBox::empty()': /usr/include/plib/sg.h:842: `FLT_MAX' undeclared (first use this function) /usr/include/plib/sg.h:842: (Each undeclared identifier is reported only once /usr/include/plib/sg.h:842: for each function it appears in.) /usr/include/plib/sg.h: In method `void sgdBox::empty()': /usr/include/plib/sg.h:1961: `DBL_MAX' undeclared (first use this function) In file included from start_tuxkart.h:18, from start_tuxkart.cxx:2: /usr/include/plib/ssg.h: In method `float ssgRangeSelector::getRange(unsigned int)': /usr/include/plib/ssg.h:1276: warning: control reaches end of non-void function `ssgRangeSelector::getRange(unsigned int)' make[1]: *** [start_tuxkart.o] Error 1 make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' make: *** [all-recursive] Error 1 I am at a loss to decypher what is wrong.. if this is in a faq please send me a link thank you aal |
From: Steve B. <sjb...@ai...> - 2000-07-05 22:16:41
|
al wrote: > > Mandrake 7.1 > Glide_V3-2.60.15-3mdk.rpm & devel rpm > Mesa3.2(compiled from source) > plib-1.2.0-i586.rpm (NOT source) > freeglut-alpha-1.3(source) > VooDoo3 1000 AGP ... > /usr/include/plib/sg.h:842: `FLT_MAX' undeclared (first use this > function) SHORT ANSWER: Well, I'm guessing that the short answer is to hack in: #include <float.h> ...into PLIB's src/sg.h, to re-build and re-install PLIB, and then to try again...but that doesn't compile on my Linux box. LONG ANSWER: OK - I'm officially confused. 1) I always used to use 'math.h' which defined FLT_MAX. /usr/include/math.h *uses* FLT_MAX - so that ought to be OK. 2) That stopped working in a recent release - because it's actually defined in 'float.h' which has ceased to exist (at least under SuSE Linux 6.4). 3) At the top of 'values.h' it says: /* This interface is obsolete. New programs should use <limits.h> and/or <float.h> instead of <values.h>. */ ...but float.h has 'gone away' and 'limits.h' doesn't define it either. 4) At the end of 'limits.h', it says this: #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ # include_next <limits.h> #endif What the heck is '#include_next' ??!? Aaaarrrggghhhhh!!!! Anyway, somehow (despite FLT_MAX not being defined in ANY header file I can find), my code compiles without <float.h> ... I suspect that these tokens are perhaps hard-coded into the C/C++ compiler so that cross-compilation can work or something like that. Does *anyone* have a clue? -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |
From: al <al...@te...> - 2000-07-05 23:27:17
|
Steve Baker wrote: > > al wrote: > > > > Mandrake 7.1 > > Glide_V3-2.60.15-3mdk.rpm & devel rpm > > Mesa3.2(compiled from source) > > plib-1.2.0-i586.rpm (NOT source) > > freeglut-alpha-1.3(source) > > VooDoo3 1000 AGP > > ... > > > /usr/include/plib/sg.h:842: `FLT_MAX' undeclared (first use this > > function) > > SHORT ANSWER: > > Well, I'm guessing that the short answer is to hack in: > > #include <float.h> > > ...into PLIB's src/sg.h, to re-build and re-install PLIB, and then > to try again...but that doesn't compile on my Linux box. > this doesn't work for me either plib doesn't compile with or without the sg.h edit, I installed a bin rpm > LONG ANSWER: > > OK - I'm officially confused. > > 1) I always used to use 'math.h' which defined FLT_MAX. > /usr/include/math.h *uses* FLT_MAX - so that ought to be OK. > > 2) That stopped working in a recent release - because it's > actually defined in 'float.h' which has ceased to exist > (at least under SuSE Linux 6.4). > > 3) At the top of 'values.h' it says: > > /* > This interface is obsolete. New programs should use > <limits.h> and/or <float.h> instead of <values.h>. */ > > ...but float.h has 'gone away' and 'limits.h' doesn't > define it either. > > 4) At the end of 'limits.h', it says this: > > #if defined __GNUC__ && !defined _GCC_LIMITS_H_ > /* `_GCC_LIMITS_H_' is what GCC's file defines. */ > # include_next <limits.h> > #endif > > What the heck is '#include_next' ??!? > > Aaaarrrggghhhhh!!!! > > Anyway, somehow (despite FLT_MAX not being defined in ANY header file > I can find), my code compiles without <float.h> ... I suspect that > these tokens are perhaps hard-coded into the C/C++ compiler so that > cross-compilation can work or something like that. > this sounds like it makes sense but since I am not a programmer that dont mean much :) thanks aal |
From: Steve B. <sjb...@ai...> - 2000-07-06 04:37:00
|
al wrote: > > Steve Baker wrote: > > > > al wrote: > > > > > > Mandrake 7.1 > > > Glide_V3-2.60.15-3mdk.rpm & devel rpm > > > Mesa3.2(compiled from source) > > > plib-1.2.0-i586.rpm (NOT source) > > > freeglut-alpha-1.3(source) > > > VooDoo3 1000 AGP > > > > ... > > > > > /usr/include/plib/sg.h:842: `FLT_MAX' undeclared (first use this > > > function) > > > > SHORT ANSWER: > > > > Well, I'm guessing that the short answer is to hack in: > > > > #include <float.h> > > > > ...into PLIB's src/sg.h, to re-build and re-install PLIB, and then > > to try again...but that doesn't compile on my Linux box. > > > > this doesn't work for me either > plib doesn't compile with or without the sg.h edit, I installed a > bin rpm OK - since you are a non-programmer, let's try to do a kludge to get you up and running while we all go off and try to figure out WTF is going on here. To get you up and running, (and assuming you can install PLIB from the RPM) edit /usr/include/plib/sg.h and add this just before it says '#define sgFloat float' : #ifndef FLT_MAX # define FLT_MAX (3.40282e+38) #endif #ifndef DBL_MAX # define DBL_MAX (1.79769e+308) #endif Boy - those are *BIG* numbers! ...anyway, that should allow you to compile and run TuxKart OK. Sorry for the hassle - I have no idea why this doesn't work for you. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |
From: al <al...@te...> - 2000-07-06 13:50:24
|
> To get you up and running, (and assuming you can install PLIB > from the RPM) edit /usr/include/plib/sg.h and add this just > before it says '#define sgFloat float' : > > #ifndef FLT_MAX > # define FLT_MAX (3.40282e+38) > #endif > #ifndef DBL_MAX > # define DBL_MAX (1.79769e+308) > #endif > > Boy - those are *BIG* numbers! ...anyway, that should allow you > to compile and run TuxKart OK. > > Sorry for the hassle - I have no idea why this doesn't work for you. Certainly, it is no hassel, anything worthwhile always takes some work I made that change: /usr/include/plib/sg.h -------<snip>-------- #ifdef __CYGWIN__ #include <float.h> #endif #ifndef FLT_MAX # define FLT_MAX (3.40282e+38) #endif #ifndef DBL_MAX # define DBL_MAX (1.79769e+308) #endif #define sgFloat float #define SGfloat float -------<snip>--------- after editing sg.h... cd tuxkart/ make clean rm config.cache ./configure (no errors) make which gives: Making all in src make[1]: Entering directory `/opt/src/tuxkart-0.0.3/src' c++ -DPACKAGE=\"tuxkart\" -DVERSION=\"0.0.3\" -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBGLUT=1 -DSTDC_HEADERS=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLUT_H=1 -DLINUX_JOYSTICK_IS_PRESENT=1 -DTUXKART_DATADIR=\"/usr/local/share/games/tuxkart\" -I. -I. -g -O2 -O6 -Wall -c start_tuxkart.cxx c++ -DPACKAGE=\"tuxkart\" -DVERSION=\"0.0.3\" -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBGLUT=1 -DSTDC_HEADERS=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLUT_H=1 -DLINUX_JOYSTICK_IS_PRESENT=1 -DTUXKART_DATADIR=\"/usr/local/share/games/tuxkart\" -I. -I. -g -O2 -O6 -Wall -c tuxkart.cxx tuxkart.cxx: In function `void load_track(ssgBranch *, char *)': tuxkart.cxx:312: implicit declaration of function `int atan2(...)' make[1]: *** [tuxkart.o] Error 1 make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' make: *** [all-recursive] Error 1 Let me appologize for the hassel :) aal |
From: Steve B. <sjb...@ai...> - 2000-07-11 04:16:21
|
al wrote: > tuxkart.cxx: In function `void load_track(ssgBranch *, char *)': > tuxkart.cxx:312: implicit declaration of function `int atan2(...)' > make[1]: *** [tuxkart.o] Error 1 > make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' > make: *** [all-recursive] Error 1 > > Let me appologize for the hassel :) OK - then there is *certainly* something broken about your machine setup. atan2 is defined in /usr/include/math.h which tuxkart includes unconditionally. All I can suggest is that you re-install your Mandrake C/C++ development package. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |
From: al <al...@te...> - 2000-07-11 13:14:51
|
Steve Baker wrote: > > al wrote: > > > tuxkart.cxx: In function `void load_track(ssgBranch *, char *)': > > tuxkart.cxx:312: implicit declaration of function `int atan2(...)' > > make[1]: *** [tuxkart.o] Error 1 > > make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' > > make: *** [all-recursive] Error 1 > > > > Let me appologize for the hassel :) > > OK - then there is *certainly* something broken about your machine setup. > > atan2 is defined in /usr/include/math.h which tuxkart includes unconditionally. > > All I can suggest is that you re-install your Mandrake C/C++ development > package. > good deal I will try that I think you are right bcause I cant compile some other stuff either |
From: al <al...@te...> - 2000-07-12 12:50:06
|
al wrote: > > Steve Baker wrote: > > > > al wrote: > > > > > tuxkart.cxx: In function `void load_track(ssgBranch *, char *)': > > > tuxkart.cxx:312: implicit declaration of function `int atan2(...)' > > > make[1]: *** [tuxkart.o] Error 1 > > > make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' > > > make: *** [all-recursive] Error 1 > > > > > > Let me appologize for the hassel :) > > > > OK - then there is *certainly* something broken about your machine setup. > > > > atan2 is defined in /usr/include/math.h which tuxkart includes unconditionally. > > > > All I can suggest is that you re-install your Mandrake C/C++ development > > package. a small Q are we talking about libstdc++ or libstdc++-devel or both? or somthing else |
From: Steve B. <sjb...@ai...> - 2000-07-12 12:54:54
|
al wrote: > > al wrote: > > > > Steve Baker wrote: > > > > > > al wrote: > > > > > > > tuxkart.cxx: In function `void load_track(ssgBranch *, char *)': > > > > tuxkart.cxx:312: implicit declaration of function `int atan2(...)' > > > > make[1]: *** [tuxkart.o] Error 1 > > > > make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' > > > > make: *** [all-recursive] Error 1 > > > > > > > > Let me appologize for the hassel :) > > > > > > OK - then there is *certainly* something broken about your machine setup. > > > > > > atan2 is defined in /usr/include/math.h which tuxkart includes unconditionally. > > > > > > All I can suggest is that you re-install your Mandrake C/C++ development > > > package. > > a small Q > are we talking about libstdc++ > or libstdc++-devel > or both? > > or somthing else I'm not sure how Mandrake packages things - but 'math.h' should be in the standard C compiler package - not specifically in C++. Is there a 'libstdc' and 'libstdc-devel' ? If so, I'd guess that libstdc-devel was the missing one - but like I said - I don't know the mandrake distro at all well. It certainly wouldn't hurt to re-install libstdc++-devel too. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |
From: al <al...@te...> - 2000-07-30 15:09:15
|
Steve Baker wrote: > > al wrote: > > > > al wrote: > > > > > > Steve Baker wrote: > > > > > > > > al wrote: > > > > > > > > > tuxkart.cxx: In function `void load_track(ssgBranch *, char *)': > > > > > tuxkart.cxx:312: implicit declaration of function `int atan2(...)' > > > > > make[1]: *** [tuxkart.o] Error 1 > > > > > make[1]: Leaving directory `/opt/src/tuxkart-0.0.3/src' > > > > > make: *** [all-recursive] Error 1 > > > > > > > > > > Let me appologize for the hassel :) > > > > > > > > OK - then there is *certainly* something broken about your machine setup. > > > > > > > > atan2 is defined in /usr/include/math.h which tuxkart includes unconditionally. > > > > > > > > All I can suggest is that you re-install your Mandrake C/C++ development > > > > package. > > > > a small Q > > are we talking about libstdc++ > > or libstdc++-devel > > or both? > > > > or somthing else > > I'm not sure how Mandrake packages things - but 'math.h' should be > in the standard C compiler package - not specifically in C++. > > Is there a 'libstdc' and 'libstdc-devel' ? If so, I'd guess that > libstdc-devel was the missing one - but like I said - I don't know would we be talking about glibc here? |
From: Ingo R. <gr...@gm...> - 2000-07-06 19:17:11
|
Steve Baker <sjb...@ai...> writes: > What the heck is '#include_next' ??!? Well, no idea about the FLT_MAX problem, but I can say you were for include_next are: $ info cpp index \#include_next ,----[ info cpp index \#include_next ] | [...] | `#include </usr/include/sys/signal.h>' would find the proper file, | but that is not clean, since it makes an assumption about where the | system header file is found. This is bad for maintenance, since it | means that any change in where the system's header files are kept | requires a change somewhere else. | | The clean way to solve this problem is to use `#include_next', which | means, "Include the *next* file with this name." This directive works | like `#include' except in searching for the specified file: it starts | searching the list of header file directories *after* the directory in | which the current file was found. | [...] `---- -- ICQ: 59461927 http://www.pingus.cx | Ingo Ruhnke <gr...@gm...> http://home.pages.de/~grumbel/ | ------------------------------------------------------------------------' |