Build environment for Mac OS X 10.6
I've tried building MS according to the excellent instructions at Compile instructions (MacOSX 10.5) - SVN trunk.
However the Apple SDK doesn't seem to have anything for 10.4 now, only 10.5 and 10.6.
My initial attempt at building threw up endless errors saying that it couldn't find 10.4. I changed the config for macports to 10.6. This didn't help. I then set a link in the /Developer/SDKs folder from 10.4u to 10.6.
This helped but the build still fails here:
echo Build\ all\ projects
Build all projects
** BUILD FAILED **
The following build commands failed:bww2mxml:
Ld /Users/dev/musescore/mscore/build/bww2mxml/mscore.build/Release/bww2mxml.build/Objects-normal/ppc/bww2mxml normal ppc
mscore:
Ld /Users/dev/musescore/mscore/build/mscore/mscore.build/Release/mscore.build/Objects-normal/i386/mscore normal i386
Ld /Users/dev/musescore/mscore/build/mscore/mscore.build/Release/mscore.build/Objects-normal/ppc/mscore normal ppc
(3 failures)
make: *** [release] Error 1
Questions:
1) Where is the configuration referring to 10.4u that needs changing to 10.6? I have grep'd for this with no success. Can't even find it in the environment.
2) Can anyone explain the build fail?
I'm running a MacBook Pro, 2.53GHz Intel Core 2 Duo, 4GB memory, OS X 10.6.4.
Thanks in advance
Comments
What do you want to do exactly? The instructions are for 10.5 but mention that the end goal is to have the software to be run on mac intel and PPC on 10.4, 10.5 and 10.6. So it's pretty wide.
If you just want to build for your platform, you don't need macport to be configured for PPC nor for 10.4.
Btw, there are nightlies for Mac now if you don't want to develop but just test the last features.
I'm migrating to MacOSX 10.6 and try to setup again my system to be able to provide a binary to all MuseScore users (PPC, intel, 10.4+). So far without success for several reasons. See http://musescore.org/fr/developers-handbook/compile-instructions-macosx… for my current effort.
In reply to What do you want to do by [DELETED] 5
...no, I won't pursue that line!!
I am a programmer by trade and would love to help with MuseScore. As I've said elsewhere I'm not sure I should promise much time to it yet, but I thought I'd try putting a development environment together so I could start to study the code in my spare time.
I did want to build the latest nightly, but the nightlies for Mac are not up to date.
I assumed my problem was that the current Apple SDK has dropped 10.4. I couldn't find why 10.4 kept being referenced in the build and thought if I could resolve that then the build might work.
I wonder if we are both stuck for the same reason? I see some changes in the earlier set up though. I ought to work through it again with these new instructions.
In reply to Tell you what I want... by cwhysall
Just in case, Did you do a clean build (delete the build folder) after removing the references to 10.4?
In reply to Just in case, Did you do a by David Bolton
I did do a clean build because it wouldn't let me do anything else.
But I am a bit confused by the 10.4 references. As I said, I couldn't find any references by grep'ing for 10.4, so the only change I made was to the macports config file. I rebuilt the macports items and I think there were changes in the built items. However when I tried to build MuseScore it still threw up references to 10.4. I resolved these by creating a symbolic link from 10.4 to 10.6 as I said. It then appeared to build but finished with the errors I showed.
I feel that I should have resolved the 10.4 references in another way, but where are they coming from? When I open mscore.xcodebuild in Xcode it says 'Base SDK Missing' in the drop-down top left. I don't know how to resolve that. I'm assuming it too is being told to use 10.4 and is ignoring my symbolic link.
There are (as you would know) over 50,000 lines of output when you build. I have saved it in a file and you can see it if it would help.
--
colin
In reply to Clean build by cwhysall
I don't know why I couldn't find these before, but here are the OSX10.4u references. How do I change them? Is there a common point?
dev$ grep -r 'OSX10\.4' *
build/mscore.xcodeproj/project.pbxproj: SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
build/mscore.xcodeproj/project.pbxproj: SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
build/mscore.xcodeproj/project.pbxproj: SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
build/mscore.xcodeproj/project.pbxproj: SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
mscore/.svn/text-base/CMakeLists.txt.svn-base: set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
mscore/CMakeLists.txt: set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
mscore/portmidi/pm_mac/pm_mac.xcodeproj/.svn/text-base/project.pbxproj.svn-base: SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
mscore/portmidi/pm_mac/pm_mac.xcodeproj/.svn/text-base/project.pbxproj.svn-base: SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
mscore/portmidi/pm_mac/pm_mac.xcodeproj/.svn/text-base/project.pbxproj.svn-base: SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
mscore/portmidi/pm_mac/pm_mac.xcodeproj/project.pbxproj: SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
mscore/portmidi/pm_mac/pm_mac.xcodeproj/project.pbxproj: SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
mscore/portmidi/pm_mac/pm_mac.xcodeproj/project.pbxproj: SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
At the same time, there are
SDKROOT
environment variables being set to 10.6 all over the place:setenv SDKROOT /Developer/SDKs/MacOSX10.6.sdk
Also found:
setenv SDK_NAME macosx10.6
Do these come from the macports config file? If not, where?
This is all good learning. Just what I need. You only ever seem to learn when things are broken!
--
colin
In reply to Found the 10.4u references by cwhysall
The only interesting one is
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
in CMakeLists.txt. Try to change this one and rebuild from scratch.You don't need universal binary neither so you can change
set(CMAKE_OSX_ARCHITECTURES i386 ppc)
to
set(CMAKE_OSX_ARCHITECTURES i386)
It should also be possible to build MuseScore as a x86_64 application and so using the Qt build from nokia and Cocoa instead of Carbon. More info on the dev mailing list
In reply to The only interesting one is by [DELETED] 5
Trying now with 10.6 SYSROOT and i386 architecture.
I will report back when the build completes.
In reply to Trying it now by cwhysall
echo Build\ all\ projects
Build all projects
** BUILD SUCCEEDED **
Oops, in my excitement I's forgotten the
make install
!But once done it all works. Brilliant. Now for hours of fun!!
In reply to Success! by cwhysall
So that you can replicate what I have done, This is what I have:
In
~/musescore/mscore/mscore/CmakeLists.txt
if (APPLE)
...
set(CMAKE_OSX_ARCHITECTURES i386) # build universal library
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4) #min version required
...
endif (APPLE)
A symbolic link in
/Developer/SDKs
MacOSX10.4u.sdk -> MacOSX10.6.sdk
although this should now be redundant.
In
/opt/local/etc/macports/macports.conf
# Type of binary archive packages to create when using archive mode
#
universal_target 10.4
universal_sysroot /Developer/SDKs/MacOSX10.6.sdk
# machine architectures
universal_archs x86_64 i386
macosx_deployment_target 10.4
I think that is it. Everything prior uninstalled and rebuilt, e.g.
sudo port uninstall pkgconfig @025_1
.I hope this works for you as well.
--
colin
In reply to What I have configured by cwhysall
Unfortunalty as the mac packager, I will need to make it works for both architecture and from 10.4 :-( or drop the support for powerPC...
I guess you didn't build Qt from source. Right ?
In reply to Unfortunalty as the mac by [DELETED] 5
Always a snag, isn't there? :-)
I didn't build Qt, no.