> First thank you for your reply of my last question! > I still use yade-0.12rc1 because I have already done some work on > version 0.12rc1, so I want to keep it. After reinstall dependecies, it > showed the following content. Is it because of the version of Python? > > thank you very much! > > jc...@jturnmir-desktop:~/YADE/bin$ ./yade-0.12rc1 > ./yade-0.12rc1: symbol lookup error: /usr/lib/libboost_python- > gcc42-mt-1_34_1.so.1.34.1: undefined symbol: Py_InitModule4
Hi Jingsong, I managed to compile 0.12rc1 on Uubtu 10.04 (with the patch attached, and with exclude=exclude=extra,fem,lattice,mass-spring,realtime-rigidbody) and I don't see the error you have. I can launch yade normally. Therefore I think the problem is really in the hardcoded python version. I get crash when trying to run the generator dialogue, so I cannot help you more here unfortunately. Cheers, Vaclav
Index: pkg/dem/SConscript =================================================================== --- pkg/dem/SConscript (revision 1453) +++ pkg/dem/SConscript (working copy) @@ -388,9 +388,6 @@ 'ElasticContactLaw', 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -425,9 +422,6 @@ 'ForceRecorder', 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'yade-base', 'InteractingSphere', 'InteractingBox', @@ -464,9 +458,6 @@ 'PositionSnapshot', 'ForceSnapshot', 'ForceRecorder', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -500,9 +491,6 @@ 'ElasticCohesiveLaw', 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -535,9 +523,6 @@ 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', 'PositionOrientationRecorder', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -569,9 +554,6 @@ 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', 'PositionOrientationRecorder', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -602,9 +584,6 @@ LIBS=env['LIBS']+['MyTetrahedronLaw', 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingMyTetrahedron', 'InteractingSphere', 'InteractingBox', @@ -641,10 +620,7 @@ 'ForceRecorder', 'SimpleElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', 'InteractionHashMap', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'NewtonsDampedLaw', @@ -686,10 +662,7 @@ 'ForceRecorder', 'CohesiveFrictionalRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', 'InteractionHashMap', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'InteractingSphere2InteractingSphere4DistantSpheresContactGeometry', @@ -734,10 +707,7 @@ 'ForceRecorder', 'CohesiveFrictionalRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', 'InteractionHashMap', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'InteractingSphere2InteractingSphere4DistantSpheresContactGeometry', @@ -780,9 +750,6 @@ 'ElasticCohesiveLaw', 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -852,10 +819,7 @@ ContactStressRecorder MacroMicroElasticRelationships ElasticCriterionTimeStepper - PhysicalActionVectorVector - InteractionVecSet InteractionHashMap - BodyRedirectionVector InteractingSphere InteractingBox CundallNonViscousDamping @@ -975,10 +939,7 @@ 'ForceRecorder', 'CohesiveFrictionalRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', 'InteractionHashMap', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', @@ -1070,12 +1031,10 @@ ,'SimpleViscoelasticInteraction' ,'SimpleViscoelasticSpheresInteractionRecorder' ,'GravityEngines' - ,'BodyRedirectionVector' ,'BoundingVolumeMetaEngine' ,'InteractingSphere' ,'InteractionGeometryMetaEngine' ,'InteractionPhysicsMetaEngine' - ,'InteractionVecSet' ,'MetaInteractingGeometry' ,'MetaInteractingGeometry2AABB' ,'ParticleParameters' @@ -1083,7 +1042,6 @@ ,'PhysicalActionApplier' ,'PhysicalActionContainerInitializer' ,'PhysicalActionContainerReseter' - ,'PhysicalActionVectorVector' ,'PhysicalParametersMetaEngine' ,'PersistentSAPCollider' ,'Sphere' @@ -1093,7 +1051,6 @@ ,['PreProcessor/STLImporterTest.cpp'] ,LIBS=env['LIBS']+['AABB' ,'STLImporter' - ,'BodyRedirectionVector' ,'BoundingVolumeMetaEngine' ,'CundallNonViscousDamping' ,'CundallNonViscousDamping' @@ -1108,7 +1065,6 @@ ,'InteractingVertex' ,'InteractionGeometryMetaEngine' ,'InteractionPhysicsMetaEngine' - ,'InteractionVecSet' ,'MacroMicroElasticRelationships' ,'MetaInteractingGeometry' ,'MetaInteractingGeometry2AABB' @@ -1116,7 +1072,6 @@ ,'PhysicalActionApplier' ,'PhysicalActionContainerInitializer' ,'PhysicalActionContainerReseter' - ,'PhysicalActionVectorVector' ,'PhysicalParametersMetaEngine' ,'SpatialQuickSortCollider' ,'Sphere' Index: pkg/common/SConscript =================================================================== --- pkg/common/SConscript (revision 1453) +++ pkg/common/SConscript (working copy) @@ -18,9 +18,6 @@ # env.SharedLibrary('InteractionVecSet',['Container/InteractionVecSet.cpp']), # env.SharedLibrary('PhysicalActionVectorVector',['Container/PhysicalActionVectorVector.cpp']), ## still permit linking with that - env.SharedLibrary('BodyRedirectionVector',[]), - env.SharedLibrary('InteractionVecSet',[]), - env.SharedLibrary('PhysicalActionVectorVector',[]), env.SharedLibrary('AABB',['DataClass/BoundingVolume/AABB.cpp']), env.SharedLibrary('BoundingSphere',['DataClass/BoundingVolume/BoundingSphere.cpp']), Index: extra/SConscript =================================================================== --- extra/SConscript (revision 1453) +++ extra/SConscript (working copy) @@ -58,9 +58,6 @@ 'ElasticCohesiveLaw', 'MacroMicroElasticRelationships', 'ElasticCriterionTimeStepper', - 'PhysicalActionVectorVector', - 'InteractionVecSet', - 'BodyRedirectionVector', 'InteractingSphere', 'InteractingBox', 'CundallNonViscousDamping', Index: gui/SConscript =================================================================== --- gui/SConscript (revision 1453) +++ gui/SConscript (working copy) @@ -44,9 +44,10 @@ env.File('PythonUI_rc.py','py'), # env.SharedLibrary('PlotDataGetter',['py/PlotDataGetter.cpp']), ]) + if 'qt3' not in env['exclude']: + env.Install('$PREFIX/lib/yade$SUFFIX/gui/yade',[env.SharedLibrary('qt',['qt3/QtGUI-python.cpp'],SHLIBPREFIX='',LIBS=env['LIBS']+['QtGUI'],CPPPATH=env['CPPPATH']+[env['buildDir']+'/gui/qt3'])]) # python modules are one level deeper so that you can say: from yade.wrapper import * env.Install('$PREFIX/lib/yade$SUFFIX/gui/yade',[ - env.SharedLibrary('qt',['qt3/QtGUI-python.cpp'],SHLIBPREFIX='',LIBS=env['LIBS']+['QtGUI'],CPPPATH=env['CPPPATH']+[env['buildDir']+'/gui/qt3']), # CPPPATH is for files generated by moc which are indirectly included env.SharedLibrary('wrapper',['py/yadeControl.cpp'],SHLIBPREFIX='', LIBS=env['LIBS']+['yade-base','libboost_python','XMLFormatManager','yade-factory','yade-serialization','Shop', 'BoundingVolumeMetaEngine', Index: core/yade.cpp =================================================================== --- core/yade.cpp (revision 1453) +++ core/yade.cpp (working copy) @@ -55,7 +55,7 @@ if(sig==SIGABRT || sig==SIGSEGV){ signal(SIGSEGV,SIG_DFL); signal(SIGABRT,SIG_DFL); // prevent loops - default handlers cerr<<"SIGSEGV/SIGABRT handler called; gdb batch file is `"<<Omega::instance().gdbCrashBatch<<"'"<<endl; - system((string("gdb -x ")+Omega::instance().gdbCrashBatch).c_str()); + ::system((string("gdb -x ")+Omega::instance().gdbCrashBatch).c_str()); unlink(Omega::instance().gdbCrashBatch.c_str()); // delete the crash batch file raise(sig); // reemit signal after exiting gdb } @@ -165,6 +165,11 @@ #ifdef LOG4CXX + #ifdef LOG4CXX_DEBUG + log4cxx::LevelPtr debugLevel=log4cxx::Level::getDebug(), infoLevel=log4cxx::Level::getInfo(), warnLevel=log4cxx::Level::getWarn(); + #else + log4cxx::LevelPtr debugLevel=log4cxx::Level::DEBUG, infoLevel=log4cxx::Level::INFO, warnLevel=log4cxx::Level::WARN; + #endif // read logging configuration from file and watch it (creates a separate thread) std::string logConf=configPath+"/logging.conf"; if(filesystem::exists(logConf)){ @@ -172,7 +177,7 @@ LOG_INFO("Loaded "<<logConf<<" (monitored)"); } else { // otherwise use simple console-directed logging log4cxx::BasicConfigurator::configure(); - logger->setLevel(log4cxx::Level::WARN); + logger->setLevel(warnLevel); LOG_INFO("Logger uses basic (console) configuration since `"<<logConf<<"' was not found. INFO and DEBUG messages will be ommited."); LOG_INFO("Look at the file doc/logging.conf.sample in the source distribution as an example on how to customize logging."); } @@ -185,11 +190,11 @@ filesystem::path yadeConfigFile = filesystem::path(Omega::instance().yadeConfigPath + "/preferences.xml", filesystem::native); #ifdef LOG4CXX - if(verbose==1) logger->setLevel(log4cxx::Level::INFO); - else if (verbose>=2) logger->setLevel(log4cxx::Level::DEBUG); + if(verbose==1) logger->setLevel(infoLevel); + else if (verbose>=2) logger->setLevel(debugLevel); if(getenv("YADE_DEBUG")){ LOG_INFO("YADE_DEBUG environment variable is defined, setting logging level to DEBUG."); - logger->setLevel(log4cxx::Level::DEBUG); + logger->setLevel(debugLevel); } #endif Index: core/Omega.cpp =================================================================== --- core/Omega.cpp (revision 1453) +++ core/Omega.cpp (working copy) @@ -187,6 +187,7 @@ thisLoaded=true; } else if(err.find(": undefined symbol: ")!=std::string::npos){ + LOG_FATAL("Original error message: "<<err); size_t pos=err.rfind(":"); assert(pos!=std::string::npos); std::string sym(err,pos+2); //2 removes ": " from the beginning Index: lib/SConscript =================================================================== --- lib/SConscript (revision 1453) +++ lib/SConscript (working copy) @@ -44,6 +44,7 @@ # since the generated header is #include'd "...", it looks for it in the original dir # no idea why this _does_ work with gui/qt3. Go figure. CPPPATH=env['CPPPATH']+['${TARGET.dir}'], + LIBS=env['LIBS']+['GLU'] ), ]) Index: lib/QGLViewer/VRender/FIGExporter.cpp =================================================================== --- lib/QGLViewer/VRender/FIGExporter.cpp (revision 1453) +++ lib/QGLViewer/VRender/FIGExporter.cpp (working copy) @@ -47,6 +47,7 @@ #include "Exporter.h" #include "math.h" +#include <cstdio> using namespace vrender ; using namespace std ; Index: lib/QGLViewer/VRender/Exporter.cpp =================================================================== --- lib/QGLViewer/VRender/Exporter.cpp (revision 1453) +++ lib/QGLViewer/VRender/Exporter.cpp (working copy) @@ -48,6 +48,7 @@ #include <stdexcept> #include "VRender.h" #include "Exporter.h" +#include<cstdio> using namespace vrender ; using namespace std ; Index: lib/QGLViewer/VRender/BSPSortMethod.cpp =================================================================== --- lib/QGLViewer/VRender/BSPSortMethod.cpp (revision 1453) +++ lib/QGLViewer/VRender/BSPSortMethod.cpp (working copy) @@ -49,6 +49,7 @@ #include "Primitive.h" #include "SortMethod.h" #include "math.h" // fabs +#include <cstdio> using namespace vrender ; using namespace std; Index: SConstruct =================================================================== --- SConstruct (revision 1453) +++ SConstruct (working copy) @@ -292,6 +292,7 @@ def CheckLib_maybeMT(conf,lib,header,lang,func): return conf.CheckLibWithHeader(lib+'-mt',['limits.h',header],'c++',func,autoadd=1) or conf.CheckLibWithHeader(lib,['limits.h',header],lang,func,autoadd=1) ok&=CheckLib_maybeMT(conf,'boost_date_time','boost/date_time/posix_time/posix_time.hpp','c++','boost::posix_time::time_duration::time_duration();') ok&=CheckLib_maybeMT(conf,'boost_thread','boost/thread/thread.hpp','c++','boost::thread::thread();') + CheckLib_maybeMT(conf,'boost_system','boost/system/error_code.hpp','c++','boost::system::error_code();') ok&=CheckLib_maybeMT(conf,'boost_filesystem','boost/filesystem/path.hpp','c++','boost::filesystem::path();') ok&=CheckLib_maybeMT(conf,'boost_iostreams','boost/iostreams/device/file.hpp','c++','boost::iostreams::file_sink("");') ok&=CheckLib_maybeMT(conf,'boost_regex','boost/regex.hpp','c++','boost::regex("");') @@ -422,7 +423,7 @@ env.Append(RPATH=runtimeLibDirs) # find already compiled but not yet installed libraries for linking #env.Append(LIBPATH=[os.path.join('#',x) for x in libDirs] # -floop-optimize2 is a gcc-4.x flag, doesn't exist on previous version -env.Append(LIBPATH=instLibDirs) # this is if we link to libs that are installed, which is the case now +env.Append(LIBPATH=instLibDirs+runtimeLibDirs) # this is if we link to libs that are installed, which is the case now ### this workaround is only needed for scons<=0.96.92, will disappear soon
_______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp