help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing GCC-4.x in userspace / Compiling Octave from CVS


From: Muthiah Annamalai
Subject: Re: Installing GCC-4.x in userspace / Compiling Octave from CVS
Date: Mon, 1 Oct 2007 22:12:31 -0500

Much as I am not able to understand whats going on, one thing appears
clear to me;
mixing the compilers dont work for me.

I use
config_opts = '--prefix=/home/m/mx/mxa6471/OCTAVE29'
'--with-f77=/home/m/mx/mxa6471/GCC34/bin/g77'
'CC=/home/m/mx/mxa6471/GCC42/bin/gcc' 'CXX=/home/m/mx/mxa647

where I tried to get the g77 from older version of GCC3.4 to compile Octave. The
linker would complain of 2 versions of libstdc++ being used and such;
but ignored it.
Build was successful, but had other problems in starting up, which
couldnt find symbols.

Next I tried, manually changing the library linked to, in the
octave/src/Makefile. It
compiled, and ./run-octave worked, but many things were off; 'find'
was not there and
such.

So I want to know, whats stopping me from building Octave, when I set
gfortran as the
F77 compiler. (I mean, I get unresolved symbols when I do that). And
also gfortran does
not need the F77 libraries f2c/g2c etc.

Maybe I must build all LAPACK etc libraries myself using gcc4.2 and that would
resolve the problem?

-Muthu



On 10/1/07, Sergei Steshenko <address@hidden> wrote:
>
> --- "John W. Eaton" <address@hidden> wrote:
>
> > On  1-Oct-2007, Sergei Steshenko wrote:
> >
> > | Everything is compiled with gcc-4.2.1, which means it is compiled with
> > | gfortran, but while building 'lapack' I also gave path to gcc-3.4.6 
> > libraries
> > | in order to satisfy the linker.
> > |
> > | I think that was needed for built-in self-tests.
> > |
> > | Here is the relevant part of 'make.inc' which comes with 'lapack':
> > |
> > |     19  FORTRAN = 
> > /maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.1/bin/gfortran
> > |     20  OPTS     = -funroll-all-loops -O3
> > |     21  DRVOPTS  = $(OPTS)
> > |     22  NOOPT    =
> > |     23  LOADER = 
> > /maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.1/bin/gfortran
> > |     24  LOADOPTS = -L 
> > /maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.1/lib -L
> > | 
> > /maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.1/libexec/gcc/i686-pc-linux-gnu/4.2.1
> >  -L
> > | /maxtor5/sergei/AppsFromScratchWD/install/gcc-3.4.6/lib -lgfortran -l g2c#
> > | .
> >
> > If you compiled everything with gfortran, then this doesn't look right
> > to me.  Does it also work if you remove the -lg2c and the -L option
> > that includes the gcc-3.4.6 directory?  Where did the -lg2c come from?
> > Compiling a simple program with "gfortran -v" doesn't show any -lg2c
> > in the output, so I don't think compiling something with gfortran
> > should require -lg2c.
> >
> > jwe
> >
>
> 'lapack' linking fails without "-l g2c" - that is why I had to complicate 
> matters in the
> above manner in the first place.
>
> I didn't dig into this, I just wanted to build the whole thing which I did.
> And I'm not the only one who had this problem.
>
> In the URL I posted :
>
> http://archives.free.net.ph/message/20070902.203315.12c42b92.en.html
>
> one can read this:
>
> "
> But now, there seems to be something screwy, possibly
> specific to cygwin. I downloaded and installed the
> high performance math libraries from AMD's website.
> When I built the examples using the original gcc
> compiler collection, it compiled perfectly and all
> tests using the high performance library passed. Now,
> doing exactly the same thing, make dies half way
> through at link time for one of the tests half way
> through make complaining that -lg2c doesn't exist.
> But it does, obviously, since make using gcc v 3.4.4
> found it. Where do I look for a fix to this? gcc v
> 3.4.4 must have had something hard coded into it to
> tell it where this library is, because I didn't tell
> it where to look. I didn't even know this library
> existed the first time I built the AMD acml examples.
> My guess, from what I saw today, is that my current
> build of gcc v 4.2.1 doesn't have this information
> built in. I assume that is this information was in
> either environment variables or in the GnuMakefile, my
> attempt at compiling the examples using gcc v 4.2.1
> would have succeeded.
> ".
>
> I contacted the guy and gave him my solution.
>
> I first resolved the problem and then started looking for a more elegant
> solution - all I found was the above post.
>
> I'd be glad to further test 'octave'; built-in tests pass - just tell me
> what else to try.
>
> At all, I am trying to always run 'make test' and its moral equivalents -
> WRT 'octave' everything looks fine, i.e. I had no problems with the libraries
> I've built.
>
> By the way, I'm using 'atlas' library which uses 'lapack' - don't know
> whether this matters or not regarding the issue we're discussing.
>
> Regards,
>   Sergei.
>
> Applications From Scratch: http://appsfromscratch.berlios.de/
>
>
>
> ____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
> today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]