
DavidA
Members-
Content Count
10 -
Joined
-
Last visited
About DavidA
-
Rank
Member
Profile Information
-
Gender
Not Telling
-
Hi I build libsystemc.a (version 2.3.3) using the following CMake configuration on Centos 7 using gcc 7.3.1: cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/g++ -DCMAKE_POSITION_INDEPENDENT_CODE=True .. When I link to my C++ application on Centos 7 it links and runs fine. But when I link to the same libsystemc.a on Ubuntu 18.04 (which uses g++ 7.4.0) I get runtime link error: undefined symbol: _ZNK5sc_dt8sc_fxnum9to_stringB5cxx11ENS_9sc_numrepE ( sc_dt::sc_fxnum::to_string[abi:cxx11](sc_dt::sc_numrep) cons
-
I fixed this by specifying the devtoolset-7 g++ compiler to CMake: $ cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/g++ .. The problem was caused by CMake using the default Centos 7 g++ compiler (v.4.8.5) which presumably doesn't support C++14.
-
I am using a static library. Here is the output: $ nm -C /data/daldrich/systemc-2.3.3/systemc-2.3.3/build/systemc-2.3.3-install/lib64/libsystemc.a | grep sc_api_version 0000000000000690 T sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc _core::sc_writer_policy) 0000000000000690 T sc_core::sc_api_version_2_3_3_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx201103L(sc _core::sc_writer_policy) 0000000000000030 b sc_core::sc_api_version_2_3_3_cxx201103L
-
Sorry, I didn't show the application compile command: /opt/rh/devtoolset-7/root/usr/bin/g++ -DSYSTEMC -Dzodiac_EXPORTS -I../../Kernel -I/data/daldrich/systemc-2.3.3/systemc-2.3.3/src -O3 - DNDEBUG -Wall -pedantic -pthread -std=c++14 -MD -MT CMakeFiles/zodiac.dir/Kernel/main.cpp.o -MF CMakeFiles/zodiac.dir/Kernel/main.cpp.o.d - o CMakeFiles/zodiac.dir/Kernel/main.cpp.o -c ../../Kernel/main.cpp So I do specify "-std=c++14" there. And the link command repeated from original post: /opt/rh/devtoolset-7/root/usr/bin/g++ -O3 -DNDEBUG -Wl,--export-dynamic -rdynamic CMakeFiles/zo
-
Hi, I am building a SystemC application on Centos 7 using gcc 7.3.1 (devtoolset-7). Linkage of my application fails with error: main.cpp:(.text.startup+0x2e): undefined reference to `sc_core::sc_api_version_2_3_3_cxx201402L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_> ::sc_api_version_2_3_3_cxx201402L(sc_core::sc_writer_policy)' I can see that this error has been discussed in other forum topics and is caused by a mismatch of the C++ Standard. Therefore, I have checked that I am building both SystemC and the application using C++14. But I still see the error. I
-
I am also seeing this issue. How can users raise issues against the SystemC libraries? Is a fix planned?