Couldn' build cross compiler: C compiler cannot create
ariga masahiro
ariga@link-lab.co.jp
Fri Feb 15 02:48:00 GMT 2008
Hello everyone,
Previous mail was my first mail to this mailing-list,
on suspicion of having failed to send previous mail correctly
(there's no echo mail),
please allow me to send the same mail once again.
Soryy if it was redundant.
Also I beseech you again to help me.
I am struggling to reinstall sh-elf-gcc from gcc-4.1.1 on Cygwin.
I decided the directory to hold newly built files to be
/usr/local/sh-elf/bin.
I downloaded next sources into /usr/local/sh-elf
and decompressed them.
binutils-2.16.tar.bz2
gcc-4.1.1.tar.bz2
newlib-1.14.0.tar.gz
After that, newly directory looks like below.
/usr
`-- local
`-- sh-elf
|-- binutils-2.16
|-- newlib-1.14.0
|-- gcc-4.1.1
|-- bin
|
And I made building-directories in which I executed building scripts.
/tmp/build/build_binutils
/tmp/build/build_gcc
In order to re-install sh-elf-gcc I made several shell scripts.
I append them below.
First of all I built binutils using binutilsbuild.sh
and this succeeded without any trouble.
commands executed.
$ cd /tmp/build
$ . setup.sh
$ cd build_binutils
$ . binutilsbuild.sh
And I executed appendpath.sh which set PATH to /usr/local/sh-elf/bin.
$ cd ..
$ . appendpath.sh
And I tried to build gcc.
Before that,I made symbolic link to newlib like next.
$ cd /usr/local/sh-elf/gcc-4.1.1
$ ln -s ../newlib-1.14.0/newlib ../newlib-1.14.0/libgloss
../newlib-1.14.0/COPYING.NEWLIB .
Then I executed buildgcc-onetime.sh
$ cd /tmp/build/build_gcc
$ . buildgcc-onetime.sh
And then I was encountered next error,
-- from error log
checking for sh-elf-gcc...
/tmp/build/build_gcc/./gcc/xgcc -B/tmp/build/build_gc
c/./gcc/ -nostdinc -B/tmp/build/build_gcc/sh-elf/m2a/newlib/ -isystem
/tmp/build
/build_gcc/sh-elf/m2a/newlib/targ-include -isystem
/usr/local/sh-elf/gcc-4.1.1/n
ewlib/libc/include -B/usr/local/sh-elf/sh-elf/bin/ -B/usr/local/sh-elf/sh-elf/li
b/ -isystem /usr/local/sh-elf/sh-elf/include -isystem
/usr/local/sh-elf/sh-elf/s
ys-include -m2a
checking for C compiler default output file name... configure: error: C
compiler
cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libssp] Error 1
make[1]: Leaving directory `/tmp/build/build_gcc'
make: *** [all] Error 2
make: Leaving directory `/tmp/build/build_gcc'
I searched among many config.logs and found that
/tmp/build/build_gcc/sh-elf/m2a/libssp/config.log
contained above error message.
It says,
configure:2274: $? = 0
configure:2276:
/tmp/build/build_gcc/./gcc/xgcc -B/tmp/build/build_gcc/./gcc/ -nostdinc -B/tmp/build/build_gcc/sh-elf/m2a/newlib/
-isystem /tmp/build/build_gcc/sh-elf/m2a/newlib/targ-include -isystem
/usr/local/sh-elf/gcc-4.1.1/newlib/libc/include -B/usr/local/sh-elf/sh-elf/bin/
-B/usr/local/sh-elf/sh-elf/lib/ -isystem
/usr/local/sh-elf/sh-elf/include -isystem
/usr/local/sh-elf/sh-elf/sys-include -m2a -v </dev/null >&5
Reading specs from /tmp/build/build_gcc/./gcc/specs
Target: sh-elf
Configured with:
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --host=i686-pc-cygwin
--build=i686-pc-cygwin --prefix=/usr/local/sh-elf --enable-languages=c,c++ --with-gnu-as
--with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v : (reconfigured)
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --host=i686-pc-cygwin
--build=i686-pc-cygwin --prefix=/usr/local/sh-elf --enable-languages=c,c++ --with-gnu-as
--with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v : (reconfigured)
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --host=i686-pc-cygwin
--build=i686-pc-cygwin --prefix=/usr/local/sh-elf --enable-languages=c,c++ --with-gnu-as
--with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v : (reconfigured)
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --host=i686-pc-cygwin
--build=i686-pc-cygwin --prefix=/usr/local/sh-elf --enable-languages=c,c++ --with-gnu-as
--with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v : (reconfigured)
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --prefix=/usr/local/sh-elf
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v : (reconfigured)
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --prefix=/usr/local/sh-elf
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v : (reconfigured)
/usr/local/sh-elf/gcc-4.1.1/configure --target=sh-elf --prefix=/usr/local/sh-elf
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v
Thread model: single
gcc version 4.1.1
configure:2279: $? = 0
configure:2281:
/tmp/build/build_gcc/./gcc/xgcc -B/tmp/build/build_gcc/./gcc/ -nostdinc -B/tmp/build/build_gcc/sh-elf/m2a/newlib/
-isystem /tmp/build/build_gcc/sh-elf/m2a/newlib/targ-include -isystem
/usr/local/sh-elf/gcc-4.1.1/newlib/libc/include -B/usr/local/sh-elf/sh-elf/bin/
-B/usr/local/sh-elf/sh-elf/lib/ -isystem
/usr/local/sh-elf/sh-elf/include -isystem
/usr/local/sh-elf/sh-elf/sys-include -m2a -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2284: $? = 1
configure:2307: checking for C compiler default output file name
configure:2310:
/tmp/build/build_gcc/./gcc/xgcc -B/tmp/build/build_gcc/./gcc/ -nostdinc -B/tmp/build/build_gcc/sh-elf/m2a/newlib/
-isystem /tmp/build/build_gcc/sh-elf/m2a/newlib/targ-include -isystem
/usr/local/sh-elf/gcc-4.1.1/newlib/libc/include -B/usr/local/sh-elf/sh-elf/bin/
-B/usr/local/sh-elf/sh-elf/lib/ -isystem
/usr/local/sh-elf/sh-elf/include -isystem
/usr/local/sh-elf/sh-elf/sys-include -m2a -O2 -O2 conftest.c >&5
/tmp/build/build_gcc/./gcc/m2a/libgcc.a: could not read symbols: Archive has
no index; run ranlib to add one
collect2: ld returned 1 exit status
configure:2313: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libssp"
| #define PACKAGE_TARNAME "libssp"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "libssp 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "libssp"
| #define VERSION "1.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2352: error: C compiler cannot create executables
See `config.log' for more details.
I also noticed other config.logs relating to each libssp directories
contained error messages like next.
---
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'me'
configure:2749: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2893: checking for style of include used by make
conftest.c:11:28: error: ac_nonexistent.h: No such file or directory
configure:3256: $? = 1
configure: failed program was:
| /* confdefs.h. */
---
I do not know why it happened,and what I should do.
Would you someone please help me ?
I append the same /sh-elf/m2a/libssp/config.log and build logs
"configgcc.txt","makegcc.txt" in tar.bz2 format.
These are shell scripts.
===================================================
-- setup.sh : this is for set environment variables.
export TARGET=sh-elf
export PREFIX=/usr/local/sh-elf
export CFLAGS="-O2"
export CXXFLAGS="-O2"
export CFLAGS_FOR_TARGET="-Os"
export CXXFLAGS_FOR_TARGET="Os"
===================================================
appendpath.sh : this sets PATH to /usr/local/sh-elf/bin
PATH=$PATH:/usr/local/sh-elf/bin
===================================================
binutilsbuild.sh : this build binutils
/usr/local/sh-elf/binutils-2.16/configure --target=$TARGET --prefix=$PREFIX
2>&1 | tee config.out
make -w all install 2>&1 | tee makeall.out
===================================================
buildgcc-onetime.sh : this builds sh-elf-gcc
/usr/local/sh-elf/gcc-4.1.1/configure --target=$TARGET --prefix=$PREFIX --enable-languages=c,c++
--with-gnu-as --with-gnu-ld --with-newlib --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include
--with-ecos -v 2>&1 | tee configgcc.txt
make clean
make -w all install 2>&1 | tee makegcc.txt
===================================================
I am very much obliged to your help.
Thank you in advance.
Masahiro Ariga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log_files.tar.bz2
Type: application/octet-stream
Size: 54119 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20080215/067f0291/attachment.obj>
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list