public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How can I avoid the dreaded "cannot compute suffix of object files"?
@ 2010-02-11 12:05 Dr. David Kirkby
  2010-02-11 13:40 ` Andrew Haley
  2010-02-11 17:41 ` Dr. David Kirkby
  0 siblings, 2 replies; 12+ messages in thread
From: Dr. David Kirkby @ 2010-02-11 12:05 UTC (permalink / raw)
  To: gcc-help

I'm trying to build gcc 4.3.2 on a Sun Blade 1000 running Solaris 10 03/05 
(there are good reasons for wanting to use an older release of Solaris 10).

I've patched




1)  Patched the included gcc 3.4.3 with Sun's latest patch for gcc (123647-04)

2) Set environment variables.

$ export LD_OPTIONS=-R/usr/local/gcc-4.3.4/lib -L/usr/local/gcc-4.3.4/lib
$ export LDFLAGS=-R/usr/local/gcc-4.3.4/lib -L/usr/local/gcc-4.3.4/lib

3) GMP related things.

* export ABI=32
* Configured gmp with a prefix of /usr/local/gcc-4.3.2
* Built gmp
* Verified gmp passes all tests.
* Installed gmp to /usr/local/gcc-4.3.2


4) MPFR related things.

* Configured mpfr with a prefix of /usr/local/gcc-4.3.2
* Built mpfr
* Verified mpfr passes all tests.
* Installed mprf to /usr/local/gcc-4.3.2

5) GCC related things.

../gcc-4.4.3/configure  --prefix=/usr/local/gcc-4.4.3 
--with-mpfr-lib=/usr/local/gcc-4.4.3/lib 
--with-mpfr-include=/usr/local/gcc-4.4.3/include 
--with-build-time-tools=/usr/ccs/bin --with-gmp=/usr/local/gcc-4.4.3 
--enable-languages=c,c++,fortran --with-boot-ldflags="-R/usr/local/gcc-4.4.3/lib 
-L/usr/local/gcc-4.4.3/lib"


The sate 2 build fails with the error message "cannot compute suffix of object 
files", which is a result of it being unable to find the path to the mpfr 
library. This is despite the fact I've done everything I can think of to get gcc 
to look in /usr/local/gcc-4.4.3/lib for the mpfr libraries.

A Google on this message shows 901,000 hits. Adding 'gcc' into the search term 
finds this drops to 761,000, so I'm far from the only one to get this message.

The appropriate config.log

/patches/builds/build-gcc/sparc-sun-solaris2.10/libgcc/config.log

Target: sparc-sun-solaris2.10
Configured with: ../gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3 
--with-mpfr-lib=/usr/local/gcc-4.4.3/lib 
--with-mpfr-include=/usr/local/gcc-4.4.3/include --
with-build-time-tools=/usr/ccs/bin --with-gmp=/usr/local/gcc-4.4.3 
--enable-languages=c,c++,fortran --with-boot-ldflags='-R/usr/local/gcc-4.4.3/lib 
-L/usr/local/g
cc-4.4.3/lib'
Thread model: posix
gcc version 4.4.3 (GCC)
configure:2391: $? = 0
configure:2393: /patches/builds/build-gcc/./gcc/xgcc 
-B/patches/builds/build-gcc/./gcc/ 
-B/usr/local/gcc-4.4.3/sparc-sun-solaris2.10/bin/ -B/usr/local/gcc-4.4.3/s
parc-sun-solaris2.10/lib/ -isystem 
/usr/local/gcc-4.4.3/sparc-sun-solaris2.10/include -isystem 
/usr/local/gcc-4.4.3/sparc-sun-solaris2.10/sys-include -V </dev/nul
l >&5
xgcc: '-V' must come at the start of the command line
configure:2396: $? = 1
configure:2415: /patches/builds/build-gcc/./gcc/xgcc 
-B/patches/builds/build-gcc/./gcc/ 
-B/usr/local/gcc-4.4.3/sparc-sun-solaris2.10/bin/ -B/usr/local/gcc-4.4.3/s
parc-sun-solaris2.10/lib/ -isystem 
/usr/local/gcc-4.4.3/sparc-sun-solaris2.10/include -isystem 
/usr/local/gcc-4.4.3/sparc-sun-solaris2.10/sys-include -o conftest
-g -O2     conftest.c  >&5
ld.so.1: /patches/builds/build-gcc/gcc/cc1: fatal: libmpfr.so.1: open failed: No 
such file or directory
xgcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

I know from experience adding the directory of the mpfr libraries to 
LD_LIBRARY_PATH, but it is generally reconised as poor practice to do this.

I reported this as a bug for 4.3.1 some time ago

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36481

A suggestion was made to use

export LD_OPTIONS='-R/opt/csw/lib/$ISALIST'
(obviously I'd need to change the patch, as I'm not putting binaries under 
/opt/csw), but even that is not working for me.

Can anyone suggest how I can build gcc on Solaris so it does not need 
LD_LIBRARY_PATH set and compile-time and run-time?

What more can I possibly try?

Dave

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: How can I avoid the dreaded  "cannot compute suffix of object     files"?
@ 2010-02-11 14:55 Dennis Clarke
  2010-02-11 18:48 ` Dr. David Kirkby
  0 siblings, 1 reply; 12+ messages in thread
From: Dennis Clarke @ 2010-02-11 14:55 UTC (permalink / raw)
  To: Dr. David Kirkby; +Cc: gcc-help


> I'm trying to build gcc 4.3.2 on a Sun Blade 1000 running Solaris 10 03/05
> (there are good reasons for wanting to use an older release of Solaris
> 10).
>
> I've patched
>
>

David, I never use LD_LIBRARY_PATH on Solaris unless someone has a taser
pressed to my head. It is very bad practice.

Just try --with-gmp=/opt/csw --with-mpfr=/opt/csw or whereever you have
it. Do not put "lib" there.

Also, set your LD_OPTIONS correctly and use the Sun linker and you should
be okay.

-- 
Dennis Clarke
dclarke@opensolaris.ca  <- Email related to the open source Solaris
dclarke@blastwave.org   <- Email related to open source for Solaris


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

end of thread, other threads:[~2010-02-14 16:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 12:05 How can I avoid the dreaded "cannot compute suffix of object files"? Dr. David Kirkby
2010-02-11 13:40 ` Andrew Haley
     [not found]   ` <4B743F3F.2030805@onetel.net>
     [not found]     ` <4B744080.2090607@redhat.com>
     [not found]       ` <4B744459.3050707@onetel.net>
     [not found]         ` <4B7446A4.6020306@redhat.com>
     [not found]           ` <4B744DE4.3090504@onetel.net>
     [not found]             ` <4B7450A1.5060705@redhat.com>
     [not found]               ` <4B745148.8080401@redhat.com>
2010-02-14 12:07                 ` David Kirkby
2010-02-14 12:46                   ` Andrew Haley
2010-02-14 16:08                     ` Dr. David Kirkby
2010-02-14 20:27                       ` Andrew Haley
2010-02-11 17:41 ` Dr. David Kirkby
2010-02-11 14:55 Dennis Clarke
2010-02-11 18:48 ` Dr. David Kirkby
2010-02-11 22:53   ` Dr. David Kirkby
2010-02-12 14:34     ` Dr. David Kirkby
2010-02-12 16:26       ` Andrew Haley

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).