[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) |
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 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 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 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 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? Obviously....not! 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 -- 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! 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 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? |