Jump to content
mafalk

Installation Problem with SystemC 2.3.0 and Ubuntu 64 bit

Recommended Posts

Hey,

 

i use the SystemC 2.3.0 Library on a Ubuntu 64 bit System but it doesn't work. Can someone give me an installation tutorial? A Step-by-Step tutorial with explanations would be nice. The tutorials that i found by Google didn't work.

Thank you for your help.

 

Best regards,

 

Malte

Share this post


Link to post
Share on other sites

I am using SystemC 2.3.0 Library on Ubuntu 64 bit system. I have followed instructions on the below link. It helped me. Hope that helps you also.

 

http://vinaydvd.wordpress.com/2012/05/30/installing-systemc-in-ubuntu/

Hello Sir,

Most of these online tutorials are hopelessly outdated and thus

worthless. For example, www.asic-world.com - has examples

compiled with SystemC 2.1, and now we are using SystemC

2.3. As Mr. Alan Fitch has very rightly pointed out, please use

the instructions in the INSTALL file included in the source code

tar file. Hope that helps.

Share this post


Link to post
Share on other sites

Hello Sir dakupoto,

I completely agree with you.

As a beginner to SystemC(or C/C++ programming in general), I had faced some issues when trying to use SystemC after its installation(following instructions in INSTALL) on my Ubuntu system.

I was unable to link SystemC shared library. Later I figured out LD_LIBRARY_PATH variable was not set somehow which caused me trouble. This is when the above link came to my rescue.

 

As a beginner, I am not sure if this has to be taken care by user or installation process itself.

Share this post


Link to post
Share on other sites

The LD_LIBRARY_PATH issue cannot be taken care of by the installer since that would mean a very delicate modification of users' home "dot" files and is very dependent on features that are not easy to infer. As somebody observed, SystemC is a C++ library and there is a fundamental expectation that you are competent in C++. I would not suggest anybody try to learn SystemC without first mastering C++. Sort of like asking somebody to read complex novel before they even know how to read. 

 

That said, if LD_LIBRARY_PATH is the only issue, which I doubt, then it depends on:

1. Which shell you are using (probably BASH)

2. Where you installed SystemC (not where you expanded the tarball

3. The architecture of your host computer (e.g. x86 or x86_64 etc...)

 

Assuming you installed in a directory such as $HOME/systemc-2.3, and assuming BASH, and assuming you are on x86_64, then likely you need a command like:

 

  SYSTEMC_HOME=$HOME/systemc-2.3

  if [[ "$LD_LIBRARY_PATH" == "" ]]; then

      LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYSTEMC_HOME/lib-linux64

  else

      LD_LIBRARY_PATH=$SYSTEMC_HOME/lib-linux64

  fi

 

Again, read the INSTALL file for Linux carefully.

Share this post


Link to post
Share on other sites

Hello Sir dakupoto,

I completely agree with you.

As a beginner to SystemC(or C/C++ programming in general), I had faced some issues when trying to use SystemC after its installation(following instructions in INSTALL) on my Ubuntu system.

I was unable to link SystemC shared library. Later I figured out LD_LIBRARY_PATH variable was not set somehow which caused me trouble. This is when the above link came to my rescue.

 

As a beginner, I am not sure if this has to be taken care by user or installation process itself.

Hello Sir,

If as you say you are a beginner to C/C++, please brush up on your C/C++ very well,

before you attempt SystemC. SystemC is basically a C++ library and is based on one

of the most advanced features of the language - "templates". If you plunge into SystemC

right off, you will run into rough weather. So please devote at least a month or so so,

get grips on the C++ langauge features and then get into SystemC. Hope that helps.

Share this post


Link to post
Share on other sites

Hello,

 

i am trying to install SystemC with the instructions in the INSTALL-File. But i can't set the environment variable. When i type "setenv CXX g++" i get the Error-Message setenv is not known. What do i wrong? I am a Newbie on Linux but i need it for my study. Can anyone help me?

 

Best regards,

 

Malte

Share this post


Link to post
Share on other sites

OK, two answers - firstly, it'll probably work without that, assuming you have a c++ compiler installed, so you could just leave that out completely.

 

Second answer - setenv is specific to c-shell. You're probably running bash, in that case the equivalent command is

 

export CXX=g++

 

regards

Alan

Share this post


Link to post
Share on other sites

Hi

 

I used to run my systemC program in linux terminal. Now I am trying to use Eclipse as an IDE. I am using Ubuntu 14.4 on a 64bit platform. I followed the steps in INSTALL file.

I have no problem in compiling the code but when I want to execute the program I get the following error message:

 

/home/hossein/SystemCEclipse/SystemC/Debug/SystemC: error while loading shared libraries: libsystemc-2.3.1.so: cannot open shared object file: No such file or directory

 

I assume that I have problems in linking the libraries. In Eclipse I have done the following:

1- I have add systemc-2.3.1/include to include paths in GCC C++ compiler

2- I have add systemc in GCC C++ Linker/Libraries and I have add systemc-2.3.1/lib-linux64 to GCC C++ Linker/Library search path

 

any help would be highly appericiated

 

EDIT: After a few try, I finally find the solution! I forgot to configure the systemc library (libsystemc2.3.1) to linux library path here is how to do it:

sudo ln -s /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so /usr/lib/libsystemc-2.3.0.so

I found the solution in this website

Share this post


Link to post
Share on other sites

Making a soft link works,but is a bit hacky. If you want a library to appear in the library linker path for all users, you should add it using ldconfig. Add your library information into /etc/ld.conf, then run ldconfig to add it to the system path. Also in your solution you've linked libsystemc2.3.1.so to libsystemc2.3.0 which suggests something else is wrong with your setup (i.e. mixing up 2.3.0 and 2.3.1).

 

However your original approach (adding the library path to Eclipse, and adding systemc to the linker list) should have worked.

 

It's a mystery...

 

regards

Alan

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

×