[R-SIG-Mac] SHLIB_LDFLAGS with icc/ifort
Jan de Leeuw
deleeuw at cuddyvalley.org
Sun Aug 12 00:12:28 CEST 2007
For compiling R I switched to icc/icpc/ifort 10.0.x on
both Tiger and Leopard. This caused various multiply
defined symbol errors (and even some cases where the
linker could not find symbols in libreadline.dylib).
So I changed "-flat_namespace --undefined suppress"
in configure to "-twolevel_namespace -undefined dynamic_lookup"
both for MH_DYLIB and MH_BUNDLE files. This solved the
problems and did not introduce new ones, as far as I can see.
It also solves the annoying multiply defined symbol error
problems with add-on packages (even without using the -bundle_loader
flag, it seems). This is because multiply defined symbols merely give
warnings when linking libraries with two-level namespaces.
Not sure if the same strategy works with gcc/gfortran, but the
general idea of getting rid of flat namespaces seems
useful, if only because it makes building on OS X more like
building on other *nix systems and because package builds from
source are less likely to fail.
==========================================================
Jan de Leeuw, 11667 Steinhoff Rd, Frazier Park, CA 93225
home 661-245-1725 skype 661-347-0667 global 254-381-4905
.mac: jdeleeuw +++ aim: deleeuwjan +++ skype: j_deleeuw
==========================================================
Many nights on the road
and not dead yet ---
the end of autumn. (Basho 1644-1694)
More information about the R-SIG-Mac
mailing list