Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csound5 can't load plugins etc

Date2005-05-01 19:50
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound5 can't load plugins etc
I found the source of the problem, it's an OSX-only linking
issue. SConstruct needs to be changed, otherwise dynamic
linking of portmidi is broken.

The problem was actually generated by myself trying to solve
the
portmidi linking problem, trying to use -flat_namespace,
but it turns out that this way, same-name symbols cannot
be defined, so only the first opcode was properly loaded,
all the others reported symbol redefinition errors.

Anyway, I'm on top of it now and will hopefully commit the
necessary changes to SConstruct. Also, in order to allow
for the proper dirent implementation to be used, I'll
add an option to SConstruct, useDirentFix, for compilation
with older systems. Does that sound OK?

I'll also commit the new CoreAudio realtime additions to
pa_blocking.c and rtpa.c. They should not break output-only
realtime audio, as far as I can tell.

Victor

>
> There seems to have been a commit of new code to both
> Top/csmodule.c and Top/dl_opcodes.c about 23 hours ago,m
> but there is no Changelog or explanation other than
> "Removed O; use dynamically allocated ENVIRON structure"
>
> It really helps if the changelog is maintained.
>
> I had a quick look and can see no changes relating to
> dylib -- only printing.
>
> Have not found were that warning message is issued yet.
> ==John ffitch
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4
> great events, 4 opportunities to win big! Highest score
> wins.NEC IT Guy Games. Play to win an NEC 61 plasma
> display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-05-02 20:29
FromAnthony Kozar
SubjectRe: [Cs-dev] csound5 can't load plugins etc
When you mentioned using flat namespaces before, I suspected that this would
not work.  And from my experiments with trying to get plugins working with
Csound 4 GBS, I also suspect the using .dylib's is incorrect.

There are two types of dynamic-loaded libraries on OS X: dylibs and bundles.
>From what I understand of Apple's docs, bundles should be the correct way to
implement plugins.  Linking bundles is more complicated than linking dylibs
though and I have not succeeded in getting this to work.  (If I understand
correctly, Bundles require linking to an export library if any internal
Csound symbols are used in the plugin -- this is similar to the way that
plugins must be linked to a stub library on MacOS 9 to work).

Matt and I have briefly discussed the best way to do plugins on OS X.  We do
not want to go the "unix" route but would prefer that all versions of Csound
for OS X (console or otherwise) use the same format for plugins for
compatibility.

So, Matt, if you're reading, now might be a good time to speak up about your
requirements for MacCsound plugins and with any ideas on how to solve the
linking issues.  :)

Anthony

On 5/1/05 2:50 PM, Victor Lazzarini  etched in
stone:

> I found the source of the problem, it's an OSX-only linking
> issue. SConstruct needs to be changed, otherwise dynamic
> linking of portmidi is broken.
> 
> The problem was actually generated by myself trying to solve
> the
> portmidi linking problem, trying to use -flat_namespace,
> but it turns out that this way, same-name symbols cannot
> be defined, so only the first opcode was properly loaded,
> all the others reported symbol redefinition errors.



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-05-02 22:53
Frommatt
SubjectRe: [Cs-dev] csound5 can't load plugins etc
dont know exactly what you are asking, but

how i am currently running in cs4 is csoundLib as a bundle and
opcode plugins as .dylibs.  I automatically load any .dylibs located
in /Library/Application Support/Csound

i have some code we could add so that in addition to the AppSupport 
folder,
.dylibs are looked for inside the current app bundle -- then we we 
could distribute
csoundLib or a csound application with all the .dylibs inside already.

this would fit much better to the way OSX conventions are, and makes 
the case
for keeping csoundLib as a bundle.  however i am not totally against 
the idea of
making csoundlib a dylib.

-m

On May 2, 2005, at 12:29 PM, Anthony Kozar wrote:

> When you mentioned using flat namespaces before, I suspected that this 
> would
> not work.  And from my experiments with trying to get plugins working 
> with
> Csound 4 GBS, I also suspect the using .dylib's is incorrect.
>
> There are two types of dynamic-loaded libraries on OS X: dylibs and 
> bundles.
> From what I understand of Apple's docs, bundles should be the correct 
> way to
> implement plugins.  Linking bundles is more complicated than linking 
> dylibs
> though and I have not succeeded in getting this to work.  (If I 
> understand
> correctly, Bundles require linking to an export library if any internal
> Csound symbols are used in the plugin -- this is similar to the way 
> that
> plugins must be linked to a stub library on MacOS 9 to work).
>
> Matt and I have briefly discussed the best way to do plugins on OS X.  
> We do
> not want to go the "unix" route but would prefer that all versions of 
> Csound
> for OS X (console or otherwise) use the same format for plugins for
> compatibility.
>
> So, Matt, if you're reading, now might be a good time to speak up 
> about your
> requirements for MacCsound plugins and with any ideas on how to solve 
> the
> linking issues.  :)
>
> Anthony
>
> On 5/1/05 2:50 PM, Victor Lazzarini  etched 
> in
> stone:
>
>> I found the source of the problem, it's an OSX-only linking
>> issue. SConstruct needs to be changed, otherwise dynamic
>> linking of portmidi is broken.
>>
>> The problem was actually generated by myself trying to solve
>> the
>> portmidi linking problem, trying to use -flat_namespace,
>> but it turns out that this way, same-name symbols cannot
>> be defined, so only the first opcode was properly loaded,
>> all the others reported symbol redefinition errors.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great 
> events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net