Thread: [Plib-devel] SUNWspro patch, questions
Brought to you by:
sjbaker
From: Loring H. <ls...@cs...> - 2000-06-27 15:45:04
|
I sent the following to plib-users over a week ago and haven't gotten a reply, I think because it should have gone to plib-devel. Loring |
From: Loring H. <ls...@cs...> - 2000-06-16 13:27:00
|
This patch allows PLIB to be built under Solaris w/ the SUNWspro C++ compiler on a system without glut in the default place (ie, adds --with-glut and --with-glut-includes). Also - not sure if it is my version of automake or not (1.4), but automake creates PLIB Makefile's that assume you are using gcc (uses -Md to create dependencies). I didn't know of any easy way to fix this - it gives a warning message when compiling with SUNWspro 4.2, but builds fine. Other issues - the README in cvs is out of date (points to the wrong URL), and the documentation is out of date with the cvs source. Would it be possible to put the examples and docs in cvs so it would be easier to get the most recent versions (and give all the other benefits of cvs)? Thanks, Loring Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/configure.in,v retrieving revision 1.4 diff -u -r1.4 configure.in --- configure.in 2000/05/16 22:22:15 1.4 +++ configure.in 2000/06/16 13:14:12 @@ -27,6 +27,26 @@ AC_PROG_INSTALL AC_PROG_RANLIB +dnl Command line arguments +AC_ARG_WITH(glut, +[ --with-glut=DIR set the prefix directory where GLUT resides], +GLUT_PREFIX=$withval, GLUT_PREFIX=auto) + +AC_ARG_WITH(glut-includes, +[ --with-glut-includes=DIR + set the directory where GLUT include files reside], +GLUT_INCLUDES=$withval, GLUT_INCLUDES=auto) +if test "x$GLUT_INCLUDES" != "xauto"; then + CPPFLAGS="$CPPFLAGS -I$GLUT_INCLUDES" +else + if test "x$GLUT_PREFIX" != "xauto"; then + CPPFLAGS="$CPPFLAGS -I$GLUT_PREFIX/include" + fi +fi +if test "x$GLUT_PREFIX" != "xauto"; then + LIBS="$LIBS -L$GLUT_PREFIX/lib" +fi + dnl Checks for library functions. dnl check for OpenGL related libraries @@ -39,6 +59,9 @@ AC_PATH_XTRA x_suffix="$X_LIBS $X_PRE_LIBS -lX11 -lXi -lXext -lXmu $X_EXTRA_LIBS -lm" + if test "x$x_includes" != "x"; then + CPPFLAGS="$CPPFLAGS -I$x_includes" + fi dnl Reasonable stuff non-windoze variants ... :-) Index: src/sl/slPortability.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slPortability.h,v retrieving revision 1.2 diff -u -r1.2 slPortability.h --- src/sl/slPortability.h 2000/02/20 00:54:23 1.2 +++ src/sl/slPortability.h 2000/06/16 13:14:13 @@ -66,7 +66,7 @@ # include <audio.h> #endif -#if defined(__svr4__) +#if defined(__svr4__) || defined(__SVR4) # include <sys/audioio.h> # include <sys/stropts.h> # define SOLARIS Index: src/ssg/ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.20 diff -u -r1.20 ssg.h --- src/ssg/ssg.h 2000/05/16 21:58:27 1.20 +++ src/ssg/ssg.h 2000/06/16 13:14:13 @@ -21,6 +21,13 @@ #define FALSE 0 #endif +// SUNWspro 4.2 and earlier need bool to be defined +#if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x500 +typedef int bool; +const int true = 1; +const int false = 0; +#endif + #ifndef _SSG_PUBLIC #define _SSG_PUBLIC protected #endif _______________________________________________ plib-users mailing list pli...@li... http://lists.sourceforge.net/mailman/listinfo/plib-users |
From: Steve B. <sjb...@ai...> - 2000-06-28 04:00:02
|
Loring Holden wrote: > Other issues - the README in cvs is out of date (points to the wrong URL), > and the documentation is out of date with the cvs source. Done. > Would it be > possible to put the examples and docs in cvs so it would be easier to get the > most recent versions (and give all the other benefits of cvs)? That's on my 'ToDo' list. > This patch allows PLIB to be built under Solaris w/ the SUNWspro C++ compiler > on a system without glut in the default place (ie, adds --with-glut and > --with-glut-includes). Er - OK - I've merged this stuff in. Wouldn't it just be easier to put GLUT in the right place? > Also - not sure if it is my version of automake or not (1.4), but automake > creates PLIB Makefile's that assume you are using gcc (uses -Md to create > dependencies). I didn't know of any easy way to fix this - it gives a > warning message when compiling with SUNWspro 4.2, but builds fine. I have no idea - autoconf/automake is a Black Art as far as I'm concerned. Touching configure.in is *scarey*! Anyway, I've added the new stuff - with fingers crossed :-) <time passes> <*lots* of time passes> Well, waddayaknow? It screws up under Linux. It seems that with this line in configure.in: CPPFLAGS="$CPPFLAGS -I$x_includes" ...causes PLIB modules to compile with: -I/usr/X11R6/include ...which causes the *wierdest* symptoms.... c++ -g -O2 -O6 -Wall -o tuxkart start_tuxkart.o tuxkart.o gfx.o material.o gui.o status.o sound.o utils.o isect.o guNet.o loader.o guClock.o Track.o Driver.o Herring.o Explosion.o KartDriver.o Traffic.o PlayerDriver.o AutoDriver.o Projectile.o -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg -lglut -lGLU -lGL -L/usr/X11R6/lib -lSM -lICE -lpthread -lX11 -lXi -lXext -lXmu -lm Herring.o: In function `HerringInstance type_info function': /u/tuxkart/src/Herring.cxx(.text+0x941): undefined reference to `ssgVtxTable::ssgVtxTable(GLenum, ssgVertexArray *, ssgNormalArray *, ssgTexCoordArray *, ssgColourArray *)' Herring.o: In function `Shadow::Shadow(float, float, float, float)': /u/tuxkart/src/Herring.cxx:84: undefined reference to `ssgVtxTable::ssgVtxTable(GLenum, ssgVertexArray *, ssgNormalArray *, ssgTexCoordArray *, ssgColourArray *)' ...I can't understand why that should possibly be. Compiled without /usr/X11R6/include, everything works OK?!??! However, PLIB doesn't *need* any files from /usr/X11R6/include - so for now I'm committing your change but with the offending line commented out - until we can figure WTF is going on. -- 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: Loring H. <ls...@cs...> - 2000-06-28 05:55:08
|
Steve Baker wrote: > > This patch allows PLIB to be built under Solaris w/ the SUNWspro C++ compiler > > on a system without glut in the default place (ie, adds --with-glut and > > --with-glut-includes). > > Er - OK - I've merged this stuff in. > > Wouldn't it just be easier to put GLUT in the right place? Instead of polluting the clean Solaris installs, we use user supported packages not in the "right" places. Although it makes using autoconf a pain, it is a nice way to provide packages publically. For more info see: http://www.cs.brown.edu/system/software/cs/ > > Also - not sure if it is my version of automake or not (1.4), but automake > > creates PLIB Makefile's that assume you are using gcc (uses -Md to create > > dependencies). I didn't know of any easy way to fix this - it gives a > > warning message when compiling with SUNWspro 4.2, but builds fine. > > I have no idea - autoconf/automake is a Black Art as > far as I'm concerned. Touching configure.in is *scarey*! Is "scarey" a british spelling? :-) > Anyway, I've added the new stuff - with fingers crossed :-) > > <time passes> > <*lots* of time passes> > > Well, waddayaknow? It screws up under Linux. > > It seems that with this line in configure.in: > > CPPFLAGS="$CPPFLAGS -I$x_includes" > > ...causes PLIB modules to compile with: > > -I/usr/X11R6/include > > ...which causes the *wierdest* symptoms.... [stuff deleted] > > ...I can't understand why that should possibly be. Compiled without /usr/X11R6/include, everything > works OK?!??! > > However, PLIB doesn't *need* any files from /usr/X11R6/include - so for now I'm committing > your change but with the offending line commented out - until we can figure WTF is going on. Actually, it seems like PLIB builds under Solaris even when that line is commented out. Sorry for the confusion - feel free to remove it. Loring |
From: Steve B. <sjb...@ai...> - 2000-06-28 06:22:42
|
Loring Holden wrote: > > I have no idea - autoconf/automake is a Black Art as > > far as I'm concerned. Touching configure.in is *scarey*! > > Is "scarey" a british spelling? :-) Probably not - I'm a hopeless speller - but if people put it down to British spelling that's fine by me! C-O-L-O-U-R Z is pronounced 'Zed' not 'Zee'. Americans only say 'Zee' to make the Alphabet song rhyme. :-) > > -I/usr/X11R6/include > > > > ...which causes the *wierdest* symptoms.... > [stuff deleted] > > > > ...I can't understand why that should possibly be. Compiled without /usr/X11R6/include, everything > > works OK?!??! > > > > However, PLIB doesn't *need* any files from /usr/X11R6/include - so for now I'm committing > > your change but with the offending line commented out - until we can figure WTF is going on. > > Actually, it seems like PLIB builds under Solaris even when that line is > commented out. Sorry for the confusion - feel free to remove it. Well, that's good - but I'd like to know WHY this weird stuff happens. If there is something in /usr/X11R6/include that screws up some PLIB symbol, I'd like to know about it because there will be applications programs that need to include both X11 *and* PLIB headers and we don't want any nasty suprises! -- 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: Curtis L. O. <cu...@me...> - 2000-06-28 15:30:18
|
Steve Baker writes: > > Also - not sure if it is my version of automake or not (1.4), but automake > > creates PLIB Makefile's that assume you are using gcc (uses -Md to create > > dependencies). I didn't know of any easy way to fix this - it gives a > > warning message when compiling with SUNWspro 4.2, but builds fine. > > I have no idea - autoconf/automake is a Black Art as > far as I'm concerned. Touching configure.in is *scarey*! Yes this part about handling dependencies is definitely a black art and they've gone to great lengths to hide it from even the developers who use automake/autoconf. > It seems that with this line in configure.in: > > CPPFLAGS="$CPPFLAGS -I$x_includes" Hmmm, I'm surprised you even got away with this. I've seen this sort of thing break different versions of Make which didn't like the circular reference. > ...causes PLIB modules to compile with: > > -I/usr/X11R6/include > > ...which causes the *wierdest* symptoms.... > > c++ -g -O2 -O6 -Wall -o tuxkart start_tuxkart.o tuxkart.o gfx.o material.o gui.o status.o sound.o utils.o isect.o guNet.o loader.o guClock.o Track.o Driver.o Herring.o Explosion.o KartDriver.o Traffic.o PlayerDriver.o AutoDriver.o Projectile.o -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg -lglut -lGLU -lGL -L/usr/X11R6/lib -lSM -lICE -lpthread -lX11 -lXi -lXext -lXmu -lm > Herring.o: In function `HerringInstance type_info function': > /u/tuxkart/src/Herring.cxx(.text+0x941): undefined reference to `ssgVtxTable::ssgVtxTable(GLenum, ssgVertexArray *, ssgNormalArray *, ssgTexCoordArray *, ssgColourArray *)' > Herring.o: In function `Shadow::Shadow(float, float, float, float)': > /u/tuxkart/src/Herring.cxx:84: undefined reference to `ssgVtxTable::ssgVtxTable(GLenum, ssgVertexArray *, ssgNormalArray *, ssgTexCoordArray *, ssgColourArray *)' > > ...I can't understand why that should possibly be. Compiled without /usr/X11R6/include, everything > works OK?!??! Sounds like you must have an older version of plib in /usr/X11R6 ... now wouldn't that be funny. :-) I have seen more complicated apps like FlightGear start to develop sensitivities with link orders. No idea if either of these are related, but they are the first things that come to mind. Curt. -- Curtis Olson Human Factors Research Lab Flight Gear Project Twin Cities cu...@hf... cu...@fl... Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org |
From: Steve B. <sjb...@ai...> - 2000-06-28 21:15:07
|
"Curtis L. Olson" wrote: > > ...I can't understand why that should possibly be. Compiled without /usr/X11R6/include, everything > > works OK?!??! > > Sounds like you must have an older version of plib in /usr/X11R6 > ... now wouldn't that be funny. :-) Well, I did check in there - I couldn't find anything with a clashing filename. > I have seen more complicated apps like FlightGear start to develop > sensitivities with link orders. Yep - I guess that could be. -- 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 |