[Stk] building libstk on OSX as Intel or Universal
Gary Scavone
gary at ccrma.Stanford.EDU
Wed Apr 2 05:50:44 PDT 2008
Hi Jerzy,
STK compiles without a problem on Intel Macs (though there are a
couple of "goto" statement problems with the newest version of g++).
However, I have not attempted to compile for an Intel architecture on
a PPC machine.
Regards,
--gary
On 1-Apr-08, at 9:23 PM, Jerzy Gangi wrote:
> Hi everyone,
>
> I'm still trying to get this to compile. I followed Steve's advice and
>
> 1) ran configure like this: $ CFLAGS="-march=i386" ./configure;
> 2) edited the generated Makefile: below this line
>
> CFLAGS += -Wall -g -D__GXX__ $(INCLUDE) -Iinclude
>
> I added
>
> CFLAGS += -march=i386
>
> 3) run $ make
>
> And the files are compiled, for example...
>
> g++ -O3 -Wall -g -D__GXX__ -I../include -Iinclude -march=i386
> -D__LITTLE_ENDIAN__ -D__MACOSX_CORE__ -DRAWWAVE_PATH=\"../rawwaves/\"
> -c Stk.cpp -o Release/Stk.o
>
> I see the march flag worked (jumps for joy). However, after about 80
> of the files are compiled I get a problem:
>
> g++ -O3 -Wall -g -D__GXX__ -I../include -Iinclude -march=i386
> -D__LITTLE_ENDIAN__ -D__MACOSX_CORE__ -DRAWWAVE_PATH=\"../rawwaves/\"
> -c RtMidi.cpp -o Release/RtMidi.o
> In file included from
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/MachineExceptions.h:29,
> from
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/DriverServices.h:32,
> from
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/CarbonCore.h:125,
> from
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> AE.framework/Headers/AE.h:20,
> from
> /System/Library/Frameworks/CoreServices.framework/Headers/
> CoreServices.h:21,
> from
> /System/Library/Frameworks/CoreMIDI.framework/Headers/
> MIDIServices.h:73,
> from
> /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h:21,
> from RtMidi.cpp:167:
> /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:35:3: error:
> #error "SSE instruction set not enabled"
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/MachineExceptions.h:216:
> error: '__m128' does not name a type
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/MachineExceptions.h:217:
> error: '__m128i' does not name a type
> /System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/MachineExceptions.h:218:
> error: '__m128d' does not name a type
> make: *** [RtMidi.o] Error 1
>
> Can anyone help me with this? I would like to use this as part of my
> work at Peabody Conservatory, but I can't seem to get it compiled.
>
> are there no other OS X Intel users using STK???
>
> Thank you,
> Jerzy Gangi
>
> On 3/29/08, Jerzy Gangi <jerzy at jhu.edu> wrote:
>> Steve,
>>
>> Cool, thanks for the tip on debugging the build phase.
>>
>> First, the configure seems to be making sense of the i386:
>>
>> "checking build system type... i386-apple-darwin9.1.0
>> checking host system type... i386-apple-darwin9.1.0"
>>
>> The MAKE looks OK to me (I'm no makefile pro), and here's the output
>> of one file:
>>
>> g++ -O3 -Wall -g -D__GXX__ -I../include -Iinclude -
>> D__LITTLE_ENDIAN__
>> -D__MACOSX_CORE__ -DRAWWAVE_PATH=\"../rawwaves/\" -c Stk.cpp -o
>> Release/Stk.o
>>
>> So I don't see g++ being run with the -march=i386 flag during the
>> "make" phase. How do I tell the makefile do run with march i386? I
>> thought configure took care of detecting the architecture, and it
>> seemed to recognize that? I do see it's setting little endian
>> like you
>> said, tho. Finally, I redownloaded STK so I didn't need to run make
>> clean but thanks for that tip too.
>>
>> Are there any other XCODE users on the list? This toolkit looks
>> really cool, I hope I can get it running to use it.
>>
>> Let me know if you have any more tips...
>>
>> Best,
>> Jerzy G
>>
>>
>> On 3/29/08, Stephen Sinclair <sinclair at music.mcgill.ca> wrote:
>>>
>>> Jerzy Gangi wrote:
>>>> Thanks for your note Steve. I think you're saying to run:
>>>>
>>>> 1) in the stk root directory:
>>>> $ CFLAGS="-march=i386" ./configure;
>>>>
>>>> 2) in the src directory run make (can't run make in the stk root
>>>> directory)
>>>>
>>>> Is this correct? I think I must be wrong because eXCODE still
>>>> says the
>>>> binary libstk.a is "not of the required architecture"
>>>>
>>>
>>> That's right, the configure script is in the root directory, but for
>>> some reason only produces a Makefile in the src directory.
>>> Otherwise it
>>> should hopefully work the way I stated.
>>>
>>> When trying to debug building problems, make sure you look at
>>> the output!
>>> The make program outputs the commands before it runs them.
>>> Does the output show that gcc is being executed with the -
>>> march=i386 flag?
>>>
>>> Also, make sure you "make clean" first if you've built before.
>>> You might also have to explicitly set the LITTLE_ENDIAN flag (or
>>> whatever it is called), since if you're building for i386 on PPC it
>>> might detect this wrong (and vice versa).
>>>
>>>
>>> Steve
>>>
>>
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
More information about the Stk
mailing list