public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Trouble building gcc-4.3.4 on non-standard location
@ 2011-01-14  6:17 apoorv kulshrestha
  2011-01-14  6:59 ` MFL Commissioner
  2011-01-14  8:14 ` Kai Ruottu
  0 siblings, 2 replies; 5+ messages in thread
From: apoorv kulshrestha @ 2011-01-14  6:17 UTC (permalink / raw)
  To: gcc-help

Hi,

I need to build gcc-4.3.4 on non-standard location (NFS mounted). I configured:

$../gcc-4.3.4/configure --prefix={insall dir} --with-gmp={install dir}
--with-mpfr={install dir} --with-local-prefix={install dir}
--disable-shared

I ran make -j1. But I keep getting:

checking for suffix of object files... configure: error: cannot
compute suffix of object files: cannot compile

In x86_64-unknown-linux-gnu/libgcc/config.log, I can see:

/home/panthdev/apps/gcc-4.3.4-compliant/compiler/objdir/./gcc/cc1:
error while loading shared libraries: libmpfr.so.1: cannot open shared
object file: No such file or directory

libmpfr.so.1 is there in {install dir}/lib. Also if I set
LD_LIBRARY_PATH to {install dir}/lib, then it finds the libmpfr.so.1
but config.log starts complaining:

/tmp/cce9YhFK.s: Assembler messages: /tmp/cce9YhFK.s:16: Error: bad
register name %rbp' /tmp/cce9YhFK.s:18: Error: bad register name%rsp'

Please help. Thanks in advance.

-AK

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble building gcc-4.3.4 on non-standard location
  2011-01-14  6:17 Trouble building gcc-4.3.4 on non-standard location apoorv kulshrestha
@ 2011-01-14  6:59 ` MFL Commissioner
  2011-01-14  7:05   ` apoorv kulshrestha
  2011-01-14  8:14 ` Kai Ruottu
  1 sibling, 1 reply; 5+ messages in thread
From: MFL Commissioner @ 2011-01-14  6:59 UTC (permalink / raw)
  To: gcc-help

On 1/14/2011 7:17 AM, apoorv kulshrestha wrote:
> Hi,
>
> I need to build gcc-4.3.4 on non-standard location (NFS mounted). I configured:
>
> $../gcc-4.3.4/configure --prefix={insall dir} --with-gmp={install dir}
> --with-mpfr={install dir} --with-local-prefix={install dir}
> --disable-shared
>
> I ran make -j1. But I keep getting:
>
> checking for suffix of object files... configure: error: cannot
> compute suffix of object files: cannot compile
>
> In x86_64-unknown-linux-gnu/libgcc/config.log, I can see:
>
> /home/panthdev/apps/gcc-4.3.4-compliant/compiler/objdir/./gcc/cc1:
> error while loading shared libraries: libmpfr.so.1: cannot open shared
> object file: No such file or directory
>
> libmpfr.so.1 is there in {install dir}/lib. Also if I set
> LD_LIBRARY_PATH to {install dir}/lib, then it finds the libmpfr.so.1
> but config.log starts complaining:
>
> /tmp/cce9YhFK.s: Assembler messages: /tmp/cce9YhFK.s:16: Error: bad
> register name %rbp' /tmp/cce9YhFK.s:18: Error: bad register name%rsp'
>
> Please help. Thanks in advance.
>
> -AK
The configure script also looks for library headers.  Do you have for 
example {install_dir}/include/mpfr.h ?
If not, that's probably the issue.  You'll need gmp.h too.
John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble building gcc-4.3.4 on non-standard location
  2011-01-14  6:59 ` MFL Commissioner
@ 2011-01-14  7:05   ` apoorv kulshrestha
  2011-01-14  7:25     ` John Marino
  0 siblings, 1 reply; 5+ messages in thread
From: apoorv kulshrestha @ 2011-01-14  7:05 UTC (permalink / raw)
  To: MFL Commissioner; +Cc: gcc-help

Yeah mpfr headers and lib are in {install dir}/include and {install
dir}/lib respectively. I built and installed mpfr and gmp to the same
location beforehand.

On Fri, Jan 14, 2011 at 2:58 PM, MFL Commissioner
<mfl-commissioner@marino.st> wrote:
> On 1/14/2011 7:17 AM, apoorv kulshrestha wrote:
>>
>> Hi,
>>
>> I need to build gcc-4.3.4 on non-standard location (NFS mounted). I
>> configured:
>>
>> $../gcc-4.3.4/configure --prefix={insall dir} --with-gmp={install dir}
>> --with-mpfr={install dir} --with-local-prefix={install dir}
>> --disable-shared
>>
>> I ran make -j1. But I keep getting:
>>
>> checking for suffix of object files... configure: error: cannot
>> compute suffix of object files: cannot compile
>>
>> In x86_64-unknown-linux-gnu/libgcc/config.log, I can see:
>>
>> /home/panthdev/apps/gcc-4.3.4-compliant/compiler/objdir/./gcc/cc1:
>> error while loading shared libraries: libmpfr.so.1: cannot open shared
>> object file: No such file or directory
>>
>> libmpfr.so.1 is there in {install dir}/lib. Also if I set
>> LD_LIBRARY_PATH to {install dir}/lib, then it finds the libmpfr.so.1
>> but config.log starts complaining:
>>
>> /tmp/cce9YhFK.s: Assembler messages: /tmp/cce9YhFK.s:16: Error: bad
>> register name %rbp' /tmp/cce9YhFK.s:18: Error: bad register name%rsp'
>>
>> Please help. Thanks in advance.
>>
>> -AK
>
> The configure script also looks for library headers.  Do you have for
> example {install_dir}/include/mpfr.h ?
> If not, that's probably the issue.  You'll need gmp.h too.
> John
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble building gcc-4.3.4 on non-standard location
  2011-01-14  7:05   ` apoorv kulshrestha
@ 2011-01-14  7:25     ` John Marino
  0 siblings, 0 replies; 5+ messages in thread
From: John Marino @ 2011-01-14  7:25 UTC (permalink / raw)
  To: gcc-help

On 1/14/2011 8:05 AM, apoorv kulshrestha wrote:
> Yeah mpfr headers and lib are in {install dir}/include and {install
> dir}/lib respectively. I built and installed mpfr and gmp to the same
> location beforehand.
>
maybe it's cc1 that can't find the library.
if you type "ldd 
/home/panthdev/apps/gcc-4.3.4-compliant/compiler/objdir/./gcc/cc1" does 
it give you the same library not found error?  Did you build the gcc 
that owns that cc1 or just copy it over?
John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble building gcc-4.3.4 on non-standard location
  2011-01-14  6:17 Trouble building gcc-4.3.4 on non-standard location apoorv kulshrestha
  2011-01-14  6:59 ` MFL Commissioner
@ 2011-01-14  8:14 ` Kai Ruottu
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Ruottu @ 2011-01-14  8:14 UTC (permalink / raw)
  To: gcc-help

14.1.2011 8:17, apoorv kulshrestha kirjoitti:
> Hi,
>
> I need to build gcc-4.3.4 on non-standard location (NFS mounted). I configured:
>
> $../gcc-4.3.4/configure --prefix={insall dir} --with-gmp={install dir}
> --with-mpfr={install dir} --with-local-prefix={install dir}
> --disable-shared
>
> I ran make -j1. But I keep getting:
>
> checking for suffix of object files... configure: error: cannot
> compute suffix of object files: cannot compile
>
> In x86_64-unknown-linux-gnu/libgcc/config.log, I can see:
>
> /home/panthdev/apps/gcc-4.3.4-compliant/compiler/objdir/./gcc/cc1:
> error while loading shared libraries: libmpfr.so.1: cannot open shared
> object file: No such file or directory

Yes, the configure docs tell :

"You might also need to ensure the shared libraries can be found by the 
dynamic linker when building and using GCC, for example by setting the 
runtime shared library path variable (LD_LIBRARY_PATH on GNU/Linux and 
Solaris systems)."

When not installing/updating gmp, mpfr into their standard places, it
of course is required to tell where the runtime libraries are, so the
dynamic linker ('/lib/ld-linux-x86-64.so') can find them!

> libmpfr.so.1 is there in {install dir}/lib. Also if I set
> LD_LIBRARY_PATH to {install dir}/lib, then it finds the libmpfr.so.1
> but config.log starts complaining:
>
> /tmp/cce9YhFK.s: Assembler messages: /tmp/cce9YhFK.s:16: Error: bad
> register name %rbp' /tmp/cce9YhFK.s:18: Error: bad register name%rsp'

This error came from the assembler, not from the new GCC. So there is
something wrong with the co-operation between the new GCC and the
existing assembler ('/usr/bin/as'). So :

- what is the current assembler version?  ('$ as --version')

- is updating the assembler allowed?

If updating the distro components is not allowed, then building and
installing newer GNU binutils using the same '--prefix={install dir}'
in configure would be the solution. If updating is allowed then the
configure option is '--prefix=/usr' which causes the '/usr' stuff for
binutils being updated...

The new GCC will search 'as' from '${install dir}/$target/bin' before
going to search from $PATH...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-14  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14  6:17 Trouble building gcc-4.3.4 on non-standard location apoorv kulshrestha
2011-01-14  6:59 ` MFL Commissioner
2011-01-14  7:05   ` apoorv kulshrestha
2011-01-14  7:25     ` John Marino
2011-01-14  8:14 ` Kai Ruottu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).