Question

How to install SystemC on Fedora 15?

Problems:

  • no RPM package (licensing problems)
  • does not compile with 4.6
  • even with -fpermissive (clang doesn't compile your modules)
Was it helpful?

Solution

There is extremely useful and well writen blog post by Chitlesh Goorah, please read it first.

Then what reminds is how to compile SystemC library with GCC 4.6. You can add -fpermissive, but I strongly advice against it.

Instead there are 4 lines of code that needs to be changed, here is the patch:

--- src/sysc/datatypes/bit/sc_bit_proxies.h 2007-03-14 17:47:49.000000000 +0000
+++ src/sysc/datatypes/bit/sc_bit_proxies.h.mod 2011-09-02 13:53:34.318379140 +0000
@@ -713,7 +713,7 @@

 protected:

-    mutable X& m_obj;
+    X&         m_obj;
     int        m_hi;
     int        m_lo;
     int        m_len;
@@ -1190,10 +1190,10 @@

 protected:

-    mutable X&   m_left;
-    mutable Y&   m_right;
+            X&   m_left;
+            Y&   m_right;
     mutable int  m_delete;
-    mutable int& m_refs;
+            int& m_refs;

As a bonus, changes above make this header to work with Clang (tested with 3.0).

OTHER TIPS

In addition to the previous answer, you also need to patch sc_utils_ids.cpp to add missing headers.

--- src/sysc/utils/sc_utils_ids.cpp     2006-12-15 20:31:39.000000000 +0000
+++ src/sysc/utils/sc_utils_ids.cpp.mod 2011-11-02 15:49:10.431948273 +0000
@@ -59,6 +59,9 @@
 //

 #include "sysc/utils/sc_report.h"
+// Jeremy Bennett 2 Nov 11. Patched for GCC 4.6.
+#include <cstdlib>
+#include <cstring>


 namespace sc_core {
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top