OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
errors when execute HelloWorld examples

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question
View previous topic :: View next topic  
Author Message
JungMin



Joined: 25 Jun 2017
Posts: 2

PostPosted: Mon Jul 03, 2017 9:17 pm    Post subject: errors when execute HelloWorld examples Reply with quote

Hello! when i execute HelloWorld examples(usingCPP, usingSystemC) i got these error messages. i think its a kind of complie problem. How can i fix it? plz help me

Code:

make: Entering directory '/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/application'
make: Nothing to be done for 'all'.
make: Leaving directory '/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/application'
make: Entering directory '/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness'
# Host Compiling Harness obj/Linux32/harness.o
# Host Linking Harness harness.Linux32.exe
obj/Linux32/harness.o: In function `or1k::or1k(op::module&, char const*, op::params)':
/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness/or1k_generic.hpp:27: undefined reference to `op::processor::processor(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, op::params)'
obj/Linux32/harness.o: In function `top::top(char const*)':
/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness/harness.cpp:52: undefined reference to `op::memory::memory(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, optPrivE)'
/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness/harness.cpp:52: undefined reference to `op::bus::bus(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)'
/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness/harness.cpp:54: undefined reference to `op::bus::connect(op::processor&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness/harness.cpp:55: undefined reference to `op::bus::connect(op::processor&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness/harness.cpp:56: undefined reference to `op::bus::connect(op::memory&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, unsigned long long)'
collect2: error: ld returned 1 exit status
/root/Workplace/OVPsim/ImperasLib/buildutils/Makefile.harness:102: recipe for target 'harness.Linux32.exe' failed
make: *** [harness.Linux32.exe] Error 1
make: Leaving directory '/root/Workplace/OVPsim/Examples/HelloWorld/usingCPP/harness'
./example.sh: 15: ./example.sh: ./harness/harness.Linux32.exe: not found
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Thu Jul 06, 2017 3:29 am    Post subject: Reply with quote

This looks like the libRuntimeLoader++ is not being linked correctly. Is the Imperas environment correctly setup?

Please can you see what the command line that is being invoked looks like by adding VERBOSE=1 to your command line.
Back to top
View user's profile Send private message Visit poster's website
JackLyu



Joined: 04 Sep 2017
Posts: 4

PostPosted: Mon Sep 25, 2017 11:12 pm    Post subject: Reply with quote

Dear Sir,

I also encountered the same problem when I compiled SystemC_TLM example. Can you help me to resolved this problem? Very thanks for your help.

Code:

$ make VERBOSE=1
# iGen Generate Platform files
igen.exe --batch platform.tcl --writetlm platform.cpp \
         --quiet --nobanner --excludem GPT_NH --excludem GPT_UFNR       \
        --overwrite --op --output igen.log
# Build platform.Windows32.exe
make -f C:\Imperas/ImperasLib/buildutils/Makefile.TLM.platform \
                        NOVLNV=1 SRC=platform.cpp OPTLM=1
make[1]: Entering directory `/home/jack/SystemC_TLM/platform_cpp'
# Depending Build/Windows32/usr/platform.d
g++ -MM platform.cpp -IC:\Imperas/ImpPublic/include/host -IC:\systemc-2.3.2/include -IC:\Imperas/ImperasLib/source  -g -Wno-long-long -Wall -Werror -DSC_INCLUDE_DYNAMIC_PROCESSES -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -m32 -static-libgcc  -MT Build/Windows32/usr/platform.o -MF Build/Windows32/usr/platform.d
make[1]: Leaving directory `/home/jack/SystemC_TLM/platform_cpp'
make[1]: Entering directory `/home/jack/SystemC_TLM/platform_cpp'
# Compiling Build/Windows32/usr/platform.o
g++ -c -o Build/Windows32/usr/platform.o platform.cpp -IC:\Imperas/ImpPublic/include/host -IC:\systemc-2.3.2/include -IC:\Imperas/ImperasLib/source  -g -Wno-long-long -Wall -Werror -DSC_INCLUDE_DYNAMIC_PROCESSES -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -m32 -static-libgcc
# Linking platform.Windows32.exe
g++ -o platform.Windows32.exe Build/Windows32/usr/platform.o    -LC:\Imperas/bin/Windows32 -lRuntimeLoader C:\systemc-2.3.2/lib-mingw/libsystemc.a  -lRuntimeLoader++ -m32 -static-libgcc
Build/Windows32/usr/platform.o: In function `ZN2cw13tlmPeripheralC2ERNS_9tlmModuleENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7sc_core14sc_module_nameE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmPeripheral/1.0/tlm/tlmPeripheral.hpp:81: undefined reference to `op::peripheral::peripheral(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw13tlmPeripheralC2ERNS_9tlmModuleENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7sc_core14sc_module_nameEN2op6paramsE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmPeripheral/1.0/tlm/tlmPeripheral.hpp:92: undefined reference to `op::peripheral::peripheral(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, op::params)'
Build/Windows32/usr/platform.o: In function `ZN2cw12tlmProcessorC2ERNS_9tlmModuleENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7sc_core14sc_module_nameE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmProcessor/1.0/tlm/tlmProcessor.hpp:134: undefined reference to `op::processor::processor(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw12tlmProcessorC2ERNS_9tlmModuleENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7sc_core14sc_module_nameEN2op6paramsE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmProcessor/1.0/tlm/tlmProcessor.hpp:151: undefined reference to `op::processor::processor(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, op::params)'
Build/Windows32/usr/platform.o: In function `ZN2cw16tlmBusMasterPortC2ERNS_9tlmModuleEPNS_12tlmProcessorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:365: undefined reference to `op::bus::connect(op::processor&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw16tlmBusMasterPortC2ERNS_9tlmModuleEPNS_13tlmPeripheralENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:379: undefined reference to `op::bus::connectMaster(op::peripheral&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw15tlmBusSlavePortC2ERNS_9tlmModuleEPNS_13tlmPeripheralENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEy':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:429: undefined reference to `op::bus::bus(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)'
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:433: undefined reference to `op::bus::connectSlave(op::peripheral&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long long, unsigned long long)'
Build/Windows32/usr/platform.o: In function `ZN2cw22tlmBusDynamicSlavePortC2ERNS_9tlmModuleEPNS_13tlmPeripheralENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:556: undefined reference to `op::bus::bus(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)'
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:560: undefined reference to `op::bus::connectSlave(op::peripheral&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:561: undefined reference to `op::peripheral::addPortMapCB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void (*)(void*, unsigned long long, unsigned long long, bool), void*)'
Build/Windows32/usr/platform.o: In function `ZN2cw15tlmNetInputPortC2ERNS_9tlmModuleEPNS_12tlmProcessorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmNetPort/1.0/tlm/tlmNetPort.hpp:59: undefined reference to `op::net::net(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw15tlmNetInputPortC1ERNS_9tlmModuleEPNS_12tlmProcessorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmNetPort/1.0/tlm/tlmNetPort.hpp:59: undefined reference to `op::net::net(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw15tlmNetInputPortC2ERNS_9tlmModuleEPNS_13tlmPeripheralENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmNetPort/1.0/tlm/tlmNetPort.hpp:67: undefined reference to `op::net::net(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw15tlmNetInputPortC1ERNS_9tlmModuleEPNS_13tlmPeripheralENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmNetPort/1.0/tlm/tlmNetPort.hpp:67: undefined reference to `op::net::net(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN6simpleC2EN7sc_core14sc_module_nameE':
C:\MinGW\msys\1.0\home\jack\SystemC_TLM\platform_cpp/platform.sc_constructor.igen.h:51: undefined reference to `op::extension::extension(op::processor&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Build/Windows32/usr/platform.o: In function `ZN2cw10tlmBusStubC1ERNS_9tlmModuleENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:44: undefined reference to `op::bus::bus(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)'
Build/Windows32/usr/platform.o: In function `ZN2cw11tlmDMIslaveC1ERN2op3busENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_12tlmProcessorERN3tlm19tlm_generic_payloadERN9tlm_utils23simple_initiator_socketIS0_Lj32ENSC_23tlm_base_protocol_typesEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:137: undefined reference to `op::busDMISlave::busDMISlave(op::bus&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, op::processor*, bool)'
Build/Windows32/usr/platform.o: In function `ZN2cw11tlmDMIslaveC1ERN2op3busENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_13tlmPeripheralERN3tlm19tlm_generic_payloadERN9tlm_utils23simple_initiator_socketIS0_Lj32ENSC_23tlm_base_protocol_typesEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmBusPort/1.0/tlm/tlmBusPort.hpp:148: undefined reference to `op::busDMISlave::busDMISlave(op::bus&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
Build/Windows32/usr/platform.o: In function `ZN2cw16tlmNetOutputPortC1ERNS_9tlmModuleEPNS_13tlmPeripheralENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE':
C:/Imperas/ImperasLib/source/ovpworld.org/modelSupport/tlmNetPort/1.0/tlm/tlmNetPort.hpp:90: undefined reference to `op::netWithCallback::netWithCallback(op::module&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [platform.Windows32.exe] Error 1
make[1]: Leaving directory `/home/jack/SystemC_TLM/platform_cpp'
make: *** [platform.Windows32.exe] Error 2
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Tue Sep 26, 2017 3:43 am    Post subject: Reply with quote

I cannot re-produce the problem you are having so I can only assume that something is not setup correctly.
You do not say but I assume this is compiling the example platform found at IMPERAS_HOME\Examples\PlatformConstruction\SystemC_TLM in the platform_cpp directory that is generated using the iGen tool?

I noticed that you are using 'systemc-2.3.2', I am using v2.3.0 and can only find v2.3.1a on the accelera website so wondering where this is from?

This looks as though the RuntimeLoader library is not being found. It should be in the installation at C:\Imperas\bin\Windows32. You should find the following files
libRuntimeLoader++.dll
libRuntimeLoader++.lib
libRuntimeLoader.dll
libRuntimeLoader.lib

Let me know if you can find a solution ...
Back to top
View user's profile Send private message Visit poster's website
JackLyu



Joined: 04 Sep 2017
Posts: 4

PostPosted: Tue Sep 26, 2017 5:10 am    Post subject: Reply with quote

Dear Sir,

1. Yes, this example is IMPERAS_HOME\Examples\PlatformConstruction\SystemC_TLM and I referred chapter 4 of OVPsim_Using_OVP_Models_in_SystemC_TLM2.0_Platforms.pdf to do it.

2. You can download it from http://www.accellera.org/downloads/drafts-review. I used it because my GCC version is 6.3.0-1

3. I can find these four files on ${IMPERAS_HOME}/bin/Windows32/

I had tried to solve this problem two days......and I had no idea how to do that...Orz... HELP.......
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Tue Sep 26, 2017 5:52 am    Post subject: Reply with quote

I wonder if this is related to the version of GCC you are using.

OVP has provided versions of GCC for use in the MINGW environment to compile its examples.
These can be found on the resources page http://www.ovpworld.org/resources/windows as the two zip packages (Windows32 hosts) mingw-w32-bin_i686-mingw_20111031_sezero.zip and (Windows64 hosts) mingw-w64-bin_i686-mingw_20111031_sezero.zip
they should be extracted and added to your PATH before other host toochains.

Please can you try this host toolchain?
Back to top
View user's profile Send private message Visit poster's website
JackLyu



Joined: 04 Sep 2017
Posts: 4

PostPosted: Tue Sep 26, 2017 6:49 pm    Post subject: Reply with quote

Dear Sir,

I installed MinGW and MYSY followed by installation guide. But for compile SystemC library (g++), I install another version. Does OVP have any recommend g++ version?

Thanks.
Back to top
View user's profile Send private message
JackLyu



Joined: 04 Sep 2017
Posts: 4

PostPosted: Wed Sep 27, 2017 1:18 am    Post subject: Reply with quote

Dear Sir,

I resolved this problem when I removed whole environment of MinGW and MSYS then install related tool based on your recommend without other GCC version. It seems GCC version problem.
Thanks for your help.

BRs,
Jack
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Information regarding OVP © 2008-2022 Imperas Software