Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Building libFLAC 1.3.2 for iOS (Read 2224 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Building libFLAC 1.3.2 for iOS

Hello,

I'd like to integrate FLAC support in an iOS audio app so I need to build libFLAC 1.3.2 for iOS targets, and I've been stuck on that for a while.

I tried to adapt Chris Ballinger's libOpus building script, my build_libflac.sh (curretnly not working) is attached.

I managed to take care of the dependency on libogg by downloading and extracting libogg 1.3.3 and adding --with-ogg=${LIBOGGDIR} option to the configure call.

All 5 compilations run smoothly, but when it comes to the lipo part, I get the following error (I simpliflied the paths with [...] for readibility) :
Code: [Select]
lipo: [...]/iPhoneOS11.2-armv7.sdk/lib/libFLAC.a and [...]/iPhoneOS11.2-armv7s.sdk/lib/libFLAC.a have the same architectures (x86_64) and can't be in the same fat output file

I tried the lipo command with several couples of built architectures, I get the same error every time: same architectures (x86_64).

If this can be of any information, I get the following output at the end of configure with armv7, armv7s or arm64 :
Code: [Select]
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-

  Configuration summary :

    FLAC version : ........................ 1.3.2

    Host CPU : ............................ arm
    Host Vendor : ......................... apple
    Host OS : ............................. darwin

    Compiler is GCC : ..................... no
    Compiler is Clang : ................... yes
    SSE optimizations : ................... yes
    Asm optimizations : ................... no
    Ogg/FLAC support : .................... yes

Any idea of how to get libFLAC built for iOS targets armv7, armv7s and arm64 ?

Thanks :)

Re: Building libFLAC 1.3.2 for iOS

Reply #1
Have you tried this library from Github? It worked for me a couple of months back when I needed the FLAC library for iOS.