[Gems-users] problem compiling ruby


Date: Tue, 12 Jan 2010 13:18:59 +0100
From: Mladen Nikitovic <mladen@xxxxxx>
Subject: [Gems-users] problem compiling ruby
Hi,

 

I'm stumbling upon a great deal of problems when I try to compile ruby on my machine.

 

This compilation phase worked well when the system was older (and detected as x86-linux), but now it has been upgraded and simics script seem to categorize it as amd64-linux, and there seem to be problems with compiler settings and library versions. I would be so happy if anyone can help me with this.

 

I'm following the steps specified for users that whant to run together with simics 2.2.x versions: http://www.cs.wisc.edu/gems/doc/gems-wiki/moin.cgi/Setup

 

One of the first steps is to run ../configure in the x86-linux directory. This is what I encounter:

 

configure: Setting up environment variables...
configure: Examining Simics source directory...
configure: Doing sanity checks on the source directory...
checking for Simics host type... x86-linux
checking for bash... /bin/sh
checking for gmake... /usr/bin/gmake
configure: loading host defaults: /nobackup/mladen/amc/gems-release1.2/simics-2.2.19/config/host-defaults.common
configure: loading host defaults: /nobackup/mladen/amc/gems-release1.2/simics-2.2.19/config/host-defaults.x86-linux
acdummy.c: In function 'main':
acdummy.c:3: warning: incompatible implicit declaration of built-in function 'printf'
checking for perl... /usr/local/bin/perl
checking Perl version... ok (5.8.8)
parsing: /nobackup/mladen/amc/gems-release1.2/simics-2.2.19/config/host-flags.common
parsing: /nobackup/mladen/amc/gems-release1.2/simics-2.2.19/config/host-flags.x86-linux
parsing: /nobackup/mladen/amc/gems-release1.2/simics-2.2.19/config/host-flags.optional
checking whether /usr/bin/gmake sets ${MAKE}... yes
checking for gcc... /usr/bin/gcc
checking installation prefix of compiler... /usr/bin
checking for g++... /usr/bin/g++
checking for gcc... /usr/bin/gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking how to run the C preprocessor... /usr/bin/gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++ accepts -g... yes
checking whether /usr/bin/gcc needs -traditional... no
checking for compiler type... configure: error: Could not determine compiler version for compiler CC='/usr/bin/gcc'

So, the compiler version seems to be wrong. The default (gcc) i version 4.1.2 20080704 (Red Hat 4.1.2-46), so I guess it is to new for this version of simics? I have two other options, one is to use gcc34, which is version 3.4.6 20060404 (Red Hat 3.4.6-4), or to specify g++ as CC.

 

If I try ../configure CC=gcc34, then the configuration script runs fine, except for some warnings in the end:

 

The following errors/warnings were encountered during the configuration phase.
==============================================================================
*Warning*: Could not find program indent.
*Warning*: could not find GTK/GNOME packages, the GTK/GNOME frontend will not be built
*Warning*: Could not find library for LIBBZ2=-lbz2
*Warning*: Could not find library for LIBDL=-ldl
*Warning*: Could not find library for LIBELF=-lelf
*Warning*: Could not find library for LIBPTHREAD=-lpthread
*Warning*: Could not find library for LIBREADLINE=-lreadline -ltermcap
*Warning*: Could not find library for LIBUTIL=-lutil
*Warning*: Could not find library for LIBZ=-lz

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/host-config
config.status: creating config/simics/host-config.h
config.status: linking ../config/masters/Makefile.bin to bin/Makefile
config.status: linking ../config/masters/Makefile.lib to lib/Makefile
config.status: linking ../config/masters/Makefile.obj to obj/Makefile

Since there are only warnings, I guess I can continue with the next step, which is to create the ruby directory in the extensions directory and make the necessary soft links.

 

I edited the modules.list-local file as specified and copied the compilers libstdc++ and libgcc_s to the appropriate directory.

 

The final step before compilation is to specify the compiler in the Makefile.common file and this is what I have problems with. If I specify the same compiler as in the configure script, then i get the following error when i run make PROTOCOL=MSI_MOSI_CMP_directory DESTINATION=MSI_MOSI_CMP_directory:


/usr/bin/gcc34 -o amd64-linux/obj/parser.o -c generated/parser.c -DYY_NO_UNPUT -Wall -W -Wwrite-strings -Woverloaded-virtual -Wno-unused  -m64 -march=opteron -fPIC -g -ggdb -g3 -O0 -w -DSIMICS_2_0   -I. -I../common -Igenerated -Isymbols -Igenerator -Iast
cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++ but not for C

This indicates that I should have used g++ instead, right?

 

But doing that eventually leads me to this compiler error:

 

make amd64-linux/generated/MSI_MOSI_CMP_directory/bin/tester.exec
make[1]: Entering directory `/mnt/olddisk/localdisk/mladen/amc/gems-release1.2/ruby'
/usr/bin/g++ -o amd64-linux/generated/MSI_MOSI_CMP_directory/obj/attrparse.o -c generated/MSI_MOSI_CMP_directory/attrparse.c -DIS_RUBY -DTARGET_SPARC_V9 -DTARGET_VA_BITS=64 -DTARGET_PA_BITS=64 -Wall -W -Wwrite-strings -Woverloaded-virtual -Wno-unused  -m64 -march=opteron -fPIC -g -ggdb -g3 -O0 -w -DSIMICS_2_0  -DRUBY_DEBUG=false  -Inetwork/simple -I. -I../common -I../common/gzstream -Ibuffers -Icommon -Islicc_interface -Iprofiler -Iconfig -Ieventqueue -Isystem -Iinterfaces -Isimics -Itester -Irecorder -Ilog_tm -Inuca -Igenerated/MSI_MOSI_CMP_directory -I../common/ioutil -Inetwork -I../simics/amd64-linux/obj/include/ -I../simics/amd64-linux/obj/include/simics -I../simics/amd64-linux/obj/include/simics-api-1 -I../simics/amd64-linux/config
cc1plus: error: ../simics/amd64-linux/obj/include/: Too many levels of symbolic links
cc1plus: error: ../simics/amd64-linux/obj/include/simics: Too many levels of symbolic links
cc1plus: error: ../simics/amd64-linux/obj/include/simics-api-1: Too many levels of symbolic links
cc1plus: error: ../simics/amd64-linux/config: Too many levels of symbolic links
make[1]: *** [amd64-linux/generated/MSI_MOSI_CMP_directory/obj/attrparse.o] Error 1
make[1]: Leaving directory `/mnt/olddisk/localdisk/mladen/amc/gems-release1.2/ruby'
make: *** [all] Error 2

So, I don't know what to do from here really. If I specify any newer compiler than version 3.4.6 then I get the error (during ../configure in the x86-linux directory):

 

"checking for compiler type... configure: error: Could not determine compiler version for compiler CC='/usr/bin/gcc'"

Secondly, there are libstdc++.so.5 and libgcc_s.so.1 in the /usr/lib and /lib directory, but they do not probably belong to the gcc 3.4.6 compiler since it is not the default compiler. So there is a hesitation about which files to actually copy.

 

And last, the warnings i get from the x86-linux configuration script, should I pay attention to them or does it not matter in this case?

 

A lot of questions I know, but I would really appreciate any hints that could resolve this.

 

Best Regards,

Mladen

 

 

 

[← Prev in Thread] Current Thread [Next in Thread→]
  • [Gems-users] problem compiling ruby, Mladen Nikitovic <=