From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yk0-f175.google.com ([209.85.160.175]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZZWeG-0007s6-Qf for ptxdist@pengutronix.de; Wed, 09 Sep 2015 06:06:17 +0200 Received: by ykdg206 with SMTP id g206so151132018ykd.1 for ; Tue, 08 Sep 2015 21:06:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <201509071140.02770.jbe@pengutronix.de> Date: Wed, 9 Sep 2015 12:06:09 +0800 Message-ID: From: Hardik A Gohil Subject: Re: [ptxdist] configure: error: cannot run C compiled programs List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1276120624==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: Juergen Borleis Cc: ptxdist@pengutronix.de, Prabhakara Rao Kolusu --===============1276120624== Content-Type: multipart/alternative; boundary=001a1139d20a3f5a5b051f489a7a --001a1139d20a3f5a5b051f489a7a Content-Type: text/plain; charset=UTF-8 Hello, from config.log configure:3084: result: gcc configure:3313: checking for C compiler version configure:3322: gcc --version >&5 gcc (OSELAS.Toolchain-2012.12.1 linaro-4.7-2012.11) 4.7.3 20121106 (prerelease) why cross-gcc is getting selected here where host-gcc need to be selected ? what wrong going on in environment ? On Tue, Sep 8, 2015 at 10:43 AM, Hardik A Gohil wrote: > > > On Mon, Sep 7, 2015 at 5:40 PM, Juergen Borleis > wrote: > >> Hi, >> >> On Monday 07 September 2015 10:56:12 Hardik A Gohil wrote: >> > I am working with phyCORE-AM335x-PD13.1.2 an getting the error >> > >> > Platform details: >> > >> > PTXCONF_GNU_TARGET="arm-cortexa8-linux-gnueabihf" >> > PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-" >> > >> > ------------------------------- >> > target: host-pkg-config.prepare >> > ------------------------------- >> > >> > checking for a BSD-compatible install... >> > /usr/local/lib/ptxdist-2013.01.0/bin/install -c >> > checking whether build environment is sane... yes >> > checking for a thread-safe mkdir -p... >> > /usr/local/lib/ptxdist-2013.01.0/bin/mkdir -p >> > checking for gawk... gawk >> > checking whether make sets $(MAKE)... yes >> > checking whether to enable maintainer-specific portions of Makefiles... >> no >> > checking build system type... x86_64-unknown-linux-gnu >> > checking host system type... x86_64-unknown-linux-gnu >> > checking for style of include used by make... GNU >> > checking for gcc... gcc >> > checking whether the C compiler works... yes >> > checking for C compiler default output file name... a.out >> > checking for suffix of executables... >> > checking whether we are cross compiling... configure: error: in >> > >> `/export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build-host >> >/pkg-config-0.25': configure: error: cannot run C compiled programs. >> > If you meant to cross compile, use `--host'. >> > See `config.log' for more details. >> > make: *** >> > >> [/export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/state/host >> >-pkg-config.prepare] Error 1 >> >> Strange. The autotools are using your native host compiler and its result >> isn't >> executable. >> >> [...] >> configure:3502: gcc -o >> conftest -isystem >> /export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/sysroot-host/include >> -L/export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/sysroot-host/lib >> -Wl,-rpath >> -Wl,/export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/sysroot-host/lib >> -Wl,-rpath >> -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages >> conftest.c >&5 >> configure:3506: $? = 0 >> configure:3513: ./conftest >> ./configure: line 3515: ./conftest: cannot execute binary file >> [...] >> >> Can you manually compile and run other programs? >> > > I tried to manually compile using > > #./configure > --prefix=/opt/PHYTEC_BSPs/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/sysroot-host > > > # make > > I am able to compile. > > -- > Regards > Hardik A Gohil > Willowglen Msc Bhd > > -- Regards Hardik A Gohil Willowglen Msc Bhd --001a1139d20a3f5a5b051f489a7a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

from config.log

confi= gure:3084: result: gcc
configure:3313: checking for C compiler versionconfigure:3322: gcc --version >&5
gcc (OSELAS.Toolchain-2012.12.1 linaro-4.7-2012.11) 4.= 7.3 20121106 (prerelease)


why cross-gcc is getting = selected here where host-gcc need to be selected ? what wrong going on in e= nvironment ?

On Tue, Sep 8, 2015 at 10:43 AM, Hardik A Gohil <= hardik@willow= glen.com.my> wrote:


On Mon, Sep 7, 2015 at 5:40 PM, Juergen Borleis <jbe@= pengutronix.de> wrote:
Hi,

On Monday 07 September 2015 10:56:12 Hardik A Gohil wrote:
> I am working with phyCORE-AM335x-PD13.1.2 an getting the error
>
> Platform details:
>
> PTXCONF_GNU_TARGET=3D"arm-cortexa8-linux-gnueabihf"
> PTXCONF_COMPILER_PREFIX=3D"${PTXCONF_GNU_TARGET}-"
>
> -------------------------------
> target: host-pkg-config.prepare
> -------------------------------
>
> checking for a BSD-compatible install...
> /usr/local/lib/ptxdist-2013.01.0/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p...
> /usr/local/lib/ptxdist-2013.01.0/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether to enable maintainer-specific portions of Makefiles..= . no
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... configure: error: in
> `/export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build= -host
>/pkg-config-0.25': configure: error: cannot run C compi= led programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
> make: ***
> [/export/home/os/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/state= /host
>-pkg-config.prepare] Error 1

Strange. The autotools are using your native host compiler and its r= esult isn't
executable.

[...]
configure:3502: gcc -o
conftest=C2=A0 -isystem /export/home/os/phyCORE-AM335x-PD13.1.2/platform-ph= yCORE-AM335x/sysroot-host/include -L/export/home/os/phyCORE-AM335x-PD13.1.2= /platform-phyCORE-AM335x/sysroot-host/lib -Wl,-rpath -Wl,/export/home/os/ph= yCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/sysroot-host/lib -Wl,-rpath -= Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/u= sing/dev/packages
conftest.c=C2=A0 >&5
configure:3506: $? =3D 0
configure:3513: ./conftest
./configure: line 3515: ./conftest: cannot execute binary file
[...]

Can you manually compile and run other programs?

<= /div>
I tried to manually compile using

#./configure= --prefix=3D/opt/PHYTEC_BSPs/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335= x/sysroot-host

# make=C2=A0
<= br>
I am able to compile.
=

--
Regards
Hardik A Gohil
Willowglen Msc Bhd




--
Regards
H= ardik A Gohil
Willowglen Msc Bhd

--001a1139d20a3f5a5b051f489a7a-- --===============1276120624== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCnB0eGRpc3QgbWFpbGluZyBsaXN0CnB0eGRpc3RAcGVuZ3V0cm9uaXguZGUK --===============1276120624==--