This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CrossCompiler Build error: cannot create executables


Hello everyone,

I am a newer to this mailing-list.
I tried 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

I made setup.sh to set environment variables like TARGET,PREFIX etc.
-- setup.sh
export TARGET=sh-elf
export HOST=i686-pc-cygwin
export BUILD=i686-pc-cygwin
export PREFIX=/usr/local/sh-elf
export CFLAGS="-O2"
export CXXFLAGS="-O2"
export CFLAGS_FOR_TARGET="-Os"
export CXXFLAGS_FOR_TARGET="Os"

First of all I built binutils using binutilsbuild.sh
and this succeeded without any trouble.
--binutilsbuild.sh
/usr/local/sh-elf/binutils-2.16/configure --target=$TARGET --host=$HOST --build=$BUILD
--prefix=$PREFIX 2>&1 | tee config.out
make 2>&1 | tee makeall.out
make install 2>&1 | tee makeinstall.out

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.
-- appendpath.sh
PATH=$PATH:/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
-- buildgcc-onetime.sh
/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


$ cd /tmp/build/build_gcc
$ . buildgcconetime.sh

And then I was encountered next error,

-- from error log
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
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/sh-elf/m2a/newlib/libc.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 please help me ?

I append the same /sh-elf/m2a/libssp/config.log and build logs "configgcc.txt","makegcc.txt" in
tar.bz2 format.


I am very much obliged to your help.
Thank you in advance.

Masahiro Ariga

Attachment: log_files.tar.bz2
Description: Binary data

--
For unsubscribe information see http://sourceware.org/lists.html#faq

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]