← Back to team overview

yade-users team mailing list archive

Some problems in Compilation

 

Hi All,
Here are some problems in compilations and the way I solved it :



*1.*
in directory :
/usr/local/yade-all-0.9.0.911/yade-guis/QtGUI/projects/kdevelop/QtGUI
when compiled I got the following Error :

[root@localhost QtGUI]# *make*
qmake -o Makefile QtGUI.pro
g++ -c -pipe -Wall -W -O2 -fPIC  -DQT_NO_DEBUG -DQT_SHARED
-I/usr/local/qt/mkspecs/default -I. -I../../../../../../include
-I/usr/local/qt/include -o QtGeneratedEngineEditor.o
QtGeneratedEngineEditor.cpp
cc1plus: warning: changing search order for system directory
"/usr/local/include"
cc1plus: warning:   as it is the same as non-system directory
"../../../../../../include"
QtGeneratedEngineEditor.cpp:25:28: glengineeditor.h: No such file or
directory
make: *** [QtGeneratedEngineEditor.o] Error 1

When I put a remark on the line
//#include "glengineeditor.h" (in file QtGeneratedEngineEditor.cpp)

It compiled without any error.


*2*.

In Directory : yade-core/projects/kdevelop/yade


I got the folowing Error :
[root@localhost yade]# *make CXXFLAGS='-pthread -lpthread'*

g++ -Wl,-rpath,/usr/local/lib/yade/yade-libs  -Wl,-rpath,/usr/local/qt/lib
-o ../../../bin/yade BodyContVolume.o DeusExMachina.o FileGenerator.o
FrontEnd.o GeometricalModel.o InteractingGeometry.o Interaction.o MetaBody.o
NullGUI.o Omega.o PhysicalActionContainer.o PhysicalParameters.o
Preferences.o SimulationLions.o TimeStepper.o MetaDispatchingEngine.o
 -L/usr/local/lib/yade/yade-libs
-L/usr/local/qt/lib -L/u-threads -lyade-lib-serialization -lyade-lib-factory
-lyade-lib-wm3-math -lyade-lib-loki -lyade-lib-multic -lboost_date_time
-lboost_filesystem -lboost_thread -lqt -lXext -lX11 -lm
/usr/bin/ld: cannot find -lboost_date_time
collect2: ld returned 1 exit status
make: *** [../../../bin/yade] Error 1


In directory : yade-guis/QtGUI/projects/kdevelop/QtGUI/Makefile

I got the same Error :

g++ -c -pipe -Wall -W -O2 -fPIC  -DQT_NO_DEBUG -DQT_SHARED
-I/usr/local/qt/mkspecs/default -I. -I../../../../../../include
-I/usr/local/qt/include -o QtGeneratedEngineEditor.o
QtGeneratedEngineEditor.cpp
cc1plus: warning: changing search order for system directory
"/usr/local/include"
cc1plus: warning:   as it is the same as non-system directory
"../../../../../../include"
test -d ../../../bin/ || mkdir -p ../../../bin/
rm -f libQtGUI.so.1.0.0 libQtGUI.so libQtGUI.so.1 libQtGUI.so.1.0
g++ -Wl,-rpath,/usr/local/lib/yade/yade-libs  -Wl,-rpath,/usr/local/qt/lib
-shared -Wl,-soname,libQtGUI.so.1
-Wl,-rpath,/usr/local/yade-all-0.9.0.911/yade-guis/QtGUI/bin
-o libQtGUI.so.1.0.0 FileDialog.o GLEngineEditor.o GLViewer.o
MessageDialog.o QGLThread.o QtCodeGenerator.o QtEngineEditor.o
QtFileGenerator.o QtGUI.o QtPreferencesEditor.o SimulationController.o
SimulationControllerUpdater.o YadeQtMainWindow.o QtGUIPreferences.o
QtMetaDispatchingEngineProperties.o QtFileGeneratorController.o
QtGeneratedCodeGenerator.o QtGeneratedEngineEditor.o
QtGeneratedMessageDialog.o QtGeneratedPreferencesEditor.o
QtGeneratedSimulationController.o YadeQtGeneratedMainWindow.o
QtGeneratedMetaDispatchingEngineProperties.o moc_GLEngineEditor.o
moc_GLViewer.o moc_QtFileGeneratorController.o
moc_QtGeneratedCodeGenerator.o moc_QtGeneratedEngineEditor.o
moc_QtGeneratedMessageDialog.o moc_QtGeneratedPreferencesEditor.o
moc_QtGeneratedSimulationController.o moc_YadeQtGeneratedMainWindow.o
moc_QtGeneratedMetaDispatchingEngineProperties.o
-L/usr/local/lib/yade/yade-libs
-L/usr/local/qt/lib -L/usr/X11R6/lib -lyade-lib-wm3-math
-lyade-lib-multimethods -lyade-lib-factory -lyade-lib-opengl
-lyade-lib-threads -lyade-lib-serialization
-lyade-lib-computational-geometry -lXMLFormatManager
-lyade-lib-serialization-qt -lQGLViewer -lboost_date_time -lboost_filesystem
-rdynamic -lqt -lXext -lX11 -lm
/usr/bin/ld: cannot find -lboost_date_time
collect2: ld returned 1 exit status


The BoosT libraries has a suffix so I need either to change
-lboost_date_time to -lboost_date_time($suffix) in the Makefile or (what I
have done) make symbolic link from libboost_date_time.a to
libboost_date_time.(suffix).a :

[root@localhost lib]# *ln -s libboost_date_time-gcc.a libboost_date_time.a*
[root@localhost lib]# *ln libboost_filesystem-gcc.a libboost_filesystem.a*
[root@localhost lib]# *ln -s libboost_thread-gcc-mt-s.a libboost_thread.a
*

The suffix is describes in the boost manual :

*Results*

The results of building come in to forms: static libraries, and dynamic
libraries. Depending on the platform the libraries produced have different
names to accommodate the platform requirements. For a single Boost library
the build with the default will produce eight different libraries. For
example building the Boost.Datetime library on Unix type system it would
produce:

  1. libboost_date_time-gcc-d-1_31.so
  2. libboost_date_time-gcc-mt-d-1_31.so
  3. libboost_date_time-gcc-1_31.so
  4. libboost_date_time-gcc-mt-1_31.so
  5. libboost_date_time-gcc-d-1_31.a
  6. libboost_date_time-gcc-mt-d-1_31.a
  7. libboost_date_time-gcc-1_31.a
  8. libboost_date_time-gcc-mt-1_31.a

   · Library Prefix   lib   · Library Name boost_date_time   · Toolset -
gcc   · Threading - mt   · Runtime - d   · Boost Version - 1_31   · Library
Type .a


*After making this changes the program compiled without Errors,*
*but unfortunatly I can't run it ....*

Tal.

Follow ups