Closed blattms closed 6 years ago
mblatt@smaug:~/src/dune/opm/opm-parser/opm-parallel-dbg$ make [ 1%] Updating version information [ 1%] Built target update-version [ 2%] Built target opmjson [ 10%] Built target genkw [ 41%] Built target opmparser [ 42%] Linking CXX executable bin/WellTests /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status CMakeFiles/WellTests.dir/build.make:109: recipe for target 'bin/WellTests' failed make[2]: *** [bin/WellTests] Error 1 CMakeFiles/Makefile2:137: recipe for target 'CMakeFiles/WellTests.dir/all' failed make[1]: *** [CMakeFiles/WellTests.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 mblatt@smaug:~/src/dune/opm/opm-parser/opm-parallel-dbg$ git log -1 commit 84c556c9e5b47c4c28d6d7ba354c11b9d0921050 Merge: 14a226d5 d89e1c02 Author: Atgeirr Fl<C3><B8> Rasmussen <atgeirr@sintef.no> Date: Wed Feb 14 09:16:42 2018 +0100 Merge pull request #1199 from akva2/old_is_the_new_new changed: switch to the shared opm build system
Full linker line is:
usr/bin/c++ -std=c++14 -O0 -g -pipe -Wall -Wno-unknown-pragmas -pthread -Wl,--enable-new-dtags CMakeFiles/WellTests.dir/lib/eclipse/tests/WellTests.cpp.o -o bin/WellTests -Wl,-rpath,/home/mblatt/src/dune/opm/opm-parser/opm-parallel-dbg/lib:/home/mblatt/src/dune/3rdParty/libecl/lib -rdynamic lib/libopmparser.so.2018.04 -lpthread -lboost_system -lboost_filesystem -lboost_regex /home/mblatt/src/dune/3rdParty/libecl/lib/libecl.so.2.3 -lm -ldl -pthread -llapack -lblas -lz lib/libopmjson.so /home/mblatt/src/dune/3rdParty/libecl/lib/libecl.so.2.3 -lboost_unit_test_framework -lboost_filesystem -lm -ldl -pthread -llapack -lblas -lz
This might be connected to requesting shared libraries with -DBUILD_SHARED_LIBS=ON
-DBUILD_SHARED_LIBS=ON
Found the issue (missing BOOST_TEST_DYN_LINK definition) and will propose a fix.
Save your effort, i am hours ahead of you - opened the prs for this earlier today.
Full linker line is:
This might be connected to requesting shared libraries with
-DBUILD_SHARED_LIBS=ON