How to install SystemC on Fedora
This may not apply to other Linux distributions.
Because SystemC’s OSCI license restricts the distribution of SystemC™‘s sources, Fedora cannot ship the RPM. You can learn more about the effort we’ve put to solve this license issue, but in vain. SystemC is even not compatible with RPMFusion repositories.
This tutorial also points out to some complementary tools that Fedora provides which will make your Electronic System Level(ESL) experience more exciting.
License for SRPM and patches
The following files are all under the MIT feh variant license:
- systemc.spec
- systemc-2.2.0-utils.patch
- systemc-2.2.0-fx_utils.patch
- systemc-2.2.0-fxnum.patch
- systemc-2.2.0-proxy.patch
- systemc-2.2.0-fx_rep.patch
Special thanks to TomCallaway and Red Hat lawyers who helped me during that licensing process.
Advantages of using this tutorial
This tutorial focusses on creating an RPM for systemc. Thus it makes it portable to install on other computers. The RPM is created from the systemc.spec spec file. The spec file applies the respective patches automatically. It also incorporates:
- fixes for the Fedora supported GCC version (F-11: gcc-4.4.0)
- a shared library instead of a static library, with executable-stack rpmlint warning fixed
- proper compilation flags
- parallel installations of different versions of SystemC
The main intention of this tutorial is to spend less time on compiling SystemC, but to get the most of it while using it for ESL design.
Preparing your Fedora box
As root,
# yum install fedora-packager
Install the build requirements:
# yum install gcc-c++ autoconf automake16 prelink
As a normal user (non root),
$ rpmdev-setuptree
(this will create a directory rpmbuild under your home directory)
Building the RPM
As mentioned above, I can not distribute the sources of SystemC. You will have to download it from its website, and copy the sources to the $HOME/rpmbuild/SOURCES.
Download the required files needed to build the RPM from here.
Copy the patches and systemc-SRPM.license to $HOME/rpmbuild/SOURCES.
Copy the spec file to $HOME/rpmbuild/SPECS/systemc.spec.
$ rpmbuild -ba systemc.spec
The generated RPMs are
- systemc-2.2.0-8.fc11.src.rpm (source rpm: SRPM)
- systemc-2.2.0-8.fc11.i586.rpm
- systemc-debuginfo-2.2.0-8.fc11.i586.rpm (debug RPM)
Installing the RPM
# rpm -Uvh systemc-2.2.0-8.fc11.i586.rpm
(as root)
Parallel installations
The generated RPM will automatically install SystemC into the /usr/lib/systemc/2.2.0/ directory(SYSTEMC_HOME).
If you want to install other versions of SystemC, update (on the spec file) the
- %{name} tag to systemc-v1 and
- %{version} tag
This %{version} tag will set the installation directory to /usr/lib/systemc/%{version}. It may happen that the patches will fail if the SystemC version you want is not 2.2.0.
If you are using this installation process, you can therefore determine the installed parallel installations of SystemC with
$ rpm -qa | grep systemc
Complementary tools
Fedora Electronic Lab is not only about shipping EDA tools, but to enhance electronic hardware design. Below are some tools which may be very useful to you.
- Automatic indentation of C files
$ man indent
- Fedora Eclipse IDE with version controlled support
# yum install eclipse-cdt
SVN support: eclipse-subclipse
GIT support: eclipse-egit
- EMAC addons
# yum install emacs-systemc-mode emacs-vregs-mode
- SystemPerl
It is designed to expand text so that needless repetition in the language is minimized. By using sp_preproc, SystemPerl files can be expanded into C++ files at compile time, or expanded in place to make them valid stand-alone SystemC files.
# yum install perl-SystemPerl
If you are using Fedora-Eclipse, eclipse-epic will add Perl support to your eclipse.
# yum install eclipse-epic
- SystemC-Vregs
Utility routines used by vregs
# yum install SystemC-Vregs
- Verilator
(coming soon on Fedora)
It compiles Verilog code into C++/SystemC Code.
# yum install verilator
- Automating documentation generation
$ yum install doxygen
$ man doxygen
Soon, Fedora will ship an eclipse plugin for doxygen.
Disclaimer
I personally use this installation process. I don’t represent any company and I don’t have any hard feelings against any company. This installation process works for me and while sharing this with you, I’m hoping you will get a better design experience with Fedora Electronic Lab. However I am not responsible if it does not work for you, but I’ll be glad to hear from you if it didn’t work so that we can fix it.
Filed under: fedora, Free Electronic Lab, systemc

It’s only now that I noticed that you changed address since I was on holiday … I added the wordpress site to the Mauritius Blog List. Cheers
Thanks, yes, I was being spammed on blogger, hence switch to wordpress
What about https://www-asim.lip6.fr/trac/systemcass/ ?
Thanks Samuel,
I’ve created a ticket for it
https://fedorahosted.org/fedora-electronic-lab/ticket/37
Would you like to help us package it please ?
thanks, that was helpful in installing sys-2.2 on fedora 10. But failed to install the scv package (scv-1.0p2-sysc2.2.12jun06.tgz).
Have you tried installing scv lib on Fedora 10 with gcc-4.3.x? Is there anything else I could try?
Thanks in advance,
krishna
——
% ../configure –with-systemc=/usr/lib/systemc/2.2.0
:
% checking “for working C++ compiler”… configure: error: A bad C++ compiler or library or linker found.
Please check your C++ installation.
—-
Chitlesh
You were talking to OSCI regarding the SystemC License terms. What is the status on that?
If we are not making much headway, how about building unofficial RPMs and putting them on the web? Do let me know if you would be interested in maintaining such (unofficial) RPMs. I am trying to make similar efforts on Debian/Ubuntu front.
If you are on system_forum and/or osci help_forum, you will notice that the most frequently asked question is about systemC installation. Making easily downloadable binaries would go a long way to make FOSS more popular.
Regards
- Puneet
The status is the same since, as OSCI board are not keen for further commitment on this licensing issue.
I can’t afford to risk a legal accusation on me, thus I’m not keen to provide RPMs(binaries), this is why I provide only patches and RPM spec file.
However I will be glad to apply your patches to the RPM spec file.
I know this is a never ending discussion on the m mailing list about this installation procedure, however what can the community (people like you and me) do if the OSCI board is not keen to promote the real sense of opensource behind the OSCI definition.
[...] [...]
Hi Chitlesh,
Problem Solved :
I have added CPPFLAGS=-fpermissive
in configure statement (line # 102 of file systemc.spec)
below is the line which worked
“%configure –prefix=%{SYSTEMC_HOME} CPPFLAGS=-fpermissive”
Thanks
Abhishek
To compile systemc 2.2.0 on Fedora 15 with gcc 4.6 you need to add -fpermissive to compiler flags to systemc.spec line 71 just after the -fPIC is ok