LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Why cannot compute suffix of object files? (https://www.linuxquestions.org/questions/linux-from-scratch-13/why-cannot-compute-suffix-of-object-files-350753/)

bhxs1809 08-07-2005 01:53 AM

Why cannot compute suffix of object files?
 
When I install glibc-2.3.4 in chapter 6.11,there is an error :checking for suffix of object files... configure: error: cannot compute suffix of object files:cannot compile
See 'config.log' for more details.

Why?And how can I continue.thanks!

shotokan 08-08-2005 01:13 AM

I think the problem has to do with gcc.
Take a look at http://www.linuxquestions.org/questions/history/339554
Could you post the whole error?

bhxs1809 08-08-2005 06:22 AM

Quote:

Originally posted by shotokan
I think the problem has to do with gcc.
Take a look at http://www.linuxquestions.org/questions/history/339554
Could you post the whole error?


Thanks!:)

lakeat 04-13-2008 10:14 AM

I suggest to look at LD_LIBRARY_PATH or LD_LIBRARYN32_PATH, and you may fix it! :)

Daniel

selmaguzel 05-22-2008 07:47 AM

Hi,
I get the same error(checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
) above after running the command below:
BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
../glibc-2.6.1/configure --prefix=/usr \
--libexecdir=/usr/lib/glibc --host=${CLFS_TARGET} --build=${CLFS_HOST} \
--disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 \
--with-__thread --with-binutils=${CLFS}/cross-tools/bin \
--with-headers=${CLFS}/usr/include --cache-file=config.cache

But I don't know how must I set LD_LIBRARY_PATH or LD_LIBRARYN32_PATH and fix :(
Can you say according to what clearly?
Thanks in advance.

cjrcl 07-18-2010 01:07 AM

Quote:

Originally Posted by bhxs1809 (Post 1786440)
When I install glibc-2.3.4 in chapter 6.11,there is an error :checking for suffix of object files... configure: error: cannot compute suffix of object files:cannot compile
See 'config.log' for more details.

Why?And how can I continue.thanks!

I encountered this problem on my RHEL 5.5 Server, the solution to which is rather trickey: first, you should install gmp by ./configure && make && make install; second, install mpfr by ./configure --with-gmp=/usr/local && make && make install; third, it is vital to move any .so files pertaining to gmp or mpfr from /usr/local to another place while leaving .a files untouched; fourth, you can now go into the gcc folder and do make clean && ./configure --prefix=/usr --with-gmp=/usr/local --with-mpfr=/usr/local && make -j 4 && make install; last, restore those .so files you moved.

bernard.wolsieffer 07-18-2010 05:29 PM

I got the same error attempting to compile g++ 4.5.0
 
so I can use other things that need g++.
cannot compute suffix of object files: cannot compile

peterstockwell 08-02-2010 11:04 PM

This fixed my problem
 
Quote:

Originally Posted by cjrcl (Post 4036851)
I encountered this problem on my RHEL 5.5 Server, the solution to which is rather trickey: first, you should install gmp by ./configure && make && make install; second, install mpfr by ./configure --with-gmp=/usr/local && make && make install; third, it is vital to move any .so files pertaining to gmp or mpfr from /usr/local to another place while leaving .a files untouched; fourth, you can now go into the gcc folder and do make clean && ./configure --prefix=/usr --with-gmp=/usr/local --with-mpfr=/usr/local && make -j 4 && make install; last, restore those .so files you moved.

Thanks to cjrcl for this post - it solved the problem I was having compiling gcc-4.5.1 on
Fedora 13, running on a Mac under VMWare. I note that the latest gcc now needs an
additional library mpc, so I just continued the system mentioned above with configure and
--with-mpc=/usr/local and everything worked brilliantly.
Thanks again.

purus.mail@gmail.com 12-17-2010 08:18 AM

Thanks cjrcl excellent solution... worked for me to compile gcc 4.5.1 in centos 5.5

ron7000 12-22-2011 12:44 PM

works for gcc 4.3.6 on itanium ia64 novell sles 10
 
thanks for the hint. moved the *.so files out of the directories where I have them installed to a temporary location for
/usr/local/gmp-5.0.1
/usr/local/mpfr-3.0.0
/usr/local/mpc-0.8.2

started fresh with ./configure, then make all and it built gcc 4.3.6.

this was on a server running Novell Linux Enterprise Server (SLES) version 10 for Itanium (ia64) that originally came with gcc 4.1.2. I had in the past built gcc-4.2.4 and I used 4.2.4 to build 4.3.6 successfully following the above.

david@verdegris.net 12-24-2011 11:39 AM

Thank you a lot.

I needed a 2 steps compiling.
I moved mpfr, gmp, and mpc shared librairies from /usr/local/lib. Then, running make led to "missing gmp lib". So, I moved back the libraries and ran make once again(without any make clean between), and it succeeded.

mlcurry 03-05-2012 12:04 PM

A tip for those from the future
 
I came across this thread when investigating a failing install process for GCC. Lakeat had a good tip, if vague. You should add to your LD_LIBRARY_PATH the path to your installations for MPFR, MPC, and GMP. This works regardless of whether you install in your home directory or not.


All times are GMT -5. The time now is 10:01 PM.