LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   checking for C compiler default output... configure: error: C compiler cannot create (https://www.linuxquestions.org/questions/linux-software-2/checking-for-c-compiler-default-output-configure-error-c-compiler-cannot-create-817912/)

clubbing80s 07-03-2010 11:36 PM

checking for C compiler default output... configure: error: C compiler cannot create
 
Hi
I have a 32 build build environment on fedora 12 64bit. The build environment is a complete system (unless the provider has missed something) .. I chroot into the build environment. When I run rpmbuild on any of the provided sources / spec files they exit with
"
checking for C compiler default output... configure: error: C compiler cannot create executables "
Or similar.

eg :
bash-3.00# rpmbuild -ba -v ./SPECS/expat.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.76344
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf expat-1.95.7
+ /bin/gzip -dc /root/rpmbuild/SOURCES/expat-1.95.7.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd expat-1.95.7
+ echo 'Patch #0 (expat-1.95.7-xmlcall.patch):'
Patch #0 (expat-1.95.7-xmlcall.patch):
+ patch -p1 -b --suffix .xmlcall -s
+ echo 'Patch #1 (expat-malloc-failure.diff):'
Patch #1 (expat-malloc-failure.diff):
+ patch -p0 -b --suffix .malloc -s
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.76344
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd expat-1.95.7
+ export 'CFLAGS=-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fPIC'
+ CFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fPIC'
+ CFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fPIC'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export FFLAGS
+ ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i386-pc-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
configure: loading cache /dev/null
/dev/null: line 1: ./configure:: No such file or directory
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... no
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
error: Bad exit status from /var/tmp/rpm-tmp.76344 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.76344 (%build)
bash-3.00#

How do I resolve this ?

Greg

paulsm4 07-04-2010 12:56 AM

Hi -

It sounds like you need to get a C compiler. Something like this:
Quote:

yum install gcc g++ make automake autoconf libtool
'Hope that helps .. PSM

knudfl 07-04-2010 03:31 AM

.. And if gcc is present, find it with :
cd <top-directory-of-chroot-environment>
find ./* -iname *gcc*

Can also be a path problem ?

But, so far concerns expat-1.95 : It is available.

# yum install compat-expat1.i686 ( I guess )
It is on the file list for Fedora12 x86_64 :
compat-expat1-1.95.8-6.i686.rpm
( Also available: compat-expat1-1.95.8-6.x86_64.rpm )
You can check the required install name with :
# yum search expat
..

clubbing80s 07-05-2010 08:17 PM

Hi
So far I found that running rpmbuild with the "--target i586" option works.

How can I set the chroot environment so that the compiler in the chroot env, thinks it's running in an i586 environment.

Thanks for the info.


All times are GMT -5. The time now is 06:36 PM.