Menu

#134 get_rconfig error: returns flags as single shell-word

rpy2
open
nobody
Build (42)
5
2012-07-18
2010-09-25
No

Trying to upgrade fink's rpy2 to version 2.1.4, setup.py fails:

gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 -Irpy/rinterface -I/sw/include/python2.6 -I/sw/Library/Frameworks/R.framework/Resources/include -c rpy/rinterface/rinterface.c -o build/temp.macosx-10.6-i386-2.6/rpy/rinterface/rinterface.o -F/sw/Library/Frameworks/R.framework/.. -framework R -framework vecLib -dylib_file /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
cc1: error: unrecognized command line option "-framework vecLib -dylib_file /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib"
error: command 'gcc' failed with exit status 1

It looks okay, but actually the whole set of flags reported in the error (-framework %s -dylib_file %s) is being passed as a single parameter rather than 4 separate shell words. That is because get_rconfig(r_home, 'BLAS_LIBS') returns it all as a single string (instead of an array) that is added to extra_link_args as a single element (rather than splitting apart on whitespace).

Discussion

Anonymous
Anonymous

Add attachments
Cancel