Closed rtrepos closed 5 years ago
Why vle.discrete-time link with the archive libvle-2.1?
An archive can not include any dependency. If you Link with static archive, you need to link to all dependencies of libvle (expat + pthread).
Indeed the vle.discrete-time archive is linked to vle libraries, and it looks like it is working if we remove the link. So maybe we have to remove the link for all the vle extensions. But for this specific bug, this is the compilation of the test executable from vle.discrete-time_test that does not work. And actually it is working on my computer (ubuntu 16.04) and not on genotool (CentOS).
By forcing the linking to both dl and pthreads (I modified the script VleBuildTest in VleUtilsConfig.cmake), linking works.
Are dl and pthreads missing in the vle-2.1.pc file ?
Yet, tests do not work since the ModuleManager cannot find the vle.output libraries : see bug #373
New updates on this bug (still on genologin cluster) :
By forcing the link to pthread and dl in VleUtilsConfig.cmake script for both executables and dynamics, linking work (temporary fix)
By creating a symbolic link 'lib' to 'lib64' in install directory of vle, one can provide a temporary fix to #373.
With these 2 temporary fixes, there is segmentaion fault on the vle.examples test_manager when we set more that 1 thread.
Can you give a gdb trace of this segfault?
0x0000000000460aec in isMatrix (this=0x7ffff000b770) at /home/rtrepos/save/vledev/vle/include/vle/value/Value.hpp:206 206 return getType() == Value::MATRIX; Missing separate debuginfos, use: debuginfo-install expat-2.1.0-8.el7.x86_64 glibc-2.17-157.el7.x86_64 (gdb) bt
On genologin, using module cmake-3.5, a static library is built despite the default BUILD_SHARED_LIBS=ON (and CMakeCache value ON) And if you reverse these two lines in src/vle/CMakelists.txt :
add_library(libvle ${libvle_sources}) option(BUILD_SHARED_LIBS "Build shared library" ON)
It will build a shared lib.
@quesnel can you confirm this please ?
Some of the vle packages can be compiled on genotoul. Error is due to undefined reference to pthread.
Eg. vle.discrete-time_test :
/home/rtrepos/save/install/vledev/lib64/libvle-2.1.a(Coordinator.cpp.o): dans la fonction « std::thread::thread<void (vle::devs::SimulatorProcessParallel::)(), vle::devs::SimulatorProcessParallel>(void (vle::devs::SimulatorProcessParallel::&&)(), vle::devs::SimulatorProcessParallel&&) »: /tools/compilers/gcc/5.3.0/include/c++/5.3.0/thread:137: référence indéfinie vers « pthread_create »