sndfiler darwin compilation WAS Re: [PD] oggread~ won't read my ogg file?

Hans-Christoph Steiner hans at eds.org
Mon Mar 13 22:59:29 CET 2006


David Plans Casal wrote:
> 
> On 11 Mar 2006, at 14:26, IOhannes m zmölnig wrote:
> 
>> David Plans Casal wrote:
>>
>>> In the hopes that someone will get to this thread eventually,
>>> On 11 Mar 2006, at 09:32, David Plans Casal wrote:
>>>
>>>> I've now switched from gcc 4.0 to 3.3 using gcc_select, but  output  
>>>> remains the same...
>>>
>>> Compiling sndfiler against dev_0_39 instead of MAIN, I get:
>>> gcc -DUNIX -fPIC -pthread -DPD -DUSE_PD_MAIN -O3 -funroll-loops - 
>>> Wall  -W -Wshadow -Wno-parentheses -Wno-switch -Wno-unused -fomit- 
>>> frame- pointer -I. -I/Users/dc/cvs-puredata/devel_0_39/src -I/sw/ 
>>> include/ -I/ Users/dc/dev/pure-data/externals/grh/threadlib/src -o  
>>> sndfiler.o -c  sndfiler.c
>>> powerpc-apple-darwin8-gcc-4.0.0: unrecognized option `-pthread'
>>> sndfiler.c:36: error: redefinition of ‘struct _garray’
> 
> 
>> well, i think it is a typo and should read "-lpthread" instead of "- 
>> pthread" - and of course you will need to have pthreads installed.
> 
> 
> That -is- true, it turns out, however, that in OSX, you don't need to  
> specify -lpthreads to get pthreads support, since it's 'already in  
> OSX', looks like, as explained here:
> 
> http://developer.apple.com/macosx/multithreadedprogramming.html
> 
> However, adding 'l' gives:
> 
> powerpc-apple-darwin8-gcc-4.0.0: -lpthread: linker input file unused  
> because linking not done

This is just saying that the -lpthread is ignored because it was given 
when compiling a .o file, rather than when linking .o and libs into a 
.pd_darwin.  But like you said before, -lphtread is not needed on Mac OS X.

> And finally, I still have the last problem (which I think is the  
> showstopper):
> 
> /usr/bin/ld: /Users/dc/dev/pure-data/externals/grh/threadlib/src/ 
> threadlib.pd_darwin is input for the dynamic link editor, is not  
> relocatable by the static link editor again
> collect2: ld returned 1 exit status
> make: *** [sndfiler.pd_darwin] Error 1
> 
> What could that be about?

This one I am not sure.


Since you are doing this, maybe you could add this stuff to the 
Pd-extended build system.  It would go into externals/Makefile in 
particular.

.hc




More information about the Pd-list mailing list