Compiling 1.9.0git with Xcode 8

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
Purduecoz
Posts: 8
Joined: Wed Jul 20, 2011 10:30 pm

Compiling 1.9.0git with Xcode 8

Post by Purduecoz »

Has anyone been successful in doing so? I get some Xcode errors about missing files. I am using bSr43's prepare_workspace.sh script to grab the source code, dependencies and set up the Xcode project.

Thank you!
jobeus
Posts: 6
Joined: Wed Nov 17, 2010 5:02 am

Post by jobeus »

Got it running w/ this create_project command-line:

Code: Select all

./create_project ../scummvm --xcode --enable-fluidsynth --disable-jpeg --disable-bink --disable-16bit --disable-mt32emu --disable-nasm --disable-opengl --disable-theora --disable-taskbar --disable-sdlnet --disable-libcurl --disable-cloud
The last bit

Code: Select all

--disable-sdlnet --disable-libcurl --disable-cloud
being the most important change.

YMMV.
User avatar
bobbygiovannucci
Posts: 10
Joined: Fri Jun 17, 2016 8:15 pm

Post by bobbygiovannucci »

i keep getting this error in the terminal on my 2009 macbook. ./prepare_workspace.sh: line 1: create_project: command not found

any idea what i'm doing wrong. i am a complete newbie when it come to command line stuff. thanks in advance for any help i can get.
robbo007
Posts: 10
Joined: Tue Oct 28, 2008 3:32 pm

Post by robbo007 »

Has anyone got this working under MacOS Sierra and Xcode 8.3.3 ?

I get the following error:

../scummvm/devtools/create_project/xcode/build/Release/create_project: No such file or directory

Looks like the path or file names have changed.

This is the script I'm using:

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/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'm following this guide to install on iOS:
http://blog.pmlabs-apps.com/scummvm-on- ... jailbreak/

Any help most appreciated.
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

It looks like the "xcodebuild" step is failing to build the create_project tool or to the correct location.

As can be seen by looking at the XCode project file to build create_project, this was originally written for XCode 3.2 and OSX 10.5 compatibility, though it _should_ work on later versions:
https://github.com/scummvm/scummvm/blob ... xproj#L152
https://github.com/scummvm/scummvm/blob ... xproj#L217

The last fix commits to this project file were made by bsr43 who wrote that script... so it _should_ work fine, but I suspect that newer versions of xcodebuild may need some further directives.

One thing to do is to create the directories:
scummvm/devtools/create_project/xcode/build/Release
scummvm/devtools/create_project/xcode/build/Debug

and then retry the xcodebuild and following steps to see if you get a working create_project binary.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

I just tried it with Xcode 8.3.3 under macOS Sierra after deleting my previous scummvm/devtools/create_project/xcode/build directory and everything still works perfectly for me.
robbo007
Posts: 10
Joined: Tue Oct 28, 2008 3:32 pm

Post by robbo007 »

I notice another error on the script. I've created the directories as indicated in the post.

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance


Here is the full output.

Code: Select all

sh-3.2# ./prepare_workspace.sh 
fatal: destination path 'scummvm' already exists and is not an empty directory.
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
mkdir: build: File exists
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14.7M  100 14.7M    0     0   195k      0  0:01:17  0:01:17 --:--:--  371k
Archive:  ScummVM-iOS-libraries.zip
replace include/FLAC/all.h? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: include/FLAC/all.h      
  inflating: include/FLAC/assert.h   
  inflating: include/FLAC/callback.h  
  inflating: include/FLAC/export.h   
  inflating: include/FLAC/format.h   
  inflating: include/FLAC/metadata.h  
  inflating: include/FLAC/ordinals.h  
  inflating: include/FLAC/stream_decoder.h  
  inflating: include/FLAC/stream_encoder.h  
  inflating: include/FLAC++/all.h    
  inflating: include/FLAC++/decoder.h  
  inflating: include/FLAC++/encoder.h  
  inflating: include/FLAC++/export.h  
  inflating: include/FLAC++/metadata.h  
  inflating: include/fluidsynth/audio.h  
  inflating: __MACOSX/include/fluidsynth/._audio.h  
  inflating: include/fluidsynth/event.h  
  inflating: __MACOSX/include/fluidsynth/._event.h  
  inflating: include/fluidsynth/gen.h  
  inflating: __MACOSX/include/fluidsynth/._gen.h  
  inflating: include/fluidsynth/log.h  
  inflating: __MACOSX/include/fluidsynth/._log.h  
  inflating: include/fluidsynth/midi.h  
  inflating: __MACOSX/include/fluidsynth/._midi.h  
  inflating: include/fluidsynth/misc.h  
  inflating: __MACOSX/include/fluidsynth/._misc.h  
  inflating: include/fluidsynth/mod.h  
  inflating: __MACOSX/include/fluidsynth/._mod.h  
  inflating: include/fluidsynth/ramsfont.h  
  inflating: __MACOSX/include/fluidsynth/._ramsfont.h  
  inflating: include/fluidsynth/seq.h  
  inflating: __MACOSX/include/fluidsynth/._seq.h  
  inflating: include/fluidsynth/seqbind.h  
  inflating: __MACOSX/include/fluidsynth/._seqbind.h  
  inflating: include/fluidsynth/settings.h  
  inflating: __MACOSX/include/fluidsynth/._settings.h  
  inflating: include/fluidsynth/sfont.h  
  inflating: __MACOSX/include/fluidsynth/._sfont.h  
  inflating: include/fluidsynth/shell.h  
  inflating: __MACOSX/include/fluidsynth/._shell.h  
  inflating: include/fluidsynth/synth.h  
  inflating: __MACOSX/include/fluidsynth/._synth.h  
  inflating: include/fluidsynth/types.h  
  inflating: __MACOSX/include/fluidsynth/._types.h  
  inflating: include/fluidsynth/version.h  
  inflating: __MACOSX/include/fluidsynth/._version.h  
  inflating: include/fluidsynth/voice.h  
  inflating: __MACOSX/include/fluidsynth/._voice.h  
  inflating: __MACOSX/include/._fluidsynth  
  inflating: include/fluidsynth.h    
  inflating: __MACOSX/include/._fluidsynth.h  
  inflating: include/freetype/config/ftconfig.h  
  inflating: include/freetype/config/ftheader.h  
  inflating: include/freetype/config/ftmodule.h  
  inflating: include/freetype/config/ftoption.h  
  inflating: include/freetype/config/ftstdlib.h  
  inflating: include/freetype/freetype.h  
  inflating: include/freetype/ftadvanc.h  
  inflating: include/freetype/ftbbox.h  
  inflating: include/freetype/ftbdf.h  
  inflating: include/freetype/ftbitmap.h  
  inflating: include/freetype/ftcache.h  
  inflating: include/freetype/ftchapters.h  
  inflating: include/freetype/ftcid.h  
  inflating: include/freetype/fterrdef.h  
  inflating: include/freetype/fterrors.h  
  inflating: include/freetype/ftgasp.h  
  inflating: include/freetype/ftglyph.h  
  inflating: include/freetype/ftgxval.h  
  inflating: include/freetype/ftgzip.h  
  inflating: include/freetype/ftimage.h  
  inflating: include/freetype/ftincrem.h  
  inflating: include/freetype/ftlcdfil.h  
  inflating: include/freetype/ftlist.h  
  inflating: include/freetype/ftlzw.h  
  inflating: include/freetype/ftmac.h  
  inflating: include/freetype/ftmm.h  
  inflating: include/freetype/ftmodapi.h  
  inflating: include/freetype/ftmoderr.h  
  inflating: include/freetype/ftotval.h  
  inflating: include/freetype/ftoutln.h  
  inflating: include/freetype/ftpfr.h  
  inflating: include/freetype/ftrender.h  
  inflating: include/freetype/ftsizes.h  
  inflating: include/freetype/ftsnames.h  
  inflating: include/freetype/ftstroke.h  
  inflating: include/freetype/ftsynth.h  
  inflating: include/freetype/ftsystem.h  
  inflating: include/freetype/fttrigon.h  
  inflating: include/freetype/fttypes.h  
  inflating: include/freetype/ftwinfnt.h  
  inflating: include/freetype/ftxf86.h  
  inflating: include/freetype/internal/autohint.h  
  inflating: include/freetype/internal/ftcalc.h  
  inflating: include/freetype/internal/ftdebug.h  
  inflating: include/freetype/internal/ftdriver.h  
  inflating: include/freetype/internal/ftgloadr.h  
  inflating: include/freetype/internal/ftmemory.h  
  inflating: include/freetype/internal/ftobjs.h  
  inflating: include/freetype/internal/ftpic.h  
  inflating: include/freetype/internal/ftrfork.h  
  inflating: include/freetype/internal/ftserv.h  
  inflating: include/freetype/internal/ftstream.h  
  inflating: include/freetype/internal/fttrace.h  
  inflating: include/freetype/internal/ftvalid.h  
  inflating: include/freetype/internal/internal.h  
  inflating: include/freetype/internal/pcftypes.h  
  inflating: include/freetype/internal/psaux.h  
  inflating: include/freetype/internal/pshints.h  
  inflating: include/freetype/internal/services/svbdf.h  
  inflating: include/freetype/internal/services/svcid.h  
  inflating: include/freetype/internal/services/svgldict.h  
  inflating: include/freetype/internal/services/svgxval.h  
  inflating: include/freetype/internal/services/svkern.h  
  inflating: include/freetype/internal/services/svmm.h  
  inflating: include/freetype/internal/services/svotval.h  
  inflating: include/freetype/internal/services/svpfr.h  
  inflating: include/freetype/internal/services/svpostnm.h  
  inflating: include/freetype/internal/services/svpscmap.h  
  inflating: include/freetype/internal/services/svpsinfo.h  
  inflating: include/freetype/internal/services/svsfnt.h  
  inflating: include/freetype/internal/services/svttcmap.h  
  inflating: include/freetype/internal/services/svtteng.h  
  inflating: include/freetype/internal/services/svttglyf.h  
  inflating: include/freetype/internal/services/svwinfnt.h  
  inflating: include/freetype/internal/services/svxf86nm.h  
  inflating: include/freetype/internal/sfnt.h  
  inflating: include/freetype/internal/t1types.h  
  inflating: include/freetype/internal/tttypes.h  
  inflating: include/freetype/t1tables.h  
  inflating: include/freetype/ttnameid.h  
  inflating: include/freetype/tttables.h  
  inflating: include/freetype/tttags.h  
  inflating: include/freetype/ttunpat.h  
  inflating: include/ft2build.h      
  inflating: include/mad.h           
  inflating: __MACOSX/include/._mad.h  
  inflating: include/ogg/config_types.h.in  
  inflating: include/ogg/Makefile.am  
  inflating: include/ogg/Makefile.in  
  inflating: include/ogg/ogg.h       
  inflating: include/ogg/os_types.h  
  inflating: include/png.h           
  inflating: include/pngconf.h       
  inflating: include/pnglibconf.h    
  inflating: include/private/all.h   
  inflating: include/private/bitmath.h  
  inflating: include/private/bitreader.h  
  inflating: include/private/bitwriter.h  
  inflating: include/private/cpu.h   
  inflating: include/private/crc.h   
  inflating: include/private/fast_float_math_hack.h  
  inflating: include/private/fixed.h  
  inflating: include/private/float.h  
  inflating: include/private/format.h  
  inflating: include/private/lpc.h   
  inflating: include/private/md5.h   
  inflating: include/private/memory.h  
  inflating: include/private/metadata.h  
  inflating: include/private/pngpriv.h  
  inflating: include/private/stream_encoder_framing.h  
  inflating: include/private/window.h  
  inflating: include/protected/all.h  
  inflating: include/protected/stream_decoder.h  
  inflating: include/protected/stream_encoder.h  
  inflating: include/share/alloc.h   
  inflating: include/share/getopt.h  
  inflating: include/share/grabbag/cuesheet.h  
  inflating: include/share/grabbag/file.h  
  inflating: include/share/grabbag/picture.h  
  inflating: include/share/grabbag/replaygain.h  
  inflating: include/share/grabbag/seektable.h  
  inflating: include/share/grabbag.h  
  inflating: include/share/replaygain_analysis.h  
  inflating: include/share/replaygain_synthesis.h  
  inflating: include/share/utf8.h    
  inflating: include/test_libs_common/file_utils_flac.h  
  inflating: include/test_libs_common/metadata_utils.h  
  inflating: include/vorbis/codec.h  
  inflating: include/vorbis/Makefile.am  
  inflating: include/vorbis/Makefile.in  
  inflating: include/vorbis/vorbisenc.h  
  inflating: include/vorbis/vorbisfile.h  
  inflating: lib/libffi.a            
  inflating: lib/libFLAC.a           
  inflating: lib/libfluidsynth.a     
  inflating: lib/libfreetype.a       
  inflating: lib/libglib.a           
  inflating: lib/libmad.a            
  inflating: lib/libogg.a            
  inflating: lib/libpng.a            
  inflating: lib/libvorbis.a         
./prepare_workspace.sh: line 19: ../scummvm/devtools/create_project/xcode/build/Release/create_project: No such file or directory
The file /Users/rcraig/Desktop/scumm/build/scummvm.xcodeproj does not exist.
sh-3.2# 
Excuse my lameness but I've not dabbled much in Xcode.

Cheers,
Rob
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

Since you wrote you have Xcode 8.3.3, I assume you installed Xcode from the AppStore already. I suspect you may however be missing the command line tools. You can install them from Xcode itself, or by running the following in a Terminal:

Code: Select all

xcode-select --install
Try that and see if it fixes your issue.

Edit: I believe you may also need to start the Xcode application at least once to accept the terms and conditions before you can use the command line tools. So if you never used Xcode before, start it once.

Edit 2: and read further up this thread as well. This is not causing your issue but you will need to edit the script to disable sdlnet, libcurl and cloud to avoid more issues later on.
robbo007
Posts: 10
Joined: Tue Oct 28, 2008 3:32 pm

Post by robbo007 »

Got it working thanks guys.

I had the command line tools installed but under preferences locations in Xcode the Command Line Tools locations was empty. I had to click on the pull down menu to choose the tools.

Does Roland Mt32 emulation work? I see in the build parameter its set to --disable-mt32emu?

Thanks,
Rob
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

robbo007 wrote:Does Roland Mt32 emulation work? I see in the build parameter its set to --disable-mt32emu?
I don't know. But you could remove the --disable-mt32emu, rerun the script and compilation, and let us know.

I think it should compile, and it might work. I am not sure about performances, but I would expect recent enough devices to be able to handle it.
robbo007
Posts: 10
Joined: Tue Oct 28, 2008 3:32 pm

Post by robbo007 »

Just tried removing the flags and recompiling/ reinstalling.

Under the main options its selectable but the games don't seem to use it. I've tried forcing it under the game options but there is not Roland m32 emulator available in the drop down menu. strange.

These are sierra games I'm testing that have MT32 support.
Cheers,
Rob
robegamesios
Posts: 1
Joined: Mon Oct 09, 2017 4:33 am

Post by robegamesios »

I cannot compile in Xcode 8.3.3:

ld: library not found for -lvorbisfile
clang: error: linker command failed with exit code 1 (use -v to see invocation)

any help? thanks
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

robegamesios: That is a warning about the Vorbis library not being found.

I assume that you have read through the previous parts of this thread and have used the prepare_workspace.sh script from robbo07 ?

That script downloads and sets up the required precompiled libraries including Vorbis:
http://blog.pmlabs-apps.com/scummvm-on- ... jailbreak/
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

robegamesios wrote:ld: library not found for -lvorbisfile
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error is due to the package from the blog post above using non-standard library names.

In september we sanitised our tool that creates the Xcode project and as a result those non-standard names no longer work. We also introduced a bug, but I fixed this today. I also prepared a package with correct libraries and new instructions that will work with the latest source code. You can find those on our wiki and they should work with the latest ScummVM source code.
Post Reply