[R-SIG-Mac] Build package failed on MacOS Leopard
Simon Urbanek
simon.urbanek at r-project.org
Fri Sep 26 15:36:58 CEST 2008
On Sep 26, 2008, at 6:57 , Fán Lóng wrote:
> Hi there,
>
> When I build my R package with below command on leopard, MacOS 10.5,
> it reports that the ppc architecture library file is missing.
First, note that you have a problem with the compilers you're using.
They are not compatible with R. It is strongly discouraged to use 3rd
party compilers, because they usually don't work. Use Apple compilers
plus our Fortran build (see http://r.research.att.com/tools/ for
details). The offending file (/usr/local/lib/libgcc_s.10.4.dylib) is
from some 3rd party gcc installation.
> I was wondering how can I build this package only with i386 arch,
> and don't build the ppc architecture.
>
Unfortunately there is no flag to disable multi-arch builds. The only
way is to remove the architectures you're not using from R, most
easily from bin/exec (i.e. look in
/Library/Frameworks/R.framework/Resources/bin/exec
and remove any architectures you don't want to use).
However, as stated before the problem is in your tools, not in the ppc
architecture.
Cheers,
Simon
> Below is my build command and build result:
>
> ----------------
> R CMD build –binary my_package_src_dir
> R_ARCH=/i386 R CMD INSTALL --with-package-versions my_package_tarball
>
> ---------------
> * Installing *source* package 'mypackage' ...
> ** libs
> ** arch - i386
> g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -mmacosx-version-min=10.4
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/i386 -DDARWIN
> -msse3 -fPIC -g -O2 -march=nocona -c RInvokeApp.cpp -o
> RInvokeApp.o
> g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -mmacosx-version-min=10.4 -dynamiclib -Wl,-headerpad_max_install_names
> -mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module
> -multiply_defined suppress -L/usr/local/lib -o mypackage.so
> RInvokeApp.o -F/Library/Frameworks/R.framework/.. -framework R
> -Wl,-framework -Wl,CoreFoundation
> ld: warning, duplicate dylib
> /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib
> ** arch - ppc
> g++ -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -mmacosx-version-min=10.4
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/ppc -DDARWIN
> -I/usr/local/include -fPIC -g -O2 -c RInvoke.cpp -o RInvoke.o
> g++ -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -mmacosx-version-min=10.4 -dynamiclib -Wl,-headerpad_max_install_names
> -mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module
> -multiply_defined suppress -L/usr/local/lib -o .so RInvoke.o
> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> -Wl,CoreFoundation
> ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/
> libgcc_s.10.4.dylib,
> missing required architecture ppc in file
> ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
> missing required architecture ppc in file
> collect2: ld returned 1 exit status
> make: *** [.so] Error 1
> chmod: /var/folders/B3/B3WXtjTxEN4bWH6AxrGJNU+++TI/-Tmp-/
> Rinst629842306//libs/ppc/*:
> No such file or directory
> ERROR: compilation failed for package 'mypackage'
> ** Removing '/var/folders/B3/B3WXtjTxEN4bWH6AxrGJNU+++TI/-Tmp-/
> Rinst629842306/mypackage'
> ERROR
> * installation failed
>
>
> Thank you in advance!
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>
More information about the R-SIG-Mac
mailing list