[R-SIG-Mac] package compilation problems

Szilard szilard.mailinglists at gmail.com
Fri Aug 21 08:53:02 CEST 2009


Hi:

I've created a small package containing some C code. It checks and
installs on Linux, but on Mac I get the following error:

** arch - i386
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 levenshtein.c -o levenshtein.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 drztools.so levenshtein.o
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
ld warning: duplicate dylib /usr/local/lib/libgcc_s.1.dylib
** arch - ppc
gcc -arch ppc -std=gnu99
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include/ppc
-I/usr/local/include    -fPIC  -g -O2 -c levenshtein.c -o levenshtein.o
gcc -arch ppc -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 drztools.so levenshtein.o
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
ld: in /usr/local/lib/libiconv.2.dylib, file is not of required architecture
collect2: ld returned 1 exit status

I have:
Mac OS 10.5
R version 2.9.1 i386-apple-darwin8.11.1 (from binary image)
Xcode 3.1.3 Developer Tools

It's the first time I'm trying to build/install a package from source on
 Mac.

(On the other hand R CMD SHLIB compiles the C code and calling it from R
also works on the Mac.)

Any help would be appreciated,
Szilard



More information about the R-SIG-Mac mailing list