Jump to content
katang

What is SystemC library special in?

Recommended Posts

I am working in a CMake environment, compiling, building, documenting and packaging my app. It works fine, except when SystemC is involved. The other libraries, including flex, Qt, gtest, etc. do not cause similar messages.

The other options work fine also for SystemC, but when attempting to make a Debian package, I receive the message

CPack: Create package
CPackDeb: - Generating dependency list
CMake Error at /usr/share/cmake-3.5/Modules/CPackDeb.cmake:530 (message):
  CPackDeb: dpkg-shlibdeps: 'dpkg-shlibdeps: warning: binaries to analyze
  should already be installed in their package's directory

  dpkg-shlibdeps: error: couldn't find library libsystemc-2.3.1.so needed 

What is special with SystemC, or what do I wrong?

Share this post


Link to post
Share on other sites

The installation layout of the SystemC proof-of-concept library deviates from the standard layout commonly used on Linux. Therefore, SystemC is usually installed to a directory under /opt/. This may cause your problem with CPack. However, an experimental CMake-based build system has been added to the SystemC 2.3.2 public review release. Instructions for using it are contained in the text file cmake/INSTALL_USING_CMAKE. When building and installing SystemC using CMake, also the necessary configuration files for locating SystemC are installed. For example, a minimal CMakeLists.txt to compile the simple_perf SystemC example as a stand-alone application would be:

cmake_minimum_required(VERSION 3.1)
project(simple_perf CXX)

set (CMAKE_PREFIX_PATH /opt/systemc)
find_package(SystemCLanguage CONFIG REQUIRED)

set (CMAKE_CXX_STANDARD ${SystemC_CXX_STANDARD} CACHE STRING
     "C++ standard to build all targets. Supported values are 98, 11, and 14.")
set (CMAKE_CXX_STANDARD_REQUIRED ${SystemC_CXX_STANDARD_REQUIRED} CACHE BOOL
     "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.")

add_executable(simple_perf simple_perf.cpp)
target_link_libraries(simple_perf SystemC::systemc)

Please, give it a try and provide feedback so that remaining issues can be resolved.

Note though that CPack hasn't been considered so far in the implementation of the CMake-based build system for SystemC. Therefore, feedback on this aspect is even more interesting.

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

×