Ah, I just discovered that gl_handler.o and py_gl_handler.o are ok not to
be removed, because they contain no code if GL is not being compiled, so
will compile ok. So the one real problem is with GL_LIB (in both
c/ccpnmr/analysis/Makefile and c/memops/global/Makefile) and that is best
dealt with in c/environment.txt, currently it says
GL_LIB = -lglut -lGLU -lGL
and for no GL it should say
GL_LIB =
(or not be defined at all). That will be done in the next release in
installCode.py.
I should have perhaps mentioned something about two of the other
GL-related flags in environment.txt:
(1) IGNORE_GL_FLAG: this should be -DIGNORE_GL if you do not want GL
compiled. This is the flag that the C source code uses (in particular it
is what allows gl_handler.c and py_gl_handler.c to have no code). So the
setting of this goes with the setting of GL_LIB.
(2) GL_FLAG: this should be either -DUSE_GL_FALSE or -DUSE_GL_TRUE. This
is to do with the GL initialisation in c/memops/global/gl_handler.c, there
is a call to glXCreateContext() and the last argument is something which
can either be GL_FALSE or GL_TRUE and is not clear to me how one is
supposed to know which to use and if you use the wrong one you get a
horrible crash. This is completely independent of the GL compilation
hassle.
Wayne
On Thu, 24 Mar 2005, Wayne Boucher wrote:
> I think there are unfortunately other lines that need removing.
>
> In c/memops/global/makefile exterminate gl_handler.o from DRAWING_OBJS and
> exterminate py_gl_handler.o from PY_DRAWING_OBJS. This is getting really
> messy from the point of view of doing it "properly". (Again, because of
> lack of #ifdef in makefiles.)
>
> Wayne
>
> On Thu, 24 Mar 2005, Wayne Boucher wrote:
>
> > Rats, this is the problem with having too much junk on one's computer, one
> > doesn't notice that things that shouldn't need to be use are actually
> > being used. Fixing this properly is a bit of a job, but to get rid of
> > mention of OpenGL in the Makefiles I would do the following.
> >
> > In c/memops/global/Makefile remove GlHandler.so from the line
> >
> > all: BlockFile.so GlHandler.so MemCache.so PdfHandler.so PsHandler.so
> > FitMethod.so TkHandler.so
> >
> > In c/ccpnmr/analysis/Makefile remove $(GL_LIB) from the line
> >
> > ALL_LIB = $(GL_LIB) $(TK_LIB) $(TCL_LIB) $(X11_LIB) $(MATH_LIB)
> >
> > I hope that will be all that is needed. (This would all be a lot easier
> > if Makefiles had some kind of #ifdef mechanism.)
> >
> > Wayne
> >
> > On Wed, 23 Mar 2005, Huw Jenkins wrote:
> >
> > > On 23 Mar 2005, at 21:56, Bruce D. Ray wrote:
> > >
> > > > I have encountered an error on attempted compilation on a Mac
> > > > runing OS X 10.3.8. Despite setting compilation to not use
> > > > OpenGL, the linker still wants to find libglut.* which this
> > > > system does not have. How does one get around this demand for
> > > > a libglut.*? (For that matter, if one has specified not
> > > > to use OpenGL, should there be linking requirements for
> > > > OpenGL libraries and libglut.*?
> > >
> > > That's interesting. It compiled fine for me, at first I thought I must
> > > have hacked around installCode.py to remove the glut dependency but in
> > > fact I have libglut from when I was trying to compile analysis with
> > > OpenGL. I think I compiled freeglut from source and symlinked the libs
> > > into /usr/X11R6/lib. Anyway I have exactly the same compiler output as
> > > you (bar a few fink references).
> > >
> > > > cc -c -DIGNORE_GL -DUSE_GL_TRUE -I/sw/include/python2.3
> > > > -I/usr/X11R6/include -I/sw/include -I/sw/include -I/include -O
> > > > gl_handler.c
> > > > cc -c -DIGNORE_GL -I/sw/include/python2.3 -I/usr/X11R6/include
> > > > -I/sw/include -I/sw/include -I/include -O py_gl_handler.c
> > >
> > > I thought that this is the problem - USE_GL_TRUE
> > >
> > > so comment out line 456 of installCode.py: #GL_FLAG = %s
> > > then uncomment line 458: GL_FLAG = -DUSE_GL_FALSE
> > >
> > > That sorts out the USE_GL_TRUE but it still wants glut. So I hacked
> > > around some more and changed line 506 so that it now reads:
> > > GL_LIB = -lGLU -lGL
> > > ie I removed -lglut
> > >
> > > Analysis will now build without libglut. And it seems to run, but I've
> > > not opened any spectra yet...
> > >
> > > I'm sure Wayne will have a more elegant solution though...
> > >
> > >
> > > Huw
> > >
> > > --
> > > Huw Jenkins
> > > School of Chemistry
> > > University of Edinburgh
> > > West Mains Road
> > > Edinburgh, EH9 3JJ
> > > [log in to unmask]
> > >
> >
>
|