Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] universal binary linking to CsoundLib.framework

Date2008-11-04 00:26
Fromvictor
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Including portaudio, jack, etc?
----- Original Message ----- 
From: "Jonatan Liljedahl" 
To: "Developer discussions" 
Sent: Tuesday, November 04, 2008 12:13 AM
Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework


> Yes, as I said in the original post, I have all dependencies except
> csound as universals.
>
> victor wrote:
>> you might also need to build all the other dependencies as
>> UB.
>>
>> ----- Original Message ----- 
>> From: "Jonatan Liljedahl" 
>> To: "Developer discussions" 
>> Sent: Monday, November 03, 2008 9:22 PM
>> Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework
>>
>>
>>> I was afraid of that...
>>> The trick below might have worked, haven't tried to run the resulting
>>> binary on a PPC machine yet:
>>>
>>> get CsoundLib from the other archs package, it's in
>>> /Library/Frameworks/CsoundLib.framework/Versions/Current/CsoundLib.
>>>
>>> name the original one CsoundLib.1 and the other one CsoundLib.2
>>>
>>> use lipo to create a universal:
>>>
>>> $ sudo lipo -create CsoundLib.1 CsoundLib.2 -output CsoundLib
>>>
>>> Check that it worked:
>>>
>>> $ cd /Library/Frameworks/CsoundLib.framework/Versions/Current/
>>> $ file CsoundLib
>>> CsoundLib: Mach-O universal binary with 2 architectures
>>> CsoundLib (for architecture i386):      Mach-O dynamically linked shared
>>> library i386
>>> CsoundLib (for architecture ppc):       Mach-O dynamically linked shared
>>> library ppc
>>>
>>> replace the libsndfile shipped with csound with a link to the universal
>>> one you built yourself:
>>> $ sudo ln -sf /opt/local/lib/libsndfile.1.0.17.dylib
>>> /usr/local/lib/libsndfile.1.0.17.dylib
>>>
>>> victor wrote:
>>>> I don't think universal binary linking is possible without the
>>>> framework being UB itself. But I never tried it.
>>>>
>>>> Victor
>>>>
>>>> ----- Original Message ----- 
>>>> From: "Jonatan Liljedahl" 
>>>> To: "Developer discussions" ;
>>>> "AlgoScore" 
>>>> Sent: Monday, November 03, 2008 6:07 PM
>>>> Subject: [Cs-dev] universal binary linking to CsoundLib.framework
>>>>
>>>>
>>>>> I'm having some trouble building a universal package of AlgoScore. The
>>>>> thing is, I have every dependency as universals, except csound.
>>>>>
>>>>> What first happened was that the linking of the universal binary 
>>>>> failed
>>>>> since there was no code for ppc in csound (I'm building on intel).
>>>>> Setting "-undefined dynamic_lookup" in the linker flags fixed this, 
>>>>> and
>>>>> now it builds and I have a universal binary of algoscore.
>>>>>
>>>>> But, running it on a PPC works only until it actually tries to use
>>>>> csound. Then it crashes with something like:
>>>>>
>>>>> dyld: lazy symbol binding failed: Symbol not found: _csoundInitialize
>>>>>  Referenced from: /Users/user/AlgoScore/src/build/../../algoscore
>>>>>  Expected in: dynamic lookup
>>>>>
>>>>> dyld: Symbol not found: _csoundInitialize
>>>>>  Referenced from: /Users/user/AlgoScore/src/build/../../algoscore
>>>>>  Expected in: dynamic lookup
>>>>>
>>>>> Trace/BPT trap
>>>>>
>>>>> I thought that it would find the symbols in the installed ppc csound
>>>>> framework even if the universal binary was linked against an intel
>>>>> csound only.
>>>>>
>>>>> I also tried building algoscore without actually linking to csound, on
>>>>> my intel box, with "-undefined dynamic_lookup". It gives the same 
>>>>> error,
>>>>> even though csound framework *is* installed and with the same arch 
>>>>> type.
>>>>> So it seems that this linker flags does *not* allow the app to find 
>>>>> the
>>>>> symbols in an installed framework.
>>>>>
>>>>> Any suggestions?
>>> -- 
>>> /Jonatan         [ http://kymatica.com ]
>
>
> -- 
> /Jonatan         [ http://kymatica.com ]
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's 
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great 
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the 
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-04 00:32
FromJonatan Liljedahl
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
The official JackOSX is universal. I don't use portaudio. Csound will
have it's own dependencies with the right arch on the system when
running, I hope. We'll see tomorrow when I get access to a PPC machine... :)

victor wrote:
> Including portaudio, jack, etc?
> ----- Original Message ----- 
> From: "Jonatan Liljedahl" 
> To: "Developer discussions" 
> Sent: Tuesday, November 04, 2008 12:13 AM
> Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework
> 
> 
>> Yes, as I said in the original post, I have all dependencies except
>> csound as universals.
>>
>> victor wrote:
>>> you might also need to build all the other dependencies as
>>> UB.
>>>
>>> ----- Original Message ----- 
>>> From: "Jonatan Liljedahl" 
>>> To: "Developer discussions" 
>>> Sent: Monday, November 03, 2008 9:22 PM
>>> Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework
>>>
>>>
>>>> I was afraid of that...
>>>> The trick below might have worked, haven't tried to run the resulting
>>>> binary on a PPC machine yet:
>>>>
>>>> get CsoundLib from the other archs package, it's in
>>>> /Library/Frameworks/CsoundLib.framework/Versions/Current/CsoundLib.
>>>>
>>>> name the original one CsoundLib.1 and the other one CsoundLib.2
>>>>
>>>> use lipo to create a universal:
>>>>
>>>> $ sudo lipo -create CsoundLib.1 CsoundLib.2 -output CsoundLib
>>>>
>>>> Check that it worked:
>>>>
>>>> $ cd /Library/Frameworks/CsoundLib.framework/Versions/Current/
>>>> $ file CsoundLib
>>>> CsoundLib: Mach-O universal binary with 2 architectures
>>>> CsoundLib (for architecture i386):      Mach-O dynamically linked shared
>>>> library i386
>>>> CsoundLib (for architecture ppc):       Mach-O dynamically linked shared
>>>> library ppc
>>>>
>>>> replace the libsndfile shipped with csound with a link to the universal
>>>> one you built yourself:
>>>> $ sudo ln -sf /opt/local/lib/libsndfile.1.0.17.dylib
>>>> /usr/local/lib/libsndfile.1.0.17.dylib
>>>>
>>>> victor wrote:
>>>>> I don't think universal binary linking is possible without the
>>>>> framework being UB itself. But I never tried it.
>>>>>
>>>>> Victor
>>>>>
>>>>> ----- Original Message ----- 
>>>>> From: "Jonatan Liljedahl" 
>>>>> To: "Developer discussions" ;
>>>>> "AlgoScore" 
>>>>> Sent: Monday, November 03, 2008 6:07 PM
>>>>> Subject: [Cs-dev] universal binary linking to CsoundLib.framework
>>>>>
>>>>>
>>>>>> I'm having some trouble building a universal package of AlgoScore. The
>>>>>> thing is, I have every dependency as universals, except csound.
>>>>>>
>>>>>> What first happened was that the linking of the universal binary 
>>>>>> failed
>>>>>> since there was no code for ppc in csound (I'm building on intel).
>>>>>> Setting "-undefined dynamic_lookup" in the linker flags fixed this, 
>>>>>> and
>>>>>> now it builds and I have a universal binary of algoscore.
>>>>>>
>>>>>> But, running it on a PPC works only until it actually tries to use
>>>>>> csound. Then it crashes with something like:
>>>>>>
>>>>>> dyld: lazy symbol binding failed: Symbol not found: _csoundInitialize
>>>>>>  Referenced from: /Users/user/AlgoScore/src/build/../../algoscore
>>>>>>  Expected in: dynamic lookup
>>>>>>
>>>>>> dyld: Symbol not found: _csoundInitialize
>>>>>>  Referenced from: /Users/user/AlgoScore/src/build/../../algoscore
>>>>>>  Expected in: dynamic lookup
>>>>>>
>>>>>> Trace/BPT trap
>>>>>>
>>>>>> I thought that it would find the symbols in the installed ppc csound
>>>>>> framework even if the universal binary was linked against an intel
>>>>>> csound only.
>>>>>>
>>>>>> I also tried building algoscore without actually linking to csound, on
>>>>>> my intel box, with "-undefined dynamic_lookup". It gives the same 
>>>>>> error,
>>>>>> even though csound framework *is* installed and with the same arch 
>>>>>> type.
>>>>>> So it seems that this linker flags does *not* allow the app to find 
>>>>>> the
>>>>>> symbols in an installed framework.
>>>>>>
>>>>>> Any suggestions?
>>>> -- 
>>>> /Jonatan         [ http://kymatica.com ]
>>
>> -- 
>> /Jonatan         [ http://kymatica.com ]


-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-05 08:11
FromAnthony Kozar
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
If you have built any of Csound's dependencies as UBs yourself, I would be
very interested in knowing the procedure as I plan to look into this issue
soon.  Thanks.

Anthony
 
Jonatan Liljedahl wrote on 11/3/08 7:32 PM:

> The official JackOSX is universal. I don't use portaudio. Csound will
> have it's own dependencies with the right arch on the system when
> running, I hope. We'll see tomorrow when I get access to a PPC machine... :)
> 
> victor wrote:
>> Including portaudio, jack, etc?

>> ----- Original Message -----
>> From: "Jonatan Liljedahl" 
>> To: "Developer discussions" 
>> Sent: Tuesday, November 04, 2008 12:13 AM
>> Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework
>> 
>> 
>>> Yes, as I said in the original post, I have all dependencies except
>>> csound as universals.
>>> 
>>> victor wrote:
>>>> you might also need to build all the other dependencies as
>>>> UB.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-05 08:15
FromJonatan Liljedahl
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Yes, I just tried this and it worked fine.
So, for UB apps only linking to the CsoundLib API, all that is needed is
to lipo together a UB CsoundLib with one from each arch.

Jonatan Liljedahl wrote:
> The official JackOSX is universal. I don't use portaudio. Csound will
> have it's own dependencies with the right arch on the system when
> running, I hope. We'll see tomorrow when I get access to a PPC machine... :)
> 
> victor wrote:
>> Including portaudio, jack, etc?
>> ----- Original Message ----- 
>> From: "Jonatan Liljedahl" 
>> To: "Developer discussions" 
>> Sent: Tuesday, November 04, 2008 12:13 AM
>> Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework
>>
>>
>>> Yes, as I said in the original post, I have all dependencies except
>>> csound as universals.
>>>
>>> victor wrote:
>>>> you might also need to build all the other dependencies as
>>>> UB.
>>>>
>>>> ----- Original Message ----- 
>>>> From: "Jonatan Liljedahl" 
>>>> To: "Developer discussions" 
>>>> Sent: Monday, November 03, 2008 9:22 PM
>>>> Subject: Re: [Cs-dev] universal binary linking to CsoundLib.framework
>>>>
>>>>
>>>>> I was afraid of that...
>>>>> The trick below might have worked, haven't tried to run the resulting
>>>>> binary on a PPC machine yet:
>>>>>
>>>>> get CsoundLib from the other archs package, it's in
>>>>> /Library/Frameworks/CsoundLib.framework/Versions/Current/CsoundLib.
>>>>>
>>>>> name the original one CsoundLib.1 and the other one CsoundLib.2
>>>>>
>>>>> use lipo to create a universal:
>>>>>
>>>>> $ sudo lipo -create CsoundLib.1 CsoundLib.2 -output CsoundLib
>>>>>
>>>>> Check that it worked:
>>>>>
>>>>> $ cd /Library/Frameworks/CsoundLib.framework/Versions/Current/
>>>>> $ file CsoundLib
>>>>> CsoundLib: Mach-O universal binary with 2 architectures
>>>>> CsoundLib (for architecture i386):      Mach-O dynamically linked shared
>>>>> library i386
>>>>> CsoundLib (for architecture ppc):       Mach-O dynamically linked shared
>>>>> library ppc
>>>>>
>>>>> replace the libsndfile shipped with csound with a link to the universal
>>>>> one you built yourself:
>>>>> $ sudo ln -sf /opt/local/lib/libsndfile.1.0.17.dylib
>>>>> /usr/local/lib/libsndfile.1.0.17.dylib
>>>>>
>>>>> victor wrote:
>>>>>> I don't think universal binary linking is possible without the
>>>>>> framework being UB itself. But I never tried it.
>>>>>>
>>>>>> Victor
>>>>>>
>>>>>> ----- Original Message ----- 
>>>>>> From: "Jonatan Liljedahl" 
>>>>>> To: "Developer discussions" ;
>>>>>> "AlgoScore" 
>>>>>> Sent: Monday, November 03, 2008 6:07 PM
>>>>>> Subject: [Cs-dev] universal binary linking to CsoundLib.framework
>>>>>>
>>>>>>
>>>>>>> I'm having some trouble building a universal package of AlgoScore. The
>>>>>>> thing is, I have every dependency as universals, except csound.
>>>>>>>
>>>>>>> What first happened was that the linking of the universal binary 
>>>>>>> failed
>>>>>>> since there was no code for ppc in csound (I'm building on intel).
>>>>>>> Setting "-undefined dynamic_lookup" in the linker flags fixed this, 
>>>>>>> and
>>>>>>> now it builds and I have a universal binary of algoscore.
>>>>>>>
>>>>>>> But, running it on a PPC works only until it actually tries to use
>>>>>>> csound. Then it crashes with something like:
>>>>>>>
>>>>>>> dyld: lazy symbol binding failed: Symbol not found: _csoundInitialize
>>>>>>>  Referenced from: /Users/user/AlgoScore/src/build/../../algoscore
>>>>>>>  Expected in: dynamic lookup
>>>>>>>
>>>>>>> dyld: Symbol not found: _csoundInitialize
>>>>>>>  Referenced from: /Users/user/AlgoScore/src/build/../../algoscore
>>>>>>>  Expected in: dynamic lookup
>>>>>>>
>>>>>>> Trace/BPT trap
>>>>>>>
>>>>>>> I thought that it would find the symbols in the installed ppc csound
>>>>>>> framework even if the universal binary was linked against an intel
>>>>>>> csound only.
>>>>>>>
>>>>>>> I also tried building algoscore without actually linking to csound, on
>>>>>>> my intel box, with "-undefined dynamic_lookup". It gives the same 
>>>>>>> error,
>>>>>>> even though csound framework *is* installed and with the same arch 
>>>>>>> type.
>>>>>>> So it seems that this linker flags does *not* allow the app to find 
>>>>>>> the
>>>>>>> symbols in an installed framework.
>>>>>>>
>>>>>>> Any suggestions?
>>>>> -- 
>>>>> /Jonatan         [ http://kymatica.com ]
>>> -- 
>>> /Jonatan         [ http://kymatica.com ]
> 
> 


-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-05 08:48
FromJonatan Liljedahl
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Anthony Kozar wrote:
> If you have built any of Csound's dependencies as UBs yourself, I would be
> very interested in knowing the procedure as I plan to look into this issue
> soon.  Thanks.

JackOSX is already UB. And as this exists as a real framework I'd say
you should just make the users install it. You can use "-weak_framework
Jackmp" instead of "-framework Jackmp" and then test at runtime if it
was loaded or not to avoid a crash if the user tries to use jack output
without installing JackOSX first. IMHO this is the way to go on OS X.

Regarding the other deps of CsoundLib, this works fine with MacPorts:
$ sudo port install liblo +universal
$ sudo port install libsndfile +universal
$ sudo port install portaudio +universal
$ sudo port install fltk +universal

portmidi didn't compile with +universal, but it should be easy to just
get a copy from the other arch and "lipo -create libportmidi-ppc.dylib
libportmidi-i386.dylib -output libportmidi-universal.dylib"... unless
you want to fix the macports Portfile.

Note that to link to CsoundLib when building an UB app you only need the
single CsoundLib as an UB. The dependencies are pulled in at runtime and
then it finds them on the system it runs on even if CsoundLib and its
dependencies are single-arch.

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-05 09:06
FromErik de Castro Lopo
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Jonatan Liljedahl wrote:

> $ sudo port install libsndfile +universal

If this compiles libsndfile from soruce code and runs the configure
script only once I can 1000% guarantee you that the cross-compiled
half of the binary *will* *be* *wrong*.

    http://www.mega-nerd.com/libsndfile/FAQ.html#Q018

I don't have access to OSX and when i did, found the MacPorts system
to be a world of pain that I would be better off without.

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
The word "Windows" is a word out of an old dialect of the
Apaches. It means: "White man staring through glass-screen
onto an hourglass..."

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-05 09:07
FromErik de Castro Lopo
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Jonatan Liljedahl wrote:

> $ sudo port install libsndfile +universal

If this compiles libsndfile from soruce code and runs the configure
script only once I can 1000% guarantee you that the cross-compiled
half of the binary *will* *be* *wrong*.

    http://www.mega-nerd.com/libsndfile/FAQ.html#Q018

I don't have access to OSX and when i did, found the MacPorts system
to be a world of pain that I would be better off without.

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
The word "Windows" is a word out of an old dialect of the
Apaches. It means: "White man staring through glass-screen
onto an hourglass..."

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-05 10:43
FromJonatan Liljedahl
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Erik de Castro Lopo wrote:
> Jonatan Liljedahl wrote:
> 
>> $ sudo port install libsndfile +universal
> 
> If this compiles libsndfile from soruce code and runs the configure
> script only once I can 1000% guarantee you that the cross-compiled
> half of the binary *will* *be* *wrong*.
> 
>     http://www.mega-nerd.com/libsndfile/FAQ.html#Q018

I see, I think the libsndfile portfile actually does only a single
configure/build. I'll report this to macports so someone can fix the
portfile.

> I don't have access to OSX and when i did, found the MacPorts system
> to be a world of pain that I would be better off without.

Things might have changed, my experience is that it works very well. :)

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-06 19:55
FromAnthony Kozar
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Thanks Jonatan.  I should use the JackOSX framework then since that is one
of the few Csound options that I left out of my recent build.  However, I am
not using MacPorts for the other libraries; I compiled all of them myself.
So, I am hoping to figure out how to build them all as UBs.  But maybe I
could look at what MacPorts does to achieve this.

I do remember seeing something in a recent GNU configure script that said it
supports multiple architecture builds on OS X now.  And from what I've seen,
for some software, it can be as simple as passing the options "-arch ppc
-arch i386" to GCC.  However, you will run into problems with software like
Csound, libsndfile, portaudio, etc. that need to set preprocessor macros
differently on PPC and x86 for issues like endianness, struct alignment,
etc.

*shrug*  I suppose there will be a number of issues to sort out to get this
all working smoothly.

Anthony

Jonatan Liljedahl wrote on 11/5/08 3:48 AM:

> Anthony Kozar wrote:
>> If you have built any of Csound's dependencies as UBs yourself, I would be
>> very interested in knowing the procedure as I plan to look into this issue
>> soon.  Thanks.
> 
> JackOSX is already UB. And as this exists as a real framework I'd say
> you should just make the users install it. You can use "-weak_framework
> Jackmp" instead of "-framework Jackmp" and then test at runtime if it
> was loaded or not to avoid a crash if the user tries to use jack output
> without installing JackOSX first. IMHO this is the way to go on OS X.
> 
> Regarding the other deps of CsoundLib, this works fine with MacPorts:
> $ sudo port install liblo +universal
> $ sudo port install libsndfile +universal
> $ sudo port install portaudio +universal
> $ sudo port install fltk +universal
> 
> portmidi didn't compile with +universal, but it should be easy to just
> get a copy from the other arch and "lipo -create libportmidi-ppc.dylib
> libportmidi-i386.dylib -output libportmidi-universal.dylib"... unless
> you want to fix the macports Portfile.
> 
> Note that to link to CsoundLib when building an UB app you only need the
> single CsoundLib as an UB. The dependencies are pulled in at runtime and
> then it finds them on the system it runs on even if CsoundLib and its
> dependencies are single-arch.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-06 21:28
FromJonatan Liljedahl
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Anthony Kozar wrote:
> Thanks Jonatan.  I should use the JackOSX framework then since that is one
> of the few Csound options that I left out of my recent build.  However, I am
> not using MacPorts for the other libraries; I compiled all of them myself.
> So, I am hoping to figure out how to build them all as UBs.  But maybe I
> could look at what MacPorts does to achieve this.
> 
> I do remember seeing something in a recent GNU configure script that said it
> supports multiple architecture builds on OS X now.  And from what I've seen,
> for some software, it can be as simple as passing the options "-arch ppc
> -arch i386" to GCC.  However, you will run into problems with software like
> Csound, libsndfile, portaudio, etc. that need to set preprocessor macros
> differently on PPC and x86 for issues like endianness, struct alignment,
> etc.

Yes, exactly. Many is as simple as "-arch ppc -arch i386", but the other
ones is quite simple too. Just compile for PPC and i386 separately
(maybe on separate machines if there are CPU tests that can't be
overridden) and do something like "lipo -create my_build_ppc/mylib.dylib
my_build_i386/mylib.dylib -output my_universal/mylib.dylib".

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-11-07 02:25
FromAnthony Kozar
SubjectRe: [Cs-dev] universal binary linking to CsoundLib.framework
Well, I don't have an Intel Mac so I have to cross-compile all of the i386
binaries.  And I want to automate the entire process.  I guess that I'll
have to look at each piece of software individually and figure out what will
work.

Thanks for the information!

Anthony

Jonatan Liljedahl wrote on 11/6/08 4:28 PM:

> Yes, exactly. Many is as simple as "-arch ppc -arch i386", but the other
> ones is quite simple too. Just compile for PPC and i386 separately
> (maybe on separate machines if there are CPU tests that can't be
> overridden) and do something like "lipo -create my_build_ppc/mylib.dylib
> my_build_i386/mylib.dylib -output my_universal/mylib.dylib".


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net