Jump to content
R_C

UVM-SystemC Compilation error (LINUX)

Recommended Posts

hi All,

I am trying to compile UVM-SC in linux (gcc version 4.1.2, SUSE Linux Enterprise Desktop 11 SP4) but it fails at 'gmake check' with the below error:

----------------------------------------------------------------------

sc_main.cpp:(.text._ZN3top11build_phaseERN3uvm9uvm_phaseE[top::build_phase(uvm::uvm_phase&)]+0x29): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
../../src/uvmsc/.libs/libuvm-systemc.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)'
../../src/uvmsc/.libs/libuvm-systemc.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<double>(double)'
../../src/uvmsc/.libs/libuvm-systemc.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)'
collect2: ld returned 1 exit status
gmake[3]: *** [simple/callbacks/basic/test] Error 1
gmake[3]: Leaving directory `/SystemC/UVMC/uvm-systemc-1.0-beta2/objdir/examples/uvmsc'
gmake[2]: *** [check-am] Error 2
gmake[2]: Leaving directory `/SystemC/UVMC/uvm-systemc-1.0-beta2/objdir/examples/uvmsc'
gmake[1]: *** [check-recursive] Error 1
gmake[1]: Leaving directory `/SystemC/UVMC/uvm-systemc-1.0-beta2/objdir/examples'
gmake: *** [check-recursive] Error 1
 

----------------------------------------------------------------------

Any idea what could be missing here? similar undefined messages are present in log befoe the collect2 ld error as well, not sure which symbols are missing.

 

Thanks

RC

Share this post


Link to post
Share on other sites

Looks like your libstdc++ found by the linker is not matching with your compiler version. Could you check that your LD_LIBRARY_PATH is setup correctly? As far as I remember GCC 4.1.2 is not the default system compiler version for SLES 11. So assuming that GCC 4.1.2 is probably residing in a different directory, you would have to adapt library search paths as well before running configure & make commands.

 

Share this post


Link to post
Share on other sites

Thanks Stephan, your comments were helpful. Examples work with the default version though i still need to figure out why it didn't work for gcc 4.1.2, LD_LIBRARY_PATH is correct for gcc but not sure about binutils PATH, will debug it further but at least i know that the problem is in setup, not the tar/code (which was anyways less likely). 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×