Jump to content
Sign in to follow this  
mayurkubavat

uvm-systemc undefined reference error

Recommended Posts

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 --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
Copyright © 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 

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
Sign in to follow this  

×