Compiling 64-bit FLAC / libFLAC on OS X Lion

I would like to use the libFLAC dynamic libraries in the application that I am trying to create, but I am not too familiar with the configure and make arguments in order to actually get the FLAC to compile.

I tried CC="gcc -m64" CXX="g++ -m64" ./configure , and it seems to work fine without problems, but when I run make I still get

  [... 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

Any suggestions?

+4
source share
1 answer

To do this for compilation on Lion, disable assembler optimizations:

% ./configure --disable-asm-optimizations

+11
source

Source: https://habr.com/ru/post/1388823/


All Articles