missing xgcc input in compiling gcc 4.7.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

missing xgcc input in compiling gcc 4.7.0

niuzeta
Hi. I'm trying to build gcc 4.7.0 on Debian squeeze.(gcc 4.4.5)

I have compiled all the dependencies that I need(gmp, mpfr, mpc, ppl, and CLooG). they're all built into /usr/local.
I have a ~/works/gcc/src directory which contains all the source files, and /build where I build.

the full configuration command goes as follows:
$ ../../src/gcc-4.7.0/configure --prefix=/usr/local/ \
--program-suffix=4.7 \
--enable-cloog-backend=isl \
--with-gmp=/usr/local/ \
--with-mpfr=/usr/local \
--with-mpc=/usr/local/ \
--with-cloog=/usr/local \
--with-ppl=/usr/local

In midst of the compilation an error occurred. the error message goes:

make[3]: Leaving directory `/home/niuzeta/works/gcc-4.7/build/gcc/gcc'
mkdir -p -- i686-pc-linux-gnu/libgcc
Checking multilib configuration for libgcc...
.
.
checking for suffix of object files... configure: error: in `/home/niuzeta/works/gcc-4.7/build/gcc/i686-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile


so apparently it couldn't compute suffix of object files and could not compile.
A gcc faq has a section for this issue. It directed me to look at the config.log file at the path. so I looked at it.

the first error happens as follows, now becoming relevant to the subject:

configure:3418: $? = 0
configure:3407: /home/niuzeta/works/gcc-4.7/build/gcc/./gcc/xgcc -B/home/niuzeta/works/gcc-4.7/build/gcc/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
configure:3418: $? = 1

there's an input file missing for xgcc.
Following this are more errors with missing input file that ends with checking for suffix, the original error message that I encountered:

configure:3437: $? = 1
configure:3625: checking for suffix of object files
configure:3647: /home/niuzeta/works/gcc-4.7/build/gcc/./gcc/xgcc -B/home/niuzeta/works/gcc-4.7/build/gcc/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include    -c -g -O2  conftest.c >&5
/home/niuzeta/works/gcc-4.7/build/gcc/./gcc/cc1: error while loading shared libraries: libppl_c.so.4: cannot open shared object file: No such file or directory
configure:3651: $? = 1
configure: failed program was:
| /* confdefs.h */
.
.
.
configure:3665: error: in `/home/niuzeta/works/gcc-4.7/build/gcc/i686-pc-linux-gnu/libgcc':
configure:3668: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.


To my understanding, the previous operations had an exit status of 0, whatever it was.
then the xgcc operation with a lot of options attached. but there's no input file.

I have no idea why it had to reference '.' before going into gcc subdirectory, but this doesn't seem to have to do anything with any of the dependencies.

the error message later says it failed to find shared object file libppl_c.so, but it is indeed in /usr/local/libs. I think the error on libppl_c is misleading because xgcc argument failed first and I think it caused the later error to occur.

I am quite stumped and if anyone could shed an insight I would be grateful.
Reply | Threaded
Open this post in threaded view
|

Re: missing xgcc input in compiling gcc 4.7.0

Jonathan Wakely-4
On 27 February 2013 06:40, niuzeta wrote:

> .
> checking for suffix of object files... configure: error: in
> `/home/niuzeta/works/gcc-4.7/build/gcc/i686-pc-linux-gnu/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
>
>
> so apparently it couldn't compute suffix of object files and could not
> compile.
> A  gcc faq <http://gcc.gnu.org/wiki/FAQ#configure_suffix>   has a section
> for this issue. It directed me to look at the config.log file at the path.
> so I looked at it.
>
> the first error happens as follows, now becoming relevant to the subject:

No, this is irrelevant, as the FAQ says:
"There might be several test programs that failed during the
configuration, but some of these failures are non-critical. Check for
the *last* error entry in the file."


> the error message later says it failed to find shared object file
> libppl_c.so, but it is indeed in /usr/local/libs. I think the error on
> libppl_c is misleading because xgcc argument failed first and I think it
> caused the later error to occur.

Please reread the FAQ, which explains exactly this issue. The shared
library is not in the runtime linker's search path. You need to build
PPL without shared libs or use one of the methods listed at
http://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic
to tell the runtime linker how to find the library.

See also http://gcc.gnu.org/wiki/InstallingGCC
Reply | Threaded
Open this post in threaded view
|

Re: missing xgcc input in compiling gcc 4.7.0

niuzeta

you are absolutely correct; I didn't set the environment variables on static library.

I have added shared library path and it now compiles faultlessly.

thank you for the help.

In case anyone searches this problem, what I did was :
$ export LD_LIBRARY_PATH=/usr/local/lib

where /usr/local/lib is where my static libraries are located.