Re: [Cs-dev] universal binary linking to CsoundLib.framework
Date | 2008-11-04 00:26 |
From | victor |
Subject | Re: [Cs-dev] universal binary linking to CsoundLib.framework |
Including portaudio, jack, etc? ----- Original Message ----- From: "Jonatan Liljedahl" |
Date | 2008-11-04 00:32 |
From | Jonatan Liljedahl |
Subject | Re: [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" |
Date | 2008-11-05 08:11 |
From | Anthony Kozar |
Subject | Re: [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" |
Date | 2008-11-05 08:15 |
From | Jonatan Liljedahl |
Subject | Re: [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" |
Date | 2008-11-05 08:48 |
From | Jonatan Liljedahl |
Subject | Re: [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 |
Date | 2008-11-05 09:06 |
From | Erik de Castro Lopo |
Subject | Re: [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 |
Date | 2008-11-05 09:07 |
From | Erik de Castro Lopo |
Subject | Re: [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 |
Date | 2008-11-05 10:43 |
From | Jonatan Liljedahl |
Subject | Re: [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 |
Date | 2008-11-06 19:55 |
From | Anthony Kozar |
Subject | Re: [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 |
Date | 2008-11-06 21:28 |
From | Jonatan Liljedahl |
Subject | Re: [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 |
Date | 2008-11-07 02:25 |
From | Anthony Kozar |
Subject | Re: [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 |