[R-SIG-Mac] SHLIB

Carl Witthoft carl at witthoft.com
Sat Dec 20 14:51:16 CET 2008


Just a dumb question:  can you successfully 'make', and create the 
library using Unix tools directly from a bash window?

> Hello,
> 
> I'm using R 2.8.0 on a Macbook Pro running Tiger on it.
> 
> I have a simple C file named hello.c and when I try to generate the .so
> file like that:
> 
> $ R CMD SHLIB hello.c
> 
> I get the following output:
> 
> gcc -arch i386 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/i386 
> -I/usr/local/include    -fPIC  -g -O2 -c hello.c -o hello.o
> gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names
> -mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module
> -multiply_defined suppress -L/usr/local/lib -o hello.so hello.o  
> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> -Wl,CoreFoundation
> /usr/bin/libtool: for architecture cputype (16777223) cpusubtype (3)
> object: /usr/local/lib/libgcc_s.10.4.dylib malformed object (unknown
> load command 4)
> make: *** [hello.so] Error 1
> 
> 
> What is this error? How can I fix it?
> 
> Thank you
> 
> Thibault
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: thibault_helleputte.vcf
> Type: text/x-vcard
> Size: 420 bytes
> Desc: not available
> URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20081219/886e3b23/attachment-0001.vcf>
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 19 Dec 2008 14:42:32 +0000 (GMT)
> From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
> Subject: Re: [R-SIG-Mac] problem with SHLIB
> To: Thibault Helleputte <thibault.helleputte at uclouvain.be>
> Cc: r-sig-mac at stat.math.ethz.ch
> Message-ID: <alpine.LFD.2.00.0812191441060.6728 at gannet.stats.ox.ac.uk>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> 
> I think you need to update your Xcode.  What version is it, and how does 
> it compare with the FAQ's prescriptions?
> 
> On Fri, 19 Dec 2008, Thibault Helleputte wrote:
> 
>> Hello,
>>
>> I'm using R 2.8.0 on a Macbook Pro running Tiger on it.
>>
>> I have a simple C file named hello.c and when I try to generate the .so
>> file like that:
>>
>> $ R CMD SHLIB hello.c
>>
>> I get the following output:
>>
>> gcc -arch i386 -std=gnu99
>> -I/Library/Frameworks/R.framework/Resources/include
>> -I/Library/Frameworks/R.framework/Resources/include/i386
>> -I/usr/local/include    -fPIC  -g -O2 -c hello.c -o hello.o
>> gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names
>> -mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module
>> -multiply_defined suppress -L/usr/local/lib -o hello.so hello.o
>> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
>> -Wl,CoreFoundation
>> /usr/bin/libtool: for architecture cputype (16777223) cpusubtype (3)
>> object: /usr/local/lib/libgcc_s.10.4.dylib malformed object (unknown
>> load command 4)
>> make: *** [hello.so] Error 1
>>
>>
>> What is this error? How can I fix it?
>>
>> Thank you
>>
>> Thibault
>>
>



More information about the R-SIG-Mac mailing list