Kodi Community Forum
[MAC] Compiling on OSX Lion / Xcode 4.1` - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [MAC] Compiling on OSX Lion / Xcode 4.1` (/showthread.php?tid=107126)

Pages: 1 2 3 4 5 6 7 8 9 10


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - mm_half3 - 2013-03-17

(2012-06-04, 12:37)davilla Wrote: you better have build depends with -arch x86_64 or the xcode build will not find them Smile

This is a hint "xbmc/addons/IAddon.h:25:45: error: boost/enable_shared_from_this.hpp: No such file or directory"

In general, sdk versions and arch MUST match between the depends build and what xcode uses. That's why they are called 'depends' Smile

"-I/Users/Shared/xbmc-depends/macosx10.6_x86_64/include"

See the path name ? It combines the sdk version and the arch.


Hello,

Sorry to bring up an old thread, but it looks like I may be running into the same problem being warned about in davilla's post. Trying to compile xbmc on a Mac OsX 10.7.3 lion system using Xcode 4.2.1 to incorporate some new Aspect Ratios, and can't seem to get a successful build from the github repository source. I was able to get it to compile a binary and package a working dmg file using a 12.01 source code tarball (I cant' seem to find this file with net searches again....not sure where I got it, xbmc-12.01.tar.gz), without any special deviation from the doc/README.osx file, other than defining the XBMC_HOME and XBMC_DARWIN_RELEASE environment variables at the beginning.

But when I attempt to do the same steps using the github source, getting a lot of errors like the one in the hint above. Been trying to follow davilla's suggestion of making sure to build depends with -arch x86_64, but not sure exactly what step he is warning about, and how to incorporate it.

I run the following steps in trying to build xbmc:

cd $HOME
git clone git://github.com/xbmc/xbmc.git XBMC
cd $HOME/XBMC
export XBMC_HOME=`pwd`
export XBMC_DARWIN_RELEASE=Release
cd xbmc/utils/
scp [email protected]:/var/tmp/xbmc_mods/xbmc/utils/StreamDetails.cpp_mod StreamDetails.cpp (note this is to get the modified AR code)

cd tools/darwin/depends/
./bootstrap
./configure --with-darwin=osx --with-arch=x86_64
make

cd $HOME/XBMC
make -C tools/darwin/depends/xbmc
make clean
make xcode_depends

make -C lib/addons/script.module.pil
xcodebuild -sdk macosx10.7 -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES -arch x86_64 VALID_ARCHS=x86_64 \ -configuration Release build

** BUILD SUCCEEDED **

make -C tools/darwin/packaging/xbmc-osx

this created a dmg file in $XBMC_HOME; $XBMC_HOME/XBMC_for_Mac.dmg



As stated earlier this process worked with the tarball but is failing on the github source. The failure is at:

xcodebuild -sdk macosx10.7 -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES -arch x86_64 VALID_ARCHS=x86_64 -configuration Release build

The errors returned are
Code:
xcodebuild -sdk macosx10.7 -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES -arch x86_64 VALID_ARCHS=x86_64  -configuration Release build
Build settings from command line:
    ARCHS = x86_64
    ONLY_ACTIVE_ARCH = YES
    SDKROOT = macosx10.7
    VALID_ARCHS = x86_64

=== BUILD NATIVE TARGET XBMC OF PROJECT XBMC WITH CONFIGURATION Release ===
Check dependencies

PhaseScriptExecution "Make interface-python" build/XBMC.build/Release/XBMC.build/Script-F502C011160F378F00C96C76.sh
    cd /Users/stephany/XBMC
    setenv ACTION build
    setenv ALTERNATE_GROUP staff
    setenv ALTERNATE_MODE u+w,go-w,a+rX
    setenv ALTERNATE_OWNER stephany
    setenv ALWAYS_SEARCH_USER_PATHS YES
    setenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer
    setenv APPLE_INTERNAL_DIR /AppleInternal
    setenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation
    setenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library
    setenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools
    setenv APPLY_RULES_IN_COPY_FILES NO
    setenv ARCHS x86_64
    setenv ARCHS_STANDARD_32_64_BIT "x86_64 i386"
    setenv ARCHS_STANDARD_32_BIT i386
    setenv ARCHS_STANDARD_64_BIT x86_64
    setenv AVAILABLE_PLATFORMS "iphonesimulator macosx iphoneos"
    setenv BUILD_COMPONENTS "headers build"
    setenv BUILD_DIR /Users/stephany/XBMC/build
    setenv BUILD_ROOT /Users/stephany/XBMC/build
    setenv BUILD_STYLE
    setenv BUILD_VARIANTS normal
    setenv BUILT_PRODUCTS_DIR /Users/stephany/XBMC/build/Release
    setenv CACHE_ROOT /var/folders/dw/x6wzcrb964b3xps16c1k9p2r0000gv/C/com.apple.Xcode.507
    setenv CCHROOT /var/folders/dw/x6wzcrb964b3xps16c1k9p2r0000gv/C/com.apple.Xcode.507
  

*** a bunch more setenv lines removed******


  setenv USER_APPS_DIR /Users/stephany/Applications
    setenv USER_HEADER_SEARCH_PATHS "/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include /Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/libcec /Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/mysql /Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/freetype2 /Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/python2.6"
    setenv USER_LIBRARY_DIR /Users/stephany/Library
    setenv USE_DYNAMIC_NO_PIC YES
    setenv USE_HEADERMAP NO
    setenv USE_HEADER_SYMLINKS NO
    setenv VALIDATE_PRODUCT NO
    setenv VALID_ARCHS x86_64
    setenv VERBOSE_PBXCP NO
    setenv VERSION_INFO_BUILDER stephany
    setenv VERSION_INFO_FILE XBMC_vers.c
    setenv VERSION_INFO_STRING "\"@(#)PROGRAM:XBMC  PROJECT:XBMC-\""
    setenv XBMC_DEPENDS /Users/Shared/xbmc-depends/macosx10.7_x86_64-target
    setenv XCODE_APP_SUPPORT_DIR /Developer/Library/Xcode
    setenv XCODE_PRODUCT_BUILD_VERSION 4D502
    setenv XCODE_VERSION_ACTUAL 0421
    setenv XCODE_VERSION_MAJOR 0400
    setenv XCODE_VERSION_MINOR 0420
    setenv YACC /Developer/usr/bin/yacc
    setenv ZERO_LINK NO
    /bin/sh -c /Users/stephany/XBMC/build/XBMC.build/Release/XBMC.build/Script-F502C011160F378F00C96C76.sh
Warning: No doxygen installed. The Api will not have any docstrings.
mkdir -p xbmc/interfaces/python/generated/doxygenxml

CompileC build/XBMC.build/Release/XBMC.build/Objects-normal/x86_64/Application.o xbmc/Application.cpp normal x86_64 c++ com.apple.compilers.llvmgcc42
    cd /Users/stephany/XBMC
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/llvm-gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -Wsign-compare -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX -D_REENTRANT -D_FILE_DEFINED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -DHAS_SDL_JOYSTICK -DHAVE_CONFIG_H -DHAS_SPC_CODEC -isysroot /Developer/SDKs/MacOSX10.7.sdk -fasm-blocks -funroll-loops -mmacosx-version-min=10.6 -gdwarf-2 -msse3 -mssse3 -msse4.1 -msse4.2 -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/libcec -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/mysql -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/freetype2 -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/python2.6 -I/Users/stephany/XBMC/build/Release/include -I/Users/stephany/XBMC -Ixbmc -Ixbmc/linux -Ixbmc/cores/dvdplayer -Ilib -Ilib/ffmpeg -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/libcec -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/mysql -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/freetype2 -I/Users/Shared/xbmc-depends/macosx10.7_x86_64-target/include/python2.6 -I/Users/stephany/XBMC/build/XBMC.build/Release/XBMC.build/DerivedSources/x86_64 -I/Users/stephany/XBMC/build/XBMC.build/Release/XBMC.build/DerivedSources -F/Users/stephany/XBMC/build/Release -Wreorder -c /Users/stephany/XBMC/xbmc/Application.cpp -o /Users/stephany/XBMC/build/XBMC.build/Release/XBMC.build/Objects-normal/x86_64/Application.o
In file included from /Users/stephany/XBMC/xbmc/guilib/IMsgTargetCallback.h:31,
                 from /Users/stephany/XBMC/xbmc/Application.h:26,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:24:
/Users/stephany/XBMC/xbmc/guilib/GUIMessage.h:289:32: error: boost/shared_ptr.hpp: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/network/WebServer.h:34,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:41:
/Users/stephany/XBMC/xbmc/network/httprequesthandler/IHTTPRequestHandler.h:32:24: error: microhttpd.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/network/httprequesthandler/HTTPWebinterfaceHandler.h:23,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:48:
xbmc/addons/IAddon.h:24:45: error: boost/enable_shared_from_this.hpp: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/addons/Addon.h:23,
                 from /Users/stephany/XBMC/xbmc/addons/Skin.h:23,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:59:
xbmc/addons/AddonVersion.h:24:31: error: boost/operators.hpp: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/addons/Addon.h:24,
                 from /Users/stephany/XBMC/xbmc/addons/Skin.h:23,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:59:
xbmc/utils/XBMCTinyXML.h:51:21: error: tinyxml.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/filesystem/StackDirectory.h:24,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:72:
xbmc/utils/RegExp.h:33:18: error: pcre.h: No such file or directory
In file included from xbmc/rendering/gl/RenderSystemGL.h:27,
                 from /Users/stephany/XBMC/xbmc/windowing/osx/WinSystemOSXGL.h:27,
                 from /Users/stephany/XBMC/xbmc/windowing/WindowingFactory.h:51,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:93:
xbmc/system_gl.h:42:25: error: GL/glew.h: No such file or directory
/Users/stephany/XBMC/xbmc/Application.cpp:107:21: error: SDL/SDL.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/filesystem/AFPFile.h:31,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:124:
/Users/stephany/XBMC/xbmc/filesystem/DllLibAfp.h:29:35: error: afpfs-ng/libafpclient.h: No such file or directory
/Users/stephany/XBMC/xbmc/filesystem/DllLibAfp.h:30:30: error: afpfs-ng/map_def.h: No such file or directory

/Users/stephany/XBMC/xbmc/filesystem/DllLibAfp.h:31:31: error: afpfs-ng/midlevel.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/Application.cpp:127:
/Users/stephany/XBMC/xbmc/filesystem/SFTPFile.h:29:27: error: libssh/libssh.h: No such file or directory
/Users/stephany/XBMC/xbmc/filesystem/SFTPFile.h:30:25: error: libssh/sftp.h: No such file or directory
/Users/stephany/XBMC/xbmc/filesystem/SFTPFile.h:37:41: error: missing binary operator before token "("
/Users/stephany/XBMC/xbmc/filesystem/SFTPFile.h:41:41: error: missing binary operator before token "("
In file included from /Users/stephany/XBMC/xbmc/interfaces/json-rpc/JSONUtils.h:29,
                 from /Users/stephany/XBMC/xbmc/interfaces/json-rpc/JSONServiceDescription.h:27,
                 from /Users/stephany/XBMC/xbmc/interfaces/json-rpc/JSONRPC.h:28,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:150:
xbmc/utils/JSONVariantWriter.h:24:27: error: yajl/yajl_gen.h: No such file or directory
xbmc/utils/JSONVariantWriter.h:26:31: error: yajl/yajl_version.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/interfaces/json-rpc/JSONUtils.h:30,
                 from /Users/stephany/XBMC/xbmc/interfaces/json-rpc/JSONServiceDescription.h:27,
                 from /Users/stephany/XBMC/xbmc/interfaces/json-rpc/JSONRPC.h:28,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:150:
xbmc/utils/JSONVariantParser.h:25:29: error: yajl/yajl_parse.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/network/AirTunesServer.h:31,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:157:
/Users/stephany/XBMC/xbmc/network/DllLibShairport.h:25:33: error: shairport/shairport.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/video/dialogs/GUIDialogTeletext.h:23,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:269:
xbmc/video/Teletext.h:28:22: error: ft2build.h: No such file or directory
xbmc/video/Teletext.h:29:10: error: #include expects "FILENAME" or <FILENAME>
xbmc/video/Teletext.h:30:10: error: #include expects "FILENAME" or <FILENAME>
xbmc/video/Teletext.h:31:10: error: #include expects "FILENAME" or <FILENAME>
/Users/stephany/XBMC/xbmc/Application.cpp:302:26: error: cdio/logging.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/storage/IStorageProvider.h:24,
                 from /Users/stephany/XBMC/xbmc/storage/MediaManager.h:25,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:309:
/Users/stephany/XBMC/xbmc/storage/cdioSupport.h:37:23: error: cdio/cdio.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/Application.cpp:330:
/Users/stephany/XBMC/xbmc/input/SDLJoystick.h:39:30: error: SDL/SDL_joystick.h: No such file or directory
/Users/stephany/XBMC/xbmc/input/SDLJoystick.h:40:28: error: SDL/SDL_events.h: No such file or directory
In file included from /Users/stephany/XBMC/xbmc/guilib/IMsgTargetCallback.h:31,
                 from /Users/stephany/XBMC/xbmc/Application.h:26,
                 from /Users/stephany/XBMC/xbmc/Application.cpp:24:


I use the --with-darwin=osx and --with-arch=x86_64 in the configure line before making tools/darwin/depends, but that does not seem to be sufficient when the git source is used. Is the hint on using the arch referring to the depends build at the beginning or later down the the process in the three make commands before running the xcodebuild command? Have tried running make clean then the configure line I see in $HOME/XBMC/config.log file with the added option of --with-arch=x86_64:

./configure --prefix=/Users/Shared/xbmc-depends/macosx10.7_x86_64 --with-arch=x86_64 --enable-upnp --enable-gtest PKG_CONFIG_PATH=/Users/Shared/xbmc-depends/macosx10.7_x86_64/lib/pkgconfig PTHON=/Users/Shared/xbmc-depends/macosx10.7_x86_64/bin/python --disable-debug

followed by make xcode_depends; then make -C lib/addons/script.module.pil command but this command is failing with TexturePacker errors
Code:
XBMCTex.cpp:494: error: invalid types ‘int[unsigned int]’ for array subscript
XBMCTex.cpp:494: error: invalid types ‘int[unsigned int]’ for array subscript
XBMCTex.cpp:504: error: ‘CXBTFFrame’ was not declared in this scope
XBMCTex.cpp:504: error: expected `;' before ‘frame’
XBMCTex.cpp:505: error: ‘frame’ was not declared in this scope
XBMCTex.cpp:507: error: expected `)' before ‘PRIu64’
XBMCTex.cpp:511: error: ‘AG_FreeSurfaces’ was not declared in this scope
XBMCTex.cpp: In function ‘int main(int, char**)’:
XBMCTex.cpp:536: error: ‘lzo_init’ was not declared in this scope
XBMCTex.cpp:536: error: ‘LZO_E_OK’ was not declared in this scope
XBMCTex.cpp:561: error: ‘stricmp’ was not declared in this scope
make[1]: *** [TexturePacker] Error 1
make: *** [tools/TexturePacker/TexturePacker] Error 2
About to attempt the process again with a fresh github source, and the configure command before running make xcode_depends, to see if that helps., maybe I have some stale code somewhere in the tree. I also checked the directory tools/darwin/depends/xbmc used in the make -C tools/darwin/depends/xbmc, and it only has a Makefile in it,and the configure line does not have the --with-arch=x86_64 option in it, might try adding it to that Makefile if the configure line before running xcode_depends does not work from a fresh source.

Any help is appreciated, since each compile is taking a looong time on my old 2008 iMac.....probably going to try things on a newer 2012 mac air, since it runs the compiles much quicker, but it has mountain lion on it, hope that does not bring along a new set of problems.

Thanks,


[MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-18

We unified the dependency build for linux, android, rbpi and osx. This is still in progress and not finished yet. Atm the readme doesn't fit with whats really needed to build. Just wait until the readme gets adapted and start from scratch with the new build instructions. Until then please be patient.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - mm_half3 - 2013-03-18

o.k. Thanks for the quick reply. Will use the tarball of 12.0 source for now.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-18

Readme updated.


[PROBLEM SOLVED]: [MAC] Compiling on OSX Lion / Xcode 4.1` - flyingrat - 2013-03-19

Update: as Memphiz put in a more diplomatic manner in the next post but essentially it is DRRTFD (do re-read the f-n doc). Problem was that I totally missed the new depends path:

Correct new path: tools/depends

Wrong old path: tools/darwin/depends

Hi Memphiz, thanks for the update! I'm not sure if work is still in progress or if I missed something but anyhow, here are some feedback using xcode 4.5.1 on osx 10.7.5:

$ (cd tools/darwin/depends && ./bootstrap && ./configure --host=i386-apple-darwin)

configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
found xcodebuild at /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
configure: error: error in configure, missing or incorrect --with-darwin arg

This was executed on master/head, i.e:
Code:
c28ead9 - Garrett Brown, 12 hours ago: Remove duplicate Player.SeekBar entry in GUIInfoManager.cpp
f6a002b - Memphiz, 14 hours ago: [CA/AE] - make the devicelist change callback more robust - should
5370a93 - Memphiz, 16 hours ago: [osx/ios] - adapted README.osx and README.ios for usage with new u

Btw: docs/README.osx says: $ ./configure --host=i386-apple-darwin
Buildbot runs: sh configure --with-darwin=osx --with-arch=i386
--
Regards, Lars.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-19

You didn't read the readme did you?

tools/depends ... not tools/darwin/depends.

And don't look at the buildbot ... he is calling the old instructions (thats why he is broken atm).

You are obviously not willing to reread the complete readme - so you can just read the diff on knowing what i have changed in it:

https://github.com/xbmc/xbmc/commit/5370a93f4b101856811b672c6218b2268513a049#diff-1


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - flyingrat - 2013-03-19

(2013-03-19, 17:11)Memphiz Wrote: You didn't read the readme did you?

tools/depends ... not tools/darwin/depends.

You are obviously not willing to reread the complete readme - so you can just read the diff on knowing what i have changed in it:
https://github.com/xbmc/xbmc/commit/5370a93f4b101856811b672c6218b2268513a049#diff-1

Obviously....not! BlushBlushBlush

I just realized my mistake a couple of minutes ago and now everything is rolling as expected! Just like my wife too often says: you are too f-n lazy! Btw, thanks for the alternative reading tool Smile
--

Regards, Lars.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-19

Ahh didn't even realise that it was you. Well i think i need to get used to something like that and learning to keep calm - sry.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - flyingrat - 2013-03-19

(2013-03-19, 17:58)Memphiz Wrote: Ahh didn't even realise that it was you. Well i think i need to get used to something like that and learning to keep calm - sry.

No sweat mate, it was clearly my bad! And sometimes I really am too lazy for my own good, ask my wife! Smile Btw, big thanks for the excellent work with the re-factored dependency builds!


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - mm_half3 - 2013-03-19

(2013-03-18, 21:49)Memphiz Wrote: Readme updated.


Thanks for the quick turn around on the new README file. I was able to get a binary built and packaged on my mac air running macOsX 10.8.2 and Xcode 4.6.1 (2067) using the github source by following the revised README. Did run into two problems at the end, that I think may have been preventing the packaging command to work, was able to get the package make command to create a working .dmg file with a slight mod in the Makefile. BTW read the entire README file Big Grin but might be confusing something, maybe you can tell where I went wrong in the README steps from the summary of issues and workaround below.


Everything seems to go fine until I get to this make command:

make -C lib/addons/script.module.pil
Makefile:14: /Users/mckeever-home/XBMC/tools/darwin/depends/Makefile.include: No such file or directory
Makefile:15: /Users/mckeever-home/XBMC/tools/darwin/depends/config.site.mk: No such file or directory
make: *** No rule to make target `/Users/mckeever-home/XBMC/tools/darwin/depends/config.site.mk'. Stop.


The xcode_depends build and the xcodebuild command both complete without any fatal errors and xcodebuild completes with the BUILD SUCCEDED message at the end. I used this xcodebuild command since it is on mountain lion:

xcodebuild -sdk macosx10.8 -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES ARCHS=x86_64 VALID_ARCHS=x86_64 -configuration Release build

But then the package command fails with this output:

$ make -C tools/darwin/packaging/xbmc-osx
if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
./dmgmaker.pl ../../../../build/Debug/XBMC.app
Could not find "../../../../build/Debug/XBMC.app"
make: *** [dist/XBMC.dmg] Error 2


If I edit tools/darwin/packaging/xbmc-osx/Makefile and remove the if statement checking for the Debug build...essentially forcing it to run the command on the release build, the package command creates a working .dmg file of the xbmc.app directories.



$ cat tools/darwin/packaging/xbmc-osx/Makefile
TARGET = ../../../../XBMC_for_Mac.dmg

all: $(TARGET)

include ../../../../Makefile.include

$(TARGET): dist/XBMC.dmg
mv -f dist/XBMC.dmg $(TARGET)

dist/XBMC.dmg:
if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
./dmgmaker.pl ../../../../build/Release/XBMC.app


Package make output after modifying the Makefile:

$ make -C tools/darwin/packaging/xbmc-osx
if [ -e "/Volumes/XBMC" ] ; then umount /Volumes/XBMC ; fi
./dmgmaker.pl ../../../../build/Release/XBMC.app
Got device handle "disk2"
Ignore "No space left on device" warnings from ditto, they are an autosize artifact
ditto: /Volumes/XBMC/XBMC.app/Contents/MacOS/XBMC: No space left on device
hdiutil: internet-enable: enable succeeded
mv -f dist/XBMC.dmg ../../../../XBMC_for_Mac.dmg


Thoughts on what might be going wrong? I have duplicated the problem and solution multiple times. I thought it may have been because of not defining the XBMC_DARWIN_RELEASE in the process as in the older README, but defining it before running steps 4.a) and 4.2) did not seem to help. I am trying it now with the environment variable defined before running step 3.1.2 to see if that makes any difference.

There is one part of the process I am not really sure about...maybe that is causing the issue. Its that steps 4.a and 4.2 seem to be repeating the make xcode_depends and make -C lib/addons/script.module.pil commands. I only ran the sequence once (after running the make -C tools/depends/targe/xbmc and make clean commands), followed by the xcodebuild step. If that is not ok, let me know.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-19

They are ment to be run once only ... inconsistency in the readme.

Packaging is working right for me. It checks if D_DEBUG is defined in the CFLAGS - which come from <srcdir>/Makefile.include

I tried both (defining D_DEBUG there or not) and it made release or debug dmgs accordingly.

I also never use the xcodebuild stuff ... i build those with running the gui of xcode instead. Verify that build/Debug/XBMC.app and build/Release/XBMC.app are even there ... (should be soft-links)


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-19

Readme updated once more. make -C lib/addons/script.module.pil isn't needed anymore - it will be handled by the depends in the future (this is not working right yet). So you just leave that out. It will have impact on some python addons for now.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - mm_half3 - 2013-03-20

I had build/Release/XBMC.app , but build/Deug directory does not exist. Maybe that is the problem. I redid the Make file to use the environment variable XBMC_DARWIN_RELEASE, checking if it equals Release. If it does then it creates the release dmg.


Appreciate the work you guys put into the product.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - Memphiz - 2013-03-20

That Makefile change doesn't make much sense to me. We already check a flag not the filesystem. So i don't see why it didn't work for you.


RE: [MAC] Compiling on OSX Lion / Xcode 4.1` - mm_half3 - 2013-03-20

Maybe using the xcodebuild command line in the readme is not setting things up the same as with the xcode gui. Given your post saying the check is to look in Makefile.include in the xbmc src dir, checked that file and the CFLAGS variable does have -D_DEBUG in it. That explains why the Make command is trying to create the image from the XBMC.app in the Debug directory. But my build did not create the debug directory, maybe because I wanted the release version and used the line in section 4.2 of the readme that has a -configuration Release option in it. Not sure why the CFLAGS in Makefile.include has -D_DEBUG in it, unless it defaults to that, and the xcodebuild -configuration option over rides it. You did mention build/Release and build/Debug should both be there and as soft-links, my build directory only has Release and it is not a link (soft or hard) to anything (checked the inodes). build/Release hast he XBMC.app directory in it.

The original Makefile will work if I create a soft link for build/Debug to build/Release. Is the -configuration Release line in xcodebuild supposed to set that up?