for your eyes only
Knowledge Hurts – a blog of thoughts, things and stuff.

SystemC – am I simply not worthy?

First question: What is SystemC?

That one’s easy. SystemC is a C++ library that features simulation features (modules, threads, signals, ports, …). It is open source. And it sucks.

So what’s the problem?

I just wanted to use a recent version of gcc (3.4 and 4.1) to compile the library. And it gave me shit. It gave me errors. Masses of errors at first. And who rushed to help? No one. No documentation. Only one Google hit with my query “sc_process_int.cpp:630: error: ‘sc_cthread_cor_fn’ was not declared in this scope“.

But that one hit, it clearly was worth it. Just over a month old, the blog entry http://anant.wordpress.com/2007/02/11/compiling-systemc-with-gcc-4-and-mac-os-x/ gave me this patch http://www.kix.in/misc/patch_systemc-2.1.v1-gcc4-osx (and it’s not only relevant for MacOS X, try it under Linux, SystemC will FINALLY WORK after these steps)

  1. tar xf systemc-2.1-idontknowwhat.tgz
  2. cd systemc-2.1
  3. patch -p1 < patch_systemc-2.1.v1-gcc4-osx
  4. mkdir tempdir
  5. cd tempdir
  6. ../configure –prefix=/dir/where/you/want/it
  7. (yeah, that’s totally bullshit, isn’t it?)
  8. make

Read on! Knowledge hurts.

Advertisements

3 Responses to “SystemC – am I simply not worthy?”

  1. Hi,
    I try yopur patch and i use ubuntu 7.04 but it’s require that i get a file i don’t know what to write.
    there is the command and the repsonse:

    med@med:~/systemc-2.1.v1$ patch -p1 < patch_systemc-2.1.v1-gcc4-osx
    can’t find file to patch at input line 4
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |diff -Naur ../systemc-2.1.v1/src/sysc/datatypes/fx/sc_context.h src/sysc/datatypes/fx/sc_context.h
    |— ../systemc-2.1.v1/src/sysc/datatypes/fx/sc_context.h 2005-03-31 23:22:06.000000000 +0200
    |+++ src/sysc/datatypes/fx/sc_context.h 2006-05-23 09:22:42.931661194 +0200
    ————————–
    File to patch:

    I hope that you can help me.
    Thanks.

  2. Looks like you aren’t in the right directory, are you? Make sure that the file that was not found ( src/sysc/datatypes/fx/sc_context.h src/sysc/datatypes/fx/sc_context.h ) is actually there.

  3. the folder is wrong, the patch should be launched on the parent of folder systemc.2.1


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: