← Back to team overview

yade-users team mailing list archive

Re: help compiling

 

Hi !

I found that I have two gl.h, an nividia provided one
and a xorg-x11 provided one. The nvidia one the one
which had the error. It has those lines defining
GLAPI:

#ifndef GLAPI
# ifdef _WIN32
#  define GLAPI __stdcall
# else
#  define GLAPI
# endif
# define __DEFINED_GLAPI
#endif



Ok, I made some progress. I changed to the xorg-x11
provided gl.h, and this made most (?) compile but
there is first a compiler error in the end:

...
g++  -o ../../../bin/yade BodyContainer.o Body.o
BoundingVolume.o DeusExMachina.o FileGenerator.o
FrontEnd.o GeometricalModel.o InteractingGeometry.o
InteractionContainer.o Interaction.o MetaBody.o
NullGUI.o Omega.o PhysicalActionContainer.o
PhysicalParameters.o Preferences.o SimulationLoop.o
yade.o yadeExceptions.o TimeStepper.o
MetaDispatchingEngine.o   
-L/tmp/yade/usr/lib/yade/yade-libs -L/usr/qt/3/lib64
-L/usr/X11R6/lib64 -lyade-lib-threads
-lyade-lib-serialization -lyade-lib-factory
-lyade-lib-wm3-math -lyade-lib-loki
-lyade-lib-multimethods -lglut -rdynamic
-lboost_date_time -lboost_filesystem -lboost_thread-mt
-lqt-mt -lXext -lX11 -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
`typeinfo for std::vector<unsigned char,
std::allocator<unsigned char> > const*' referenced in
section
`.gnu.linkonce.t._ZN18FundamentalHandlerISsE7creatorER7ArchiveRN5boost3anyE'
of Preferences.o: defined in discarded section
`.gnu.linkonce.r._ZTIPKSt6vectorIhSaIhEE' of
Preferences.o
.. and some more similar

and then a linker error:

/usr/X11R6/lib64/libglut.so: undefined reference to
`glPixelStorei'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glBitmap'
/usr/X11R6/lib64/libglut.so: undefined reference to
`gluErrorString'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glPopAttrib'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glMapGrid2f'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glRotatef'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glEvalMesh2'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glFinish'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glVertex3f'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXQueryExtension'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glNormal3fv'
/usr/X11R6/lib64/libglut.so: undefined reference to
`gluNewQuadric'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glViewport'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glVertex3fv'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glBegin'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glDrawBuffer'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXMakeCurrent'
/usr/X11R6/lib64/libglut.so: undefined reference to
`gluQuadricDrawStyle'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXQueryExtensionsString'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glVertex2f'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXChooseVisual'
/usr/X11R6/lib64/libglut.so: undefined reference to
`gluCylinder'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glGetError'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glGetIntegerv'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glPushAttrib'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXDestroyContext'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glPopMatrix'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXWaitX'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXGetProcAddressARB'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXQueryVersion'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glGetString'
/usr/X11R6/lib64/libglut.so: undefined reference to
`gluQuadricNormals'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXGetClientString'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glPushMatrix'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glEnable'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glNormal3f'
/usr/X11R6/lib64/libglut.so: undefined reference to
`gluSphere'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glPolygonMode'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glMap2f'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glScalef'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glReadBuffer'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXIsDirect'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXSwapBuffers'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glTranslatef'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXCreateContext'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glXGetConfig'
/usr/X11R6/lib64/libglut.so: undefined reference to
`glEnd'
collect2: ld returned 1 exit status

The linker error may be due to the fact that I
compiled glut with the nvidia provided gl.h ?

I will switch back to the nvidia gl.h and remove GLAPI
from OpenGLWrapper.hpp and try again.

Could I provide more information ? 

thanks for the quick response,

Andreas

--- Janek Kozicki <janek_listy@xxxxx> wrote:

> > Hello,
> > 
> > I am a current user of discrete element code and
> would
> > like to give yade a spin.
> 
> 
> hello! very nice to see a new user :) Welcome.
> 
>  
> > I run gentoo on amd64, installed boost 1.34 and
> > libqglviewer 2.1.1 and use gcc 3.4.4.
> 
> re: boost 1.34 - you will have to make small change
> in ErrorTolerant to
> make it compile. It's for 1.33, I hope that 1.34
> isn't any worse, we
> will see...
> 
> libqglviewer 2.1.1 and gcc 3.4.4 should work without
> any problems (they
> were tested afaik).
> 
>  
> > I got yade-all, unpacked and typed
> > 
> > make compile_install PREFIX_DIR='/tmp/yade'
> > INSTALL_DIR='usr'
> 
> one note about INSTALL_DIR and PREFIX_DIR -
> currently they are not fully
> supported according to the standard as I know it in
> debian (and gentoo
> should have sth. similar). And because of that we
> need to set
> LD_LIBRARY_PATH before lanunching yade executable.
> This will be fixed in
> next release, and hopefully it's just a minor
> inconvenience. You can
> move yade freely acrosss your filesystem
> directories, just make sure
> that ~/.yade/preferences.xml contains correct paths
> inside.
> 
>  
> > The compile went through some directories until it
> > proceeded to yade-lib-opengl. Here it produced 
> > this error:
> > 
> > make[3]: Entering directory
> >
>
`/home/andreas/tobesorted/yade-all-0.9.0.911/yade-libs/yade-lib-opengl/projects/kdevelop'
> > cd yade-lib-opengl && make -f Makefile
> > make[4]: Entering directory
> >
>
`/home/andreas/tobesorted/yade-all-0.9.0.911/yade-libs/yade-lib-opengl/projects/kdevelop/yade-lib-opengl'
> > g++ -c -pipe -Wall -W -march=opteron -O2 -pipe
> -fPIC 
> > -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT
> > -DQT_THREAD_SUPPORT -I/usr/qt/3/mkspecs/linux-g++
> -I.
> > -I/tmp/yade/usr/include -I/usr/qt/3/include -o
> > FpsTracker.o FpsTracker.cpp
> > In file included from FpsTracker.cpp:25:
> > OpenGLWrapper.hpp:51: error: expected
> init-declarator
> > before "void"
> > OpenGLWrapper.hpp:51: error: expected `;' before
> > "void"
> > .. [many more similar errors following]
> > 
> > I have the Nvidia gl.h, if this is important ?
> > 
> > Could you provide any hints ?
> 
> 
> OK, so we get to the problem :) I haven't seen this
> error yet on fedora
> or debian. You are the first brave guy to try it on
> gentoo :)))
> 
> my first bet is that #define GLAPI somewhere in gl.h
> or glut.h or in
> some file they include defines string unexpected by
> the compiler. Check to
> what it is defined, and then see if simple removing
> of word GLAPI from
> OpenGLWrapper will make things work.
> 
> There may be something similar with GLAPIENTRY.
> 
> I'm curious to what GLAPI is defined there?
> 
> re: architecture - Bruno is trying to run yade on
> debian amd64 too, no news
> about his success or failure yet ;)
> 
> -- 
> Janek Kozicki                                       
>                  |
> _______________________________________________
> Yade-users mailing list
> Yade-users@xxxxxxxxxxxxxxxx
> http://lists.berlios.de/mailman/listinfo/yade-users
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
http://lists.berlios.de/mailman/listinfo/yade-users



Follow ups

References