mayurkubavat Posted August 10, 2016 Report Share Posted August 10, 2016 i'm getting below error while running an example code, ('make check' command in uvm-systemc-1.0/objdir works fine.) My run script, #!/usr/bin/perl use warnings; use strict; sub main(); my $CLIBS = "/home/mayur/DV/systemc-2.3.1/lib-linux64"; my $UVMCLIBS = "/home/mayur/DV/uvm-systemc-1.0/lib-linux64"; my $CINC = "/home/mayur/DV/systemc-2.3.1/include"; my $UVMCINC = "/home/mayur/DV/uvm-systemc-1.0/include"; my $INC = "-I../test -I../top -I../env -I../master_agent -I../slave_agent"; main(); sub main(){ system "g++ $INC -I$CINC -I$UVMCINC -L$CLIBS -lsystemc -L$UVMCLIBS -luvm-systemc ../top/top.cpp -o sim -Wl,-rpath,$CLIBS -Wl,-rpath,$UVMCLIBS"; system "./sim"; } Here is first few lines from the error, /tmp/ccKh62WJ.o: In function `sc_main()': top.cpp:(.text+0x80): undefined reference to `uvm::run_test(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccKh62WJ.o: In function `uvm::get_report_object()': top.cpp:(.text._ZN3uvm17get_report_objectEv[_ZN3uvm17get_report_objectEv]+0x5): undefined reference to `uvm::uvm_report_object::get()' /tmp/ccKh62WJ.o: In function `uvm::uvm_object_wrapper::~uvm_object_wrapper()': top.cpp:(.text._ZN3uvm18uvm_object_wrapperD2Ev[_ZN3uvm18uvm_object_wrapperD5Ev]+0x20): undefined reference to `uvm::uvm_report_object::~uvm_report_object()' /tmp/ccKh62WJ.o: In function `uvm::uvm_object_wrapper::uvm_object_wrapper(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': top.cpp:(.text._ZN3uvm18uvm_object_wrapperC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN3uvm18uvm_object_wrapperC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1f): undefined reference to `uvm::uvm_report_object::uvm_report_object(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccKh62WJ.o: In function `uvm::uvm_component_name::uvm_component_name(char const*)': top.cpp:(.text._ZN3uvm18uvm_component_nameC2EPKc[_ZN3uvm18uvm_component_nameC5EPKc]+0x25): undefined reference to `uvm::uvm_root::get()' /tmp/ccKh62WJ.o: In function `uvm::uvm_env::uvm_env(uvm::uvm_component_name)': top.cpp:(.text._ZN3uvm7uvm_envC2ENS_18uvm_component_nameE[_ZN3uvm7uvm_envC5ENS_18uvm_component_nameE]+0x42): undefined reference to `uvm::uvm_component::uvm_component(uvm::uvm_component_name)' /tmp/ccKh62WJ.o: In function `uvm::uvm_test::uvm_test(uvm::uvm_component_name)': What could be the issue? Other details: gcc --versiongcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609Copyright © 2015 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Quote Link to comment Share on other sites More sharing options...
apfitch Posted August 10, 2016 Report Share Posted August 10, 2016 I'm not sure, but try moving -luvm-systemc before -lsystemc Alan Quote Link to comment Share on other sites More sharing options...
Stephan Gerth Posted August 11, 2016 Report Share Posted August 11, 2016 Alan's right, -luvm-systemc should be left of -lsystemc as it depends on its symbols. Quote Link to comment Share on other sites More sharing options...
mayurkubavat Posted August 12, 2016 Author Report Share Posted August 12, 2016 I've tried with that. Getting same error. Also, with the same set of files I've followed exact procedure in Fedora 20, there run script works fine. Have issues with Ubuntu only. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.