This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: failed building gcc 4.6 from sources on linux mint 2.6.35-28-generic, when doing Fortran build


On 27 March 2011 20:58, Nasser M. Abbasi wrote:
> On 3/27/2011 12:01 PM, Jonathan Wakely wrote:
>
>>
>> See this FAQ:
>> http://gcc.gnu.org/wiki/FAQ#configure
>>
>> As stated in the installation instructions at
>> gcc.gnu.org/install/configure.html you should not run ./configure, you
>> should build GCC in a different directory from the one containing the
>> sources.
>>
>
> humm... Ok, will revisit everything then. I am just following the
> standard method of building any linux software: unpack tar, cd to the
> folder created, type ./configure; make; make install.

Please read the installation docs, GCC is not just "any linux software"

>>
>> You're looking in the wrong file.
>>
>> As the FAQ says, the usual reason is that the runtime linker can't
>> find the prerequisite libraries (which is also stated in the
>> --with-gmp docs at http://gcc.gnu.org/install/configure.html - you
>> should read that too.)
>>
>
> Well, But I was following the instructions here:
>
> http://gcc.gnu.org/wiki/FAQ
>
> item 5, where it says:
>
> "You have to check the file 'config.log' in the directory where the
> error occurred (denoted by Entering/Leaving directory)."
>
> And they gave an example. And in my case, such directory was:
>
> " make[2]: Leaving directory
> ?`/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0'
> "
> And that is the config.log file I was looking at.
>
> So, you see, I was just following the instructions, and did read it :)


Hmm yes, that FAQ could be improved, the relevant line is actually:

checking for suffix of object files... configure: error: in
`/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-linux-gnu/libgcc':

Which shows the directory where the error occurred (and where the
relevant config.log is)

I'll fix the FAQ.

>> You could try using the makefile linked to at
>> http://advogato.org/person/redi/diary/229.html which makes building
>> gcc much easier (especially if you don't read the documentation about
>> ensuring libgmp.so etc. can be found by the runtime linker)
>>
>
> Thanks, will try it.
>
> I've uploaded the correct config.log file now here
>
> http://12000.org/tmp/march_27_2011/
>
> and called it libgcc_config.log
>
> I see now the errors:

That's not an error, that's just part of the normal configure process.
 If you search for the part that tries to determine the suffix of
object files you will see:

/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/host-i686-pc-linux-gnu/gcc/cc1:
error while loading shared libraries: libmpc.so.2: cannot open shared
object file: No such file or directory

Which, as already suggested and as stated in the FAQ, is because the
runtime linker cannot find libmpc.so

Either set LD_LIBRARY_PATH, or to make your life easier link
statically to gmp, mpfr and mpc, which is what the makefile I linked
to does automatically.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]