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: 2
Joined: Fri Oct 18, 2013 6:44 am

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

Post by p1r473 » Wed Apr 19, 2017 12:08 pm

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: 365
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Post by dreammaster » Thu Apr 20, 2017 3:20 pm

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: 548
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy » Thu Apr 20, 2017 10:11 pm

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.

Post Reply