febinpsunny Posted January 25, 2023 Report Share Posted January 25, 2023 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? Quote Link to comment Share on other sites More sharing options...
David Black Posted January 26, 2023 Report Share Posted January 26, 2023 How did you install your SystemC? autotools (i.e., mkdir build && cd build && ../configure --prefix=INSTALLDIR && make && make install) 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)? Quote Link to comment Share on other sites More sharing options...
Lorenzo C Posted June 26, 2023 Report Share Posted June 26, 2023 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? Quote Link to comment Share on other sites More sharing options...
David Black Posted June 28, 2023 Report Share Posted June 28, 2023 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. Quote Link to comment Share on other sites More sharing options...
maehne Posted August 28, 2023 Report Share Posted August 28, 2023 Check cmake/INSTALL_USING_CMAKE for instructions how to build static libraries using a CMake-based build. Basically, BUILD_SHARED_LIBS needs to be set to OFF. 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.