Jump to content

Systemc2.3.4 doesnot generate a .a file?

Recommended Posts

I have been trying to use Systemc2.3.4 instead of 2.3.3. I have installed 2.3.4 and have run a small sample program which ran. I am currently testing out the example provided within "/systemc/examples/sysc/". Whenever I run make for any of these programs I am met with:

make: *** No rule to make target '/opt/systemc/lib/libsystemc.a', needed by '-----.x'.  Stop.

I have checked /opt/systemc/lib/ and there are only .so files present! Did I do something wrong in terms of the installation? or should I be doing some editing in the makefiles for these programs? 

I should also point out that "make check" had 0 fails when I run it after make command. And that log showed the target for simple_fifo.x was built and successfully tested. What am I missing?

Link to comment
Share on other sites

How did you install your SystemC?

  1. autotools (i.e., mkdir build && cd build && ../configure --prefix=INSTALLDIR && make && make install)
  2. cmake (i.e., cmake -B build; cmake --build build; cmake --install build)

Did you *carefully* read the install instructions (every point) or did you just rush through without comprehending what each step does?

What platform (i.e., machine), OS (i.e., Ubuntu, CentOS, macOS, mingw, ...), OS version #, and compilers (i.e., GCC, LLVM) are you using?

What new features of SystemC 2.3.4 are you attempting to exploit?

Have you considered adding the SystemC lib path to your LD_LIBRARY_PATH environment variable (to capture the .so files)?


Link to comment
Share on other sites

  • 4 months later...

Hi @David Black, @febinpsunny

I started using SystemC a couple of months ago. I installed it on a Scientific Linux machine through make and I could get in the lib-linux64 (install folder) the following files:

  • libsystemc.so (a link to libsystemc-2.3.3.so)
  • libsystemc.a
  • libsystemc.la
  • libsystemc-2.3.3.so

Installing later the same tarball on a ubuntu22 machine through Cmake I could get:

  • libsystemc.so (a link to libsystemc.so.2.3.3)
  • libsystemc.so.2.3 (a link to libsystemc.so.2.3.3)
  • libsystemc.so.2.3.3

A part of the funny difference in the .so library, I do not find easily any doc about how to get the .a file, which I need to build static applications.

Any clues / links to doc? 



Link to comment
Share on other sites

Cmake envionment was setup to use dynamic shared objects rather than a single static library. You could modify the systemc cmake files to generate a static library with a bit of expertise in using cmake if you are certain you want a static implementation. I believe there is also a way to generate a static library from a shared object, but I don't have the knowledge in my head presently.

In any case, whether or not you use shared, static or a mix is not a part of the SystemC specification. It is an implementation detail relegated to your C++ knowledge.

Personally, I like the cmake solution better. I did have to modify some makefiles for an environment where somebody did not want to use cmake. You simply detect whether a `.a` file exists and add or omit the appropriate options. Quite simple if you are knowledgable about make.


Link to comment
Share on other sites

  • 1 month later...

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...