Can't compile 1.9.0 'FLAC/export.h' file not found

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
p1r473
Posts: 5
Joined: Fri Oct 18, 2013 6:44 am

Can't compile 1.9.0 'FLAC/export.h' file not found

Post by p1r473 »

Hello!
I have been trying to compile ScummVM 1.9.0 for my iPad.

I am getting the error
/scumm/scummvm/audio/decoders/flac.cpp:38:10: 'FLAC/export.h' file not found

If I build 1.8.1 instead of 1.9 it works. But, how can I fix the error and build 1.9?

I am using a script I found to try to build it (doesn't seem to want to let me post a link to the source)

Code: Select all

#!/bin/bash
 
LIBS_ZIP_URL="http://bsr43.free.fr/scummvm/ScummVM-iOS-libraries.zip"
GIT_REPO_URL="https://github.com/scummvm/scummvm.git"
 
# Clone the repository
git clone "$GIT_REPO_URL"
 
# Compile create_project
(cd scummvm/devtools/create_project/xcode; xcodebuild)
 
# Create the workspace
mkdir build
cd build
curl -L "$LIBS_ZIP_URL" -O
unzip ScummVM-iOS-libraries.zip
rm ScummVM-iOS-libraries.zip
 
../scummvm/devtools/create_project/xcode/build/Release/create_project ../scummvm --xcode --enable-fluidsynth --disable-jpeg --disable-bink --disable-16bit --disable-mt32emu --disable-nasm --disable-opengl --disable-theora --disable-taskbar
open scummvm.xcodeproj
I can build 1.8.1 successfully by changing
git clone "GIT_REPO_URL"
to
git clone -b branch-1-8-1 "$GIT_REPO_URL"
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Post by dreammaster »

Maybe you don't have the flac library installed on your machine. If this is the case, you could either look up how to install the flac package, or disable it's usage in ScummVM - change the create_project line to add in an extra "--disable-flac" option to disable it.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

That is a strange error. The script is a bit outdated and results in a known error (this is discussed in the iPhone port subforum), but the error is about "curl/curl.h" not found, not about FLAC (FLAC itself is included in the zip file that the script gets and unzips, so it should be there).

The script will create a build directory where you execute it, and will unzip the content of ScummVM-iOS-libraries.zip there. So the file on which you get the error should be in build/include/FLAC/export.h

Note also that that script builds the latest version, which currently is 1.10pre and not 1.9. To build 1.9 you would need to use'-b branch-1-9-0' with the git clone command. Both have the same error with curl though.

To get around the curl issue with 1.9.0 and 1.10pre, you need to modify the create_project call in the script to add some options:

Code: Select all

../scummvm/devtools/create_project/xcode/build/Release/create_project ../scummvm --xcode --enable-fluidsynth --disable-jpeg --disable-bink --disable-16bit --disable-mt32emu --disable-nasm --disable-opengl --disable-theora --disable-taskbar --disable-cloud --disable-libcurl --disable-sdlnet
For me with those changes in the script I can compile without errors either 1.9.0 or 1.10pre. And I have never seen that FLAC related error.
8BitAirwaves
Posts: 22
Joined: Fri Oct 23, 2015 8:19 pm
Location: Boulder, Colorado
Contact:

Re: Can't compile 1.9.0 'FLAC/export.h' file not found

Post by 8BitAirwaves »

This bizarre error happened to me today while compiling 2.1.0 for iOS on Mojave. The file was in the correct location (Builds> include> FLAC>Export.h) but still got the same error.
What worked for me was compiling the standard (non-jailbroken) build via Terminal https://wiki.scummvm.org/index.php/Comp ... de_project and then I ran the following workspace prep code in terminal

Code: Select all

#!/bin/bash
LIBS_ZIP_URL="https://www.scummvm.org/frs/build/scummvm-ios7-libs.zip"
LIBS_ZIP_FILENAME="scummvm-libs.zip"
GIT_REPO_URL="https://github.com/scummvm/scummvm.git"

# Clone the repository
git clone "$GIT_REPO_URL"

# Compile create_project
(cd scummvm/devtools/create_project/xcode; xcodebuild)

# Create the workspace
mkdir build
cd build
curl -L "$LIBS_ZIP_URL" -o "$LIBS_ZIP_FILENAME"
unzip "$LIBS_ZIP_FILENAME"
rm "$LIBS_ZIP_FILENAME"

../scummvm/devtools/create_project/xcode/build/Release/create_project ../scummvm --xcode --enable-fluidsynth --disable-bink --disable-mt32emu --disable-nasm --disable-opengl --disable-theora --disable-taskbar --disable-libcurl --disable-sdlnet
open scummvm.xcodeproj
And that did the trick! Well in my case I then got a Mach-O Linker error, the fix for that was making sure Enable Bitcode was set to NO for both the Project and Target (Build Settings> Build Options> Enable Bitcode> NO)
Post Reply