在OS X Lion中编译64位FLAC / libFLAC

时间:2012-01-01 18:21:21

标签: makefile osx-lion 64-bit configure

我想在我正在尝试构建的应用程序中使用libFLAC动态库,但我不太熟悉configuremake参数来实际获取FLAC进行编译。

我尝试CC="gcc -m64" CXX="g++ -m64" ./configure并且看起来运行正常而没有问题,但是当我运行make时,我仍然得到

[...lots of output with seemingly no errors...]  
/usr/bin/ranlib: archive member: .libs/libFLAC.a(bitreader_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
/usr/bin/ranlib: archive member: .libs/libFLAC.a(cpu_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
/usr/bin/ranlib: archive member: .libs/libFLAC.a(fixed_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
/usr/bin/ranlib: archive member: .libs/libFLAC.a(lpc_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
/usr/bin/ranlib: archive member: .libs/libFLAC.a(stream_encoder_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
ranlib .libs/libFLAC.a
ranlib: archive member: .libs/libFLAC.a(bitreader_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
ranlib: archive member: .libs/libFLAC.a(cpu_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
ranlib: archive member: .libs/libFLAC.a(fixed_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
ranlib: archive member: .libs/libFLAC.a(lpc_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
ranlib: archive member: .libs/libFLAC.a(stream_encoder_asm.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)
ranlib: for architecture: x86_64 file: .libs/libFLAC.a(float.o) has no symbols  
make[4]: *** [libFLAC.la] Error 1  
make[3]: *** [all-recursive] Error 1  
make[2]: *** [all-recursive] Error 1  
make[1]: *** [all-recursive] Error 1  
make: *** [all] Error 2

有什么建议吗?

1 个答案:

答案 0 :(得分:11)

要在Lion上编译它,请禁用汇编程序优化:

% ./configure --disable-asm-optimizations