Jump to content

SCV error on peekRandom function

Recommended Posts

Hi I have compiled scv-2.0.1 and after link it to my project I'm having trouble with this error. Can somebody help? Thanks


scv-2.0.1/src/scv/scv_bag.h:489:16: error: cannot assign to non-static data member within const member function 'peekRandom'
      _randomP = new scv_random(nameP(),_seed);
      ~~~~~~~~ ^


Link to comment
Share on other sites


After a clean compile with g++ (version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)), at executing 'gmake check' I get the following errors:

gmake[4]: Entering directory `/scv-2.0.1/objdir/examples/data_structures/scv_bag'
g++ -DHAVE_CONFIG_H -I. -I../../../../examples/data_structures/scv_bag -I../../../config  -I/opt/eda/verilator/systemc-2.3.3/include -I../../../../src  -Wall -Wformat -O2 -g -MT scv_bag-test.o -MD -MP -MF .deps/scv_bag-test.Tpo -c -o scv_bag-test.o `test -f 'test.cc' || echo '../../../../examples/data_structures/scv_bag/'`test.cc
mv -f .deps/scv_bag-test.Tpo .deps/scv_bag-test.Po
/bin/sh ../../../libtool  --tag=CXX   --mode=link g++ -Wall -Wformat -O2 -g -R/opt/eda/verilator/systemc-2.3.3/lib-linux64  -o scv_bag scv_bag-test.o ../../../src/scv/libscv.la -lsystemc 
libtool: link: warning: library `/opt/eda/verilator/systemc-2.3.3/lib-linux64/libsystemc.la' was moved.
libtool: link: warning: library `/opt/eda/verilator/systemc-2.3.3/lib-linux64/libsystemc.la' was moved.
libtool: link: warning: library `/opt/eda/verilator/systemc-2.3.3/lib-linux64/libsystemc.la' was moved.
libtool: link: g++ -Wall -Wformat -O2 -g -o .libs/scv_bag scv_bag-test.o  ../../../src/scv/.libs/libscv.so -L/opt/eda/verilator/systemc-2.3.3/lib-linux64 /opt/eda/verilator/systemc-2.3.3/lib-linux64/libsystemc.so -lpthread -pthread -Wl,-rpath -Wl,scv-2.0.1/build/lib-linux64 -Wl,-rpath -Wl,/opt/eda/verilator/systemc-2.3.3/lib-linux64
scv_bag-test.o: In function `__static_initialization_and_destruction_0':
/opt/eda/verilator/systemc-2.3.3/include/sysc/kernel/sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_3_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_3_cxx199711L(sc_core::sc_writer_policy)'
collect2: error: ld returned 1 exit status
gmake[4]: *** [scv_bag] Error 1
gmake[4]: Leaving directory `scv-2.0.1/objdir/examples/data_structures/scv_bag'
gmake[3]: *** [check-am] Error 2
gmake[3]: Leaving directory `scv-2.0.1/objdir/examples/data_structures/scv_bag'
gmake[2]: *** [check-recursive] Error 1
gmake[2]: Leaving directory `scv-2.0.1/objdir/examples/data_structures'
gmake[1]: *** [check-recursive] Error 1
gmake[1]: Leaving directory `scv-2.0.1/objdir/examples'
gmake: *** [check-recursive] Error 1


Link to comment
Share on other sites

It seems that you are mixing compiler versions and/or settings between the different packages you use. At least, your SystemC installation has not been built with the default GCC 4.8.5. Although not strictly necessary, I'd recommend to build SystemC, UVM-SystemC and SCV with the same compiler version and -options.

I can confirm that with GCC 4.8.5, the SCV 'make check' also runs successfully.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...