From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29593 invoked by alias); 27 Jan 2014 21:31:53 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 29582 invoked by uid 89); 27 Jan 2014 21:31:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f54.google.com Received: from mail-qa0-f54.google.com (HELO mail-qa0-f54.google.com) (209.85.216.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Jan 2014 21:31:51 +0000 Received: by mail-qa0-f54.google.com with SMTP id i13so7961042qae.41 for ; Mon, 27 Jan 2014 13:31:49 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.140.49.200 with SMTP id q66mr13197126qga.103.1390858309102; Mon, 27 Jan 2014 13:31:49 -0800 (PST) Received: by 10.140.92.129 with HTTP; Mon, 27 Jan 2014 13:31:49 -0800 (PST) In-Reply-To: References: Date: Mon, 27 Jan 2014 21:31:00 -0000 Message-ID: Subject: Fwd: Crosscompilation for ARM fails (C compiler cannot create executables error) From: Francisco Cuesta To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2014-01/txt/msg00028.txt.bz2 Hello, I am trying to cross-compile gdbserver 7.5 (not 7.6 since I was trying to compile directly from scratch for my x86 and I got an pointer casting error which aborted its compilation)for my target whose architecture is ARM. I have read the document https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver , and I have come across with the following script which fires the crosscompilation options #part for compiling just gdbserver mkdir buil-gdbserver/ cd buil-gdbserver/ export CC="/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc" export CXX="/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-g++" export AR="/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-ar" CONFOPTS+="--target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu " ~/gdb-7.5/configure ${CONFOPTS} However when I run the script with make, I got ubuntu:~/gdb-7.5/build-gdbserver$ ./gdbCompiler.sh mkdir: cannot create directory `buil-gdbserver/': File exists checking build system type... i686-pc-linux-gnu checking host system type... arm-unknown-linux-gnu checking target system type... arm-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /bin/sed checking for gawk... gawk checking for arm-linux-gcc... /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc checking for C compiler default output file name... configure: error: in `/home/j/gdb-7.5/build-gdbserver/buil-gdbserver': configure: error: C compiler cannot create executables See `config.log' for more details. Looking into the config.log,below, I can read in the highlight text the fact that it isn't pointing at the correct gcc cros-compiler, but I cannot understand why, if the path is the proper one... What may it be happening? Thanks in advance, BEst regards It was created by configure, which was generated by GNU Autoconf 2.64. Invocation command line was $ /home/j/gdb-7.5/configure --target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu ## --------- ## ## Platform. ## ## --------- ## hostname = ubuntu uname -m = x86_64 uname -r = 3.8.0-29-generic uname -s = Linux uname -v = #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/lib/lightdm/lightdm PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games ## ----------- ## ## Core tests. ## ## ----------- ## configure:2237: checking build system type configure:2251: result: i686-pc-linux-gnu configure:2298: checking host system type configure:2311: result: arm-unknown-linux-gnu configure:2331: checking target system type configure:2344: result: arm-unknown-linux-gnu configure:2398: checking for a BSD-compatible install configure:2466: result: /usr/bin/install -c configure:2477: checking whether ln works configure:2499: result: yes configure:2503: checking whether ln -s works configure:2507: result: yes configure:2514: checking for a sed that does not truncate output configure:2578: result: /bin/sed configure:2587: checking for gawk configure:2603: found /usr/bin/gawk configure:2614: result: gawk configure:3727: checking for arm-linux-gcc configure:3754: result: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc configure:4023: checking for C compiler version configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc --version >&5 /home/j/gdb-7.5/configure: line 4034: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or directory configure:4043: $? = 127 configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc -v >&5 /home/j/gdb-7.5/configure: line 4034: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or directory configure:4043: $? = 127 configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc -V >&5 /home/j/gdb-7.5/configure: line 4034: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or directory configure:4043: $? = 127 configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc -qversion >&5 /home/j/gdb-7.5/configure: line 4034: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or directory configure:4043: $? = 127 configure:4063: checking for C compiler default output file name configure:4085: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc conftest.c >&5 /home/j/gdb-7.5/configure: line 4087: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or directory configure:4089: $? = 127 configure:4126: result: configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:4132: error: in `/home/j/gdb-7.5/build-gdbserver/buil-gdbserver': configure:4136: error: C compiler cannot create executables See `config.log' for more details.