[x264-devel] x264 (GIT version) *or* 20090827-2245 snapshot failed to compile as x86_64 on Snow Leopard...weird CPU error

Jann Gobble janngobble at gmail.com
Sat Aug 29 05:39:00 CEST 2009


Hello all,

I hope this is the place to ask, so here goes

Platform: Snow Leopard

Here is my command:

export CFLAGS="-arch x86_64 -Wconversion -Wformat -Wshorten-64-to-32 - 
mmacosx-version-min=10.5" && ./configure --enable-shared  --enable-asm

Both the x264-snapshot-20090827-2245 AND the GIT version will not  
compile.

I added 2 echo statements to the cc_check so i could trace.

Here it is:

cc_check() {
     rm -f conftest.c
     [ -n "$1" ] && echo "#include <$1>" > conftest.c
     echo "int main () { $3 return 0; }" >> conftest.c
     #$CC conftest.c $CFLAGS $LDFLAGS $2 -o conftest 2>$DEVNULL
     echo $CC
     echo $CFLAGS
     echo $LDFLAGS
     echo $2
     $CC conftest.c $CFLAGS $LDFLAGS $2 -o conftest
}


Output:

/Developer/usr/bin/llvm-gcc-4.2
-arch x86_64 -Wconversion -Wformat -Wshorten-64-to-32 -mmacosx-version- 
min=10.5 -Wall -I. -falign-loops=16 -mdynamic-no-pic -march=i686 - 
mfpmath=sse -msse
-arch x86_64 -lm

conftest.c:1: error: CPU you selected does not support x86-64  
instruction set
No working C compiler found.

HOWEVER, when i replace x86_64 with i386 then it works:

export CFLAGS="-arch i386 -Wconversion -Wformat -Wshorten-64-to-32 - 
mmacosx-version-min=10.5" && ./configure --enable-shared  --enable-asm  
--enable-debug

/Developer/usr/bin/llvm-gcc-4.2
-arch i386 -Wconversion -Wformat -Wshorten-64-to-32 -mmacosx-version- 
min=10.5 -Wall -I. -falign-loops=16 -mdynamic-no-pic -march=i686 - 
mfpmath=sse -msse
-arch i386 -lm

/Developer/usr/bin/llvm-gcc-4.2
-arch i386 -Wconversion -Wformat -Wshorten-64-to-32 -mmacosx-version- 
min=10.5 -Wall -I. -falign-loops=16 -mdynamic-no-pic -march=i686 - 
mfpmath=sse -msse
-arch i386 -lm

/Developer/usr/bin/llvm-gcc-4.2
-arch i386 -Wconversion -Wformat -Wshorten-64-to-32 -mmacosx-version- 
min=10.5 -Wall -I. -falign-loops=16 -mdynamic-no-pic -march=i686 - 
mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_MACOSX
-arch i386 -lm
-lpthread
/Developer/usr/bin/llvm-gcc-4.2
-arch i386 -Wconversion -Wformat -Wshorten-64-to-32 -mmacosx-version- 
min=10.5 -Wall -I. -falign-loops=16 -mdynamic-no-pic -march=i686 - 
mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_MACOSX -DHAVE_PTHREAD
-arch i386 -lm -lpthread
-lgpac_static
conftest.c:1:27: error: gpac/isomedia.h: No such file or directory
/Developer/usr/bin/llvm-gcc-4.2
-O1 -g -arch i386 -Wconversion -Wformat -Wshorten-64-to-32 -mmacosx- 
version-min=10.5 -Wall -I. -falign-loops=16 -mdynamic-no-pic - 
march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_MACOSX - 
DHAVE_PTHREAD
-arch i386 -lm -lpthread

conftest.c: In function ‘main’:
conftest.c:2: warning: passing argument 2 of ‘fseeko’ with different  
width due to prototype
rm: conftest.dSYM: is a directory
Platform:   X86
System:     MACOSX
asm:        yes
avis input: no
mp4 output: no
pthread:    yes
debug:      yes
gprof:      no
PIC:        no
shared:     yes
visualize:  no

You can run 'make' or 'make fprofiled' now.


Any ideas?

TIA

Jann



More information about the x264-devel mailing list