|
From: Harry M. <man...@ho...> - 2001-11-15 18:50:19
|
Nicolas Bertrand wrote: > > Hello > > On Thursday, November 15, 2001, at 09:47 , Harry Mangalam wrote: > > > OK - this is a Mac OSX-specific problem with R and gcc that I can't > > really help you with except via the grungiest of suggestions. > > > > R's SHLIB command calls gcc with the arguments that you see echoed to > > the screen, so somewhere you cshould be able to set them.. > > > > AHA! Brian D. Ripley, one of R's authors, indicates: > > > > http://www.ens.gu.edu.au/robertk/R/help/01a/0881.html > > > > [don't forget that google is your friend..) > > > > that you have to enter these flags in R_HOME/etc/Makeconf as part of > > the CFLAGS string, so you'll probably have to append '-flat_namespace > > -undefined suppress' to the CFLAGS string there. It wasn't > > cleear to me whether you'll have to recompile R to have this take > > effect, but I'd try it without the recompile 1st. > > > > Helpful...? > > > > hjm > > > > I don't exactly know... I installed R from binaries. OK - it should still have installed the R_HOME/etc/Makeconf - does it exist? If so, edit it to add the the options recommended by the guy who gave you the advice previously. ie: CFLAGS = -g -O2 -flat_namespace -undefined suppress Taking a longer look at the file, I see that there are a lot of SHLIB-related flags which might benefit from those options as well. I'm not an R expert, and certainly not on OSX, so your best bet wold be to query the R user group to see if they have a solution: r-...@st... This group is EXCEPTIONALLY good at responding to questions. > cc -bundle -undefined suppress -o runa.so runa.o -L/usr/local/lib > /usr/bin/ld: -undefined error must be used when -twolevel_namespace is > in effect > make: *** [runa.so] Error 1 > > Doesn't it mean that runa.so could not be compiled because of a linker > error? I have been advised by Keisuke Fujii to run cc with the > -flat_namespace -undefined supress flags. > That would give the following command to avoid this error: > cc -bundle -flat_namespace -undefined suppress -o runa.so runa.o > -L/usr/local/lib The linker is usually invoked automatically by the compiler if you ask it to produce an object file requiring fn()s from system libs. I THINK that appro flags are essentially passed thru to the linker in this case. Hencve adding these > Which Make has to be modified to had this flag? Seee previous message > !! System Error: No such file or directory @ line: 2190 (cd > /Users/Shared/Downloads/GeneX-Server-1.0.4/CyberT-dist; R SHLIB runa.c) > cp: cannot stat `runa.so': No such file or directory > > !! System Error: No such file or directory @ line: 2195 (cd > /Users/Shared/Downloads/GeneX-Server-1.0.4/CyberT-dist; cp hdarray > runa.c runa.so /usr/local/genex/lib/R/library/hdarray/R/) > > I suspect these errors pop up because runa.so failed to compile, right? Yup. -- Cheers, Harry Harry J Mangalam -- (949) 856 2847 (v&f) -- man...@ho... [plain text appreciated] |