You are not logged in.

#1 2009-01-26 12:28:26

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

gcc3 compiling environment

Hi, I have a problem with gcc. In my laptop I had gcc4 installed, with libstdc++ and glibc, and everything worked smoothly. I had the necessity to install gcc-3.4 to compile an old version of a data analysis program which was not ported to gcc4. I installed gcc-3.4, but got some errors. In the support forum of the program i've been told that such errors are because my libstdc++ and glibc are not matching my gcc linker version. So my question is: how to build a full gcc-3.4 compile environment? Where can I find the needed packages?
Thanks for the help

Offline

#2 2009-01-26 15:48:18

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: gcc3 compiling environment

Create a chroot? You can find old versions of Arch packages on some mirrors, search the forums for them.

Offline

#3 2009-01-26 15:53:50

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: gcc3 compiling environment

Are you using the gcc34 package in [extra]?  Can you post the output?

Offline

#4 2009-01-27 09:59:01

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: gcc3 compiling environment

Allan wrote:

Are you using the gcc34 package in [extra]?  Can you post the output?

Yes, I use gcc-3.4 installed using pacman, so I suppose it's the version in [extra]... Since I got some problems with the configuration files I renamed gcc and g++ to gcc4 and g++4 and created symbolic links gcc->gcc-3.4 and g++->g++-3.4. This because, even if I specified gcc-3.4 and g++-3.4 in the configuration files, the build began using gcc and g++ at a certain stage, regrdless of my configuration (maybe a bad configure script).
You can find the output of my build and some related discussion on the support forum of the analysis software:

http://root.cern.ch/phpBB2/viewtopic.php?t=7887

@Ranguvar: can you explain what does it mean "Create a chroot", please? (Sorry, newbie here... roll)

Thank you all for the help

Last edited by snack (2009-01-27 10:02:11)

Offline

#5 2009-01-29 14:25:04

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: gcc3 compiling environment

ROOT? You too? I'm using AliRoot package for a school project and I haven't been able to compile ROOT stuff correctly on arch :\

Offline

#6 2009-01-30 04:22:14

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: gcc3 compiling environment

snack wrote:

@Ranguvar: can you explain what does it mean "Create a chroot", please? (Sorry, newbie here... roll)

Please use Google first smile If you have trouble understanding something you read, say so and we'll help gladly, but there's an unofficial policy of letting users help themselves when possible.

http://en.wikipedia.org/wiki/Chroot
http://www.newlinuxuser.com/explain-what-is-chroot/

Offline

#7 2009-01-30 08:06:26

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: gcc3 compiling environment

Actually, that's the official policy. smile

Offline

#8 2009-01-30 08:57:52

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: gcc3 compiling environment

Ranguvar wrote:
snack wrote:

@Ranguvar: can you explain what does it mean "Create a chroot", please? (Sorry, newbie here... roll)

Please use Google first smile If you have trouble understanding something you read, say so and we'll help gladly, but there's an unofficial policy of letting users help themselves when possible.

http://en.wikipedia.org/wiki/Chroot
http://www.newlinuxuser.com/explain-what-is-chroot/

Thank you very much, probably i'ts just the stuff I need to set up the right environment. Now I have to understand how to do it, but I'll try to manage it. Sorry for the noob question, but as I said I'm quite a newbie and still have to learn all the rules, written or not.

@Themaister: I have been able to compile root 5.20 using gcc 4 painlessly (more or less) under Arch. My real problem is with the old 5.14...

Offline

#9 2009-01-30 14:15:49

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: gcc3 compiling environment

Was that under i686 or x86_64? And exactly what gcc version? Also, what ./configure flags did you use? I've tried many, many different root versions with the gcc 4.3.3 on x86_64 and I pretty much always get the same error messages and the same place. I have also tried GCC 3.4 and GCC 4.1.2.

Haha! big_smile Finally. Got 5-22-00 compiled on x86_64 with ./configure --enable-qt --disable-krb5 (CURSE YOU KRB5!!!! Hope it isn't important)
Geant3 compiled too to my surprise ... However, AliRoot remains, which is an even larger curse to compile ... EDIT: Omfg... it took just like ... 8 months? But I actually managed to compile that fucking AliRoot big_smile yay to me.

Last edited by Themaister (2009-01-30 16:50:20)

Offline

#10 2009-01-31 14:20:07

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: gcc3 compiling environment

Yesterday I've finally been able to compile root 5.14 using gcc-3.4 (as found in the gcc34 package from repository). I had to tweak the configuration heavily. First of all, there's a small bug in the configure script which won't allow you to use the GNU Scientific Library whose subversion is a two digit number (eg., >= 1.10). This is needed to enable mathmore support; fix it like this:

    --- configure-bug       2009-01-18 20:41:56.000000000 +0100
   +++ configure   2009-01-18 16:12:48.000000000 +0100
   @@ -3503,7 +3503,7 @@
        # check for gsl version >= 1.8
        if test ! "x$found_dir" = "x"; then
           message "Checking for GSL version >= 1.8"
   -       gsl_version=`grep "define GSL" $found_dir/gsl/gsl_version.h | sed 's/^.*"\([0-9]\.[0-9]\)"/\1/' |  awk 'BEGIN { FS="." } { printf "%d", $1 * 1000 + $2 }'`
   +       gsl_version=`grep "define GSL" $found_dir/gsl/gsl_version.h | sed 's/^.*"\([0-9]\.[0-9]*\)"/\1/' |  awk 'BEGIN { FS="." } { printf "%d", $1 * 1000 + $2 }'`
           if test $gsl_version -lt 1008; then
               gslskip="skip"
               result "no

To make sure that gcc-3.4 and g++-3.4 are used through all the build you have to set it in <root source>/config/Makefile.linux (both in the compiling and linking options). In the same file, change also the fortran complier from g77 to gfortran. If you want to use xrootd then you have to perform also this operation: unpack the <root source>/xrootd/src/xrootd-20060928-1600.src.tgz tarball before launching configure, change gcc -> gcc-3.4 and g++ -> g++-3.4 everywhere in configure, configure.ac andd config/GNUmake.rules.gcc, then pack the  tarball again and substitute the original one with the  modified one. This is because xrootd seems to have its own configuration files, and doesn't refer to Makefile.linux.
With these tweaks, this configuration worked for me:

./configure linux --enable-minuit2 --enable-mathmore --disable-krb5 --disable-cintex --disable-clarens

You should be able to enable kerberos support with MIT Kerberos (in my system there's heimdal kerberos which is not compatible with root).

Offline

Board footer

Powered by FluxBB