Jump to content
MayaS

SystemC installation on Ubuntu: configure and make errors

Recommended Posts

Hello,

I'm installing systemc 2.1 on x86 64bit machine, and Ubuntu12.04 OS.

I need this version as a requirement for Metropolis installation (newer versions are implying errors when installing metropolis).

Upon configuration, I got the following error:

checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized

configure: error: /bin/bash ../config/config.sub x86_64-unknown-linux-gnu failed

I resolved this by replacing the config.sub file with the latest version (downloaded)

But when I do make, I get some errors indicating that quickthreads (qt.h) requires preprocessor definitions for the architecture (e.g. stack alignment).

This was resolved by forcing __i386 in EXTRA_CXXFLAGS in the makefile. Is this valid??

Another error says: ieeefp.h is missing (fatal error: ieeefp.h: No such file or directory compilation terminated). How can this be resolved?

Thanks

Share this post


Link to post
Share on other sites

SystemC 2.0 is not supported on 64-bit Linux. Moreover, the standard compilers shipped with Ubuntu 12.04 are too recent to compile SystemC 2.0 (since the C++ compliancy checks are more strict now).

You can try to look into forcing a 32-bit compilation (e.g. with the help of the "linux32" helper, see "man linux32" and an "-m32" added to EXTRA_CXXFLAGS).

You can drop the inclusion of <ieeefp.h> and include <cmath> instead.

I'd expect further errors, which you'll need to fix by yourself. Pay attention to the compiler error message, ask your favourite search engine and try to resolve the issue. It will need be some work. Good luck.

It may be easier to fix Metropolis…

Greetings from Oldenburg,

Philipp

Share this post


Link to post
Share on other sites

Hello,

I'm installing systemc 2.0 on x86 64bit machine, and Ubuntu12.04 OS.

I need this version as a requirement for Metropolis installation (newer versions are implying errors when installing metropolis).

This is a very old version of SystemC. You should use at least SystemC 2.0.1, which fixes some bugs. As Philipp noted, this version is not compatible with modern C++ compilers so that it requires quite some fixes until it will compile without errors and warnings. This will require quite some effort from your side to Google for the warnings and resolve them in the source files.

Upon configuration, I got the following error:

checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized

configure: error: /bin/bash ../config/config.sub x86_64-unknown-linux-gnu failed

I resolved this by replacing the config.sub file with the latest version (downloaded)

As noted by Philipp, SystemC 2.0 is not compatible with the x86_64 architecture, so you'll have to compile it and all dependent libraries (i.e. in your case Metropolis) for the i386 platform. You can force it during the configure step:

$ cd systemc-2.0.1
$ mkdir objdir
$ ../configure --target=i396-unknown-linux-gnu
$ make

However, for the QuickThreads part to compile, you'll have to play additionally with the compiler flags, as Philipp mentioned. To this end, you'll have to edit the Linux section of configure.in to add -m32 to EXTRA_CXXFLAGS and add ASFLAGS="--32". It should look like:


   *linux*)
       case "$CXX_COMP" in
           c++ | g++)
               EXTRA_CXXFLAGS="-Wall -m32"
               ASFLAGS="--32"
               DEBUG_CXXFLAGS="-g"
               OPT_CXXFLAGS="-O3"
               TARGET_ARCH="linux"
        CC="$CXX"
        CFLAGS="$EXTRA_CXXFLAGS $OPT_CXXFLAGS"
               ;;
           *)
               AC_MSG_ERROR("sorry...compiler not supported")
;;
       esac
       QT_ARCH="iX86"
       ;;

But when I do make, I get some errors indicating that quickthreads (qt.h) requires preprocessor definitions for the architecture (e.g. stack alignment).

This was resolved by forcing __i386 in EXTRA_CXXFLAGS in the makefile. Is this valid??

Another error says: ieeefp.h is missing (fatal error: ieeefp.h: No such file or directory compilation terminated). How can this be resolved?

Replace <ieeefp.h> by <cmath>. You'll also stumble about other deprecated headers, which will be included. Also the Endian detection in "scfx_ieee.h" fails, you'll have to #define SCFX_LITTLE_ENDIAN to work around this issue. At this point compilation will still fail at various places in the kernel (sc_thread_cor_fn, sc_cthread_cor_fn) and the integer and fixed point libraries (for the different overloaded operators). Primarily, this is due to missing declarations of functions or classes, which are referenced in the implementation and have been previously only introduced in form of friend declarations, but not as proper declarations. You'll have to add those declarations in the appropriate places, preferably in the corresponding header in front of the class with the friend declarations. I gave up at that point. Good luck in trying to make SystemC 2.0 build again. It may be more productive trying to make Metropolis compatible with the current SystemC version. Though, you risk to run in the same issues.

Therefore, you may consider to install both into a virtual machine running a 32bit Linux from that time (e.g., Redhat or Debian)

Thanks

Regards, Torsten

Share this post


Link to post
Share on other sites

Hi Philipp and Torsten, thanks for the reply.

I had a typo in my post, i'm installing systemc2.1 not 2.0 (now fixed). But I think what you've commented concerning compatibility with the modern c++ compilers still applies on this version too.

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

×