[physfs] can't crosscompile - ./configure error

Martin Schaffner schaffner at gmx.li
Fri Jul 21 06:49:49 EDT 2006

On 20.07.2006, at 07:26, Francisco Gonzalez wrote:

> Hi,
> I'm trying to crosscompile physfs for the arm processor. But it fails
> at ./configure stage.
> Here's the output of ./configure:
> frajan at melee ~/svn/physfs
> $ ./configure --host=arm-unknown-linux-gnu  --target=arm-unknown- 
> linux-gnu --prefix=/usr/arm-unknown-linux-gnu
> configure: WARNING: If you wanted to set the --build type, don't  
> use --host.
>     If a cross compiler is detected then cross compile mode will be  
> used.
> checking build system type... x86_64-unknown-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 build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking for arm-unknown-linux-gnu-strip... arm-unknown-linux-gnu- 
> strip
> checking for arm-unknown-linux-gnu-gcc... arm-unknown-linux-gnu-gcc
> checking for C compiler default output file name... configure:  
> error: C
> compiler cannot create executables
> See `config.log' for more details.
> Here's the config.log:
> configure:2429: checking for C compiler default output file name
> configure:2432: arm-unknown-linux-gnu-gcc    conftest.c  >&5
> /lib/libc.so.6: file not recognized: File format not recognized
> collect2: ld returned 1 exit status
> configure:2435: $? = 1
> configure: failed program was:
> [...]
> configure:2474: error: C compiler cannot create executables
> Is ./configure trying to run the arm binary on my x86-64  
> processor? :-S
> I can crosscompile others programs/libs without problems, as I've
> crosscompiled libSDL and related libs.

To me, this looks more like a cross-compile problem than a physfs  
problem. Why are you specifying --target? I thought that option makes  
only sense for code-generating programs such as gcc and binutils. I  
would specify --build and --host, --build being the machine where you  
run configure and make, and --host being the machine where you intend  
to run the compiled program on. For --build, just add what ./ 
config.guess outputs.

Hope that helps,


More information about the physfs mailing list