newbie: plugin loaded?
brad at sonaural.com
Sun Nov 13 00:15:10 UTC 2005
Bert Freudenberg wrote:
> Am 12.11.2005 um 01:12 schrieb Brad Fuller:
>> Bert Freudenberg wrote:
>>> Am 11.11.2005 um 22:46 schrieb Brad Fuller:
>>>> $ ioLoadModule(/usr/local/lib/squeak/3.7-7/SoundPAPlugin):
>>>> /usr/local/lib/squeak/3.7-7/SoundPAPlugin: undefined symbol:
>>>> Pa_GetDeviceInfo is in a library accessible to all (usr/local/
>>>> lib/ libportaudio.so).
>>> You need to link libportaudio.so into SoundPAPlugin.
>> doh! I was wrong.
>> And, I can't figure out how slip in a library link so that I don't
>> have to create a custom makefile.
>> I see from the documentation that you can use m4 macros or a
>> makefile.inc file. But, I can't figure out how to do it.
>> Any pointers to docs would be much appreciated. Do you have any
> platforms/unix/plugins % grep PLIBS */Makefile.inc
> ObjectiveCPlugin/Makefile.inc:PLIBS= -Wl,-framework -Wl,Foundation
> ... which is used in:
> platforms/unix/plugins % egrep -v '^(#|$)' ../config/Makefile.plg.in
> XINCLUDES = [includes]
> OBJS = [targets]
> TARGET = [target]
> PLIBS = [plibs]
> $(TARGET) : $(OBJS) Makefile
> $(LINK) $(TARGET) $(OBJS) $(PLIBS)
> $(RANLIB) $(TARGET)
> .force :
Thanks Bert, that's what I tried, but I forget to use "Wl". So, I tried
that but I still can't get the macros to work.
I really have two problems that maybe you've seen.
** Problem 1:
deleted Makefile, run config/configure (to create the Makefile)
And the PLIBS = line is still empty.
Don't know what to do about that.
My second, more important problem, is I still get the runtime error when
manually editing the Makefile by placing:
PLIBS = Wl,-L/usr/local/lib/ Wl,-llibportaudio.so
(I assume I need to pass the location with -L and the file with -l)
During the link phase of the make, it seems to link ok, with no errors.
And after "make install" I try the plugin in Squeak and I still receive
/usr/local/lib/squeak/3.7-7/SoundPAPlugin: undefined symbol:
I'm not familiar with what format the switches should be in to be passed
from libtool to ld. So, I tried just:
PLIBS = -Wl,/usr/local/lib/libportaudio.so
(without the '-l') and that made a bit of progress. I didn't get the
"undefined symbol at runtime.
However, I got a segmentation fault immediately. :-(
It know my external file in the Cross directory was called because I
have a printf in the file that did print to the console and it printed.
After the segfault, was a log that didn't make much sense. Here's the top:
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
2036669032  in ParagraphEditor>evaluateSelection
2036641436  in PluggableTextMorph>doIt
2036656868  in PluggableTextMorph>handleEdit:
* the library is made wrong? It's a shared library.
* Maybe I didn't set up the plugin (or primitive) correctly?
* Maybe Squeak can't wait for a bit to play a sine wave. I didn't set up
any buffers in Squeak so I can't see how any garbage collection would be
This is a big problem, so I probably did something obviously wrong.
Any ideas or pointers where to look is much appreciated.
Thanks for your help!
More information about the Vm-dev