Add a New Comment (Rich Markup)
( Jump to the original submission )
Hi, You seem to have issues with TestFedTime and TestHlaTypes, which are targets from master that no longer exists in the branch dev-scalian/cvannier. Are you sure you do not have artifacts from previous compilation or configurations ? About building with clang, I personally set CC and CXX environment variables and let cmake use those. Moreover, I see in my Jenkins conf that clang 3.4 requires a special case : maybe this can help you, from my jenkins build recipe:
export CC=clang export CXX=clang++ if [[ "${Compiler}" == clang-3.4 ]]; then export CXX=clang++-libc++ fi cmake .. -DCMAKE_BUILD_TYPE=${Mode} -DCERTI_USE_NULL_PRIME_MESSAGE_PROTOCOL=${NullPrime} -DCOMPILE_UNIT_TESTS=ON -DCMAKE_INSTALL_PREFIX=../install
Best regards, Clément
Hi, It looks like you specified clang-3.8 as your C++ compiler:
-DCMAKE_CXX_COMPILER=clang-3.8
Can you try again by replacing this argument by
-DCMAKE_CXX_COMPILER=clang++-3.8
that invokes clang++ instead ?
Under Ubuntu 16.04 with branch dev-scalian/svannier, compilation with gcc 5.4.0 fails with [ 67%] Linking CXX executable TestFedTime libFedTimed.so.1.0.0: undefined reference to `typeinfo for RTI::Exception' Below are details: cxh@swarmnuc2008:~/src/certi$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial cxh@swarmnuc2008:~/src/certi$ git status On branch dev-scalian/cvannier Untracked files: (use "git add <file>..." to include in what will be committed) build/ nothing added to commit but untracked files present (use "git add" to track) cxh@swarmnuc2008:~/src/certi$ rm -rf build cxh@swarmnuc2008:~/src/certi$ mkdir build cxh@swarmnuc2008:~/src/certi$ cd build cxh@swarmnuc2008:~/src/certi/build$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/certi .. -- The CXX compiler identification is GNU 5.4.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- The C compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Native build. -- Target is 64 bits .... Then running make: [ 67%] Building CXX object libRTI/hla-1_3/CMakeFiles/TestFedTime.dir/TestFedTime.cc.o [ 67%] Linking CXX executable TestFedTime libFedTimed.so.1.0.0: undefined reference to `typeinfo for RTI::Exception' collect2: error: ld returned 1 exit status libRTI/hla-1_3/CMakeFiles/TestFedTime.dir/build.make:99: recipe for target 'libRTI/hla-1_3/TestFedTime' failed make[2]: * [libRTI/hla-1_3/TestFedTime] Error 1 CMakeFiles/Makefile2:1596: recipe for target 'libRTI/hla-1_3/CMakeFiles/TestFedTime.dir/all' failed make[1]: * [libRTI/hla-1_3/CMakeFiles/TestFedTime.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: * [all] Error 2 I also tried clang-3.6 and 3.8: cmake -DCMAKE_INSTALL_PREFIX=/usr/local/certi -DCMAKE_C_COMPILER=clang-3.8 -DCMAKE_CXX_COMPILER=clang-3.8 .. With clang-3.8, make failed with: [ 11%] Linking CXX executable TestHLAtypes CMakeFiles/TestHLAtypes.dir/TestHLAtypes.cc.o: In function `test0()': /home/cxh/src/certi/libHLA/TestHLAtypes.cc:27: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)' /home/cxh/src/certi/libHLA/TestHLAtypes.cc:28: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)' /home/cxh/src/certi/libHLA/TestHLAtypes.cc:29: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)'
Hi, Thank you for your test, and I'm glad it is now compiling on your platform. Don't hesitate to report any regression you may encounter if you use the new branch. Best regards, Clément
Hi Clément, The fix seems to work for me. I first tried to compile the master branch with
cmake -DCMAKE_INSTALL_PREFIX=$HOME/certi_builds ../
thus letting the system use my most recent compiler available, followed by
make -j8
This didn't work and showed the same error as previously stated -- an expected outcome. Switching to the dev-scalian/cvannier branch and executing the same commands rewarded me with a successful compilation. However I haven't tested the output of an HLA execution and thus cannot certify that the simulation runs the same way it does on the current origin/master. Nevertheless, compilation does work now. Best regards, Clément
Hi, Those issues should be solved on the branch dev-scalian/cvannier Can you try compiling on your system and keep us posted ? Best regards, Clément Vannier
I've installed CERTI on two different machines and experienced the same problem. On a CentOS-7 distribution, no error was noticed since the packages are not as recent as other distributions. However, on a Ubuntu 16.04 I experienced the same
undefined reference to `typeinfo for RTI::Exception'
as Sebastien. I was using gcc 5.4.0 build 5.4.0-6ubuntu1~16.04.2 I circumvented the issue by specifying an older version of clang and clang++ using
-DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-3.6
It worked and the build succeeded. Up to the moment of this post I did not have encountered any issue arising from this method of compilation.
As first reported here (https://lists.gnu.org/archive/html/certi-devel/2015-10/msg00005.html), compilation seems to fail on Ubuntu > 15.10 with GCC > 5.2. The error message looks like: libFedTimed.so.1.0.0: undefined reference to `typeinfo for RTI::Exception' it actually occurs when trying to link TestFedtime to libfedtime.so.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11