Re: [Plib-users] compiling plib on irix 6.2
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-10-27 02:58:21
|
Ian van der Neut wrote: > Wanting to write a game for my kids, I wanted to try out plib, however > I'm running into problems compiling both plib 1.2.0 and 1.3.1 on my SGI > Indy running IRIX 6.2 and gcc/g++ (Yeah, I know it's old, and the game > won't really run on it, but I like developping on these boxes :). Well - you won't get much speed out of it with textured polygons - but if you stick with plain or colour blended polygons, it should run passably well. > I don't know if this is a FAQ, since I couldn't find no FAQ :) Er - no - there aren't any questions that are asked frequently enough. :-) > so sorry > if it is a FAQ and I'll be happy with a direction to the FAQ, couldn't > find anything similar in the mailing list archives either. Don't sweat it - we're an easy going bunch here - we like to hear what people are doing. > version info: > grep VERSION /usr/include/GL/gl.h > #define GL_VERSION 0x1F02 Er - GL_VERSION *always* has the value 0x1F02 in all versions of OpenGL because it's just a token that you pass to glGetString(GL_VERSION) when you are querying the version number at runtime. However, you obviously have OpenGL 1.0 because version 1.1 and 1.2 define tokens like GL_VERSION_1_1 and GL_VERSION_1_2. There is no GL_VERSION_1_0. Anyway, this is an Indy and I know SGI didn't ever release an OpenGL 1.1 for machines that old. :-) > I'm getting the following errors when trying to build plib 1.2.0 ( I > snipped the dirty X libs warnings ;): > > gmake[2]: Entering directory `/usr/local/src/plib-1.2.0/src/ssg' > c++ -DPACKAGE=\"plib\" -DVERSION=\"1.2.0\" -DHAVE_LIBDL=1 -DHAVE_LIBGL=1 > -DHAVE_LIBGLU=1 -DHAVE_LIBGLUT=1 -DHAVE_LIBAUDIO=1 -DSTDC_HEADERS=1 > -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 -DGLUT_IS_PRESENT=1 -I. -I. > -I../../src/sg -I../../src/util -g -O2 -O6 -Wall -c ssgVtxArray.cxx > In file included from /usr/include/GL/glx.h:21, > from ssgLocal.h:13, > from ssgVtxArray.cxx:2: > > <dirty X lib warnings snipped> > > ssgVtxArray.cxx: In method `void ssgVtxArray::drawHighlight(float *)': > ssgVtxArray.cxx:75: `GL_CLIENT_VERTEX_ARRAY_BIT' undeclared (first use > this function) OK - we have been bad boys and wrote PLIB 1.2.0 to *require* OpenGL 1.1 or later. There are some possible work-arounds: * We should probably put conditional compilation around the entire ssgVtxArray class definition that make it be just an ssgVtxTable. Vertex arrays didn't exist in OpenGL 1.0. However, since you may well be the last person on the planet to still be running v1.0, my enthusiasm for a fix is minimal. * You could go back to PLIB 1.1.xx - it should compile just fine on your Indy since it didn't support Vertex Arrays. You'll find all the old versions on the PLIB web site. * You *might* get lucky and find that your machine had vertex arrays implemented as OpenGL extensions. Look for the missing functions and tokens in /usr/include/GL/gl.h - they may be there with an 'EXT' or 'SGI' tacked on the end...personally, I doubt you'll be that lucky, but it's worth checking. > ssgVtxArray.cxx:77: `GL_COLOR_ARRAY' undeclared (first use this > ssgVtxArray.cxx:78: `GL_NORMAL_ARRAY' undeclared (first use this > ssgVtxArray.cxx:79: `GL_TEXTURE_COORD_ARRAY' undeclared (first use this > ssgVtxArray.cxx:80: `GL_VERTEX_ARRAY' undeclared (first use this > ssgVtxArray.cxx:80: warning: implicit declaration of function `int glEnableClientState(...)' > ssgVtxArray.cxx:82: warning: implicit declaration of function `int glVertexPointer(...)' > ssgVtxArray.cxx:89: warning: implicit declaration of function `int glDrawElements(...)' > ssgVtxArray.cxx:91: warning: implicit declaration of function `int glPopClientAttrib(...)' All of these are the same thing basically. OpenGL 1.0 doesn't implement vertex arrays and we need them. > When trying to build plib 1.3.1: > slDSP.cxx:621: warning: implicit declaration of function `int alNewConfig(...)' The software detected that you have an SGI machine - and tried to use the *NEW* IRIX sound library from IRIX 6.5 (or so). Support for the new audio library is relatively new to PLIB - which is why you didn't see a problem with PLIB 1.2.0. IRIX 6.2 used the old sound library - which is what we had in PLIB 1.2.0 > slDSP.cxx:621: warning: assignment to `_ALconfig *' > slDSP.cxx:623: warning: implicit declaration of function `int alSetChannels(...)' > slDSP.cxx:624: warning: implicit declaration of function `int alSetWidth(...)' > slDSP.cxx:625: warning: implicit declaration of function `int alSetQueueSize(...)' > slDSP.cxx:627: warning: implicit declaration of function `int alOpenPort(...)' > slDSP.cxx:627: warning: assignment to `_ALport *' > slDSP.cxx:628: warning: implicit declaration of function `int alFreeConfig(...)' > slDSP.cxx:637: `ALpv' undeclared (first use this function) ...more of the same I'm afraid...these are all 'al' (Audio Library) functions. I guess you are stuck with either dumping the PLIB sound code altogether - or sticking with the 'SL' from version 1.2.0 - which was the last version to support the old IRIX sound library. > I have installed the latest libraries (CD image) that can be downloaded > from the SGI site. From swmgr, I can see that all GL development files > have been installed. Yep. That machine of yours is definitely showing it's age. SGI don't actively support machines that old anymore - so you aren't going to find stuff like OpenGL 1.1/1.2 and the new sound library being ported to it. Go get a *cheap* PC and install Linux. Linux is *so* close to IRIX, you'll hardly notice the difference. I routinely switch between our big ONYX 2 machines at work and various Linux boxes - and while I'm working I *frequently* forget which machine I'm logged into - they are *that* similar. Bear in mind that a $128 GeForce-2 card in a $600 700MHz PC is considerably faster than a third of a million dollars worth of ONYX-2 Infinite Reality. Heck even a 266MHz PC with a Voodoo-1 card would wipe the floor with that Indy on both performance and image quality. You'll probably also appreciate the way you can pick up 20Gb disk drives for $90 too - those old 1Gb Indy drives were pretty restrictive. I think it's time to wave goodbye to your old Indy buddy <sniff>. ...or pick up PLIB 1.1.xx if you *absolutely* must. ...or hack together a hybrid PLIB if you *really* have a lot of time on your hands! *OR* (radical thought here) install Mesa on your Indy. It'll run in software-only, so it'll be *REALLY* slow - but it will run PLIB 1.2.0 and give you OpenGL 1.2. -- 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 |