Debug problem on mac 10.6.8 xcode 4.2

• Jan 4, 2012 - 06:37

Already follow this instructions,
http://musescore.org/en/developers-handbook/compilation/compile-instruc…
I installed Qt 4.7.4 SDK to ~/QtSDK and add qmake path to PATH.

I did noticed uncomment in CMakeLists.txt under /mscore
set (CMAKE_CXX_COMPILER clang++)

Now I can compile rev. 5178, both under terminal and xcode.

There are still 2 problems now:

1. I can't install portaudio using macports, there is an error:

:info:build libtool: compile: /Developer/usr/bin/clang -c -std=c99 -O2 -Wall -pedantic -pipe -fPIC -DNDEBUG -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/unix -Werror -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.4 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DAC_APPLE_UNIVERSAL_BUILD=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/hostapi/coreaudio/pa_mac_core.c -fno-common -DPIC -o src/hostapi/coreaudio/.libs/pa_mac_core.o
:info:build src/hostapi/coreaudio/pa_mac_core.c:632:34: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror,-Wsizeof-pointer-memaccess]
:info:build memset(deviceInfo, 0, sizeof(deviceInfo));
:info:build ~~~~~~~~~~ ^~~~~~~~~~
:info:build 1 error generated.

and that line in pa_mac_core.c seems should be
memset(deviceInfo, 0, sizeof(*deviceInfo));
due to strict grammer check in llvm ? clang ?, maybe that need a custom setting for macports.

so there is no sound.

2. when debug under xcode 4.2, music font is not right
look like musescore doesn't install any font file, so for page
http://musescore.org/en/handbook/known-incompatibilities "Font problem on Mac OS X" I can't find any font to validate.


Comments

1. There is an open bug at macports : https://trac.macports.org/ticket/32720

2. In MuseScore 1.1, the fonts were included in MuseScore binary. It's no more the case in MuseScore trunk. The fonts are deployed in the MuseScore bundle (in Musescore.app/Content/Resources) during the "install" step. So you need to run the install step before launching the debug session.

In reply to by [DELETED] 5

Thanks lasconic,

1. I'll wait for its bug update, since I'm not familiar with macports command...

2. I modify Makefile.osx, change
install:
cd build;xcodebuild -project mscore.xcodeproj -configuration Release -target install;
to
install:
cd build;xcodebuild -project mscore.xcodeproj -configuration Debug -target install;

Then it create an application bundle under applebuild, then I extract mscore.app, copy Resources folder to build/mscore/Debug/mscore.app, then I can see the fonts.

Do you still have an unanswered question? Please log in first to post your question.