← Back to team overview

yade-users team mailing list archive

Re: help compiling

 

Another update:

I could get rid of the glut.so: undefined reference 
errors by additionally specifing -lGL and -lGLU
at his step:

 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

So I added -lGL and -lGLU to yade.pro in
yade-core/projects/kdevelop/yade/
and could then compile_install until ...

make[5]: Entering directory
`/home/andreas/tobesorted/yade-all-0.9.0.911/yade-packages/yade-package-dem/projects/kdevelop/RenderingEngine/GLDrawPolyhedralSweptSphere'
g++ -c -pipe -Wall -W -march=opteron -O2 -pipe
-lpthread -pthread -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../../DataClass/InteractingGeometry/PolyhedralSweptSphere
-I/usr/qt/3/include -o GLDrawPolyhedralSweptSphere.o
GLDrawPolyhedralSweptSphere.cpp
GLDrawPolyhedralSweptSphere.cpp:37:29:
GL/freeglut_ext.h: No such file or directory

I did not have freeglut_ext.h on my system.

ok, so I replaced glut with freeglut on my system and
tried again. 

It got past the last error until ...

g++ -c -pipe -Wall -W -march=opteron -O2 -pipe
-lpthread -pthread -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../../../DataClass/InteractionGeometry/ErrorTolerantContactModel
-I/usr/qt/3/include -o ErrorTolerantLaw.o
ErrorTolerantLaw.cpp
In file included from ErrorTolerantLaw.cpp:24:
ErrorTolerantLaw.hpp:67: error:
`boost::numeric::ublas::sparse_matrix' has not been
declared

I believe this is the issue with boost 1.33 you had
mentioned. 

Should I just downgrade to boost 1.32 ?

--- Andreas Plesch <andreasplesch@xxxxxxxxx> wrote:

> 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
> 
=== message truncated ===



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
http://lists.berlios.de/mailman/listinfo/yade-users



Follow ups

References