Hi John,

If the gcc's are incompatible, then you may have yet another  
problem:  python itself will have been built with one, and R the other.

Before trying to modify the default compiler options, try running the  
compler commands that setup.py displays as it tries to work.  It  
should pick up the created .o files and proceed to the next step when  
run again.

-G


On May 5, 2007, at 1:19AM , John Owens wrote:

> John Owens <john_owens <at> yahoo.com> writes:
>
>>
>> Greetings, I'm puzzled about this build error.
>>
>> Basically the problem is that it's trying to link to a
>> dynamic library "libRblas.dylib" that is clearly in the
>> right place (/opt/local/lib/R/lib/libRblas.dylib) and whose
>> directory is explicitly specified with -L. (LD_LIBRARY_PATH
>> didn't help either.)
>
> OK good news, I think I figured this out. Bad news, I need
> some help to continue to make progress.
>
> The MacPorts R distribution must be built with a newer gcc.
> It uses gcc 4.0.4 (the default is 4.0.1). On a MacPorts
> system, the new gcc is called gcc-dp-4.0. I believe the
> link problems were because of an incompatibility between R's
> gcc and the native gcc that I get when I python setup.py build.
>
> I am not sure how to say "use gcc-dp-4.0 instead of gcc". The
> best I've come up with is:
>
>  CC=gcc-dp-4.0 python setup.py build
>
> which sort-of works. The problem is that gcc is called with
> the following command line from within the script:
>
> gcc-dp-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp - 
> mno-fused-madd
> -fno-common -fno-common -dynamic -DNDEBUG -g -O3 -Wall -DWITH_NUMERIC
> -DRPY_SHNAME="_rpy2050" -DINIT_RPY=init_rpy2050 -UPRE_2_2
> -I/opt/local/lib/R/include -Isrc
> -I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ 
> include/python2.4
> -I/opt/local/include/python2.4 -c src/rpymodule2050.c -o
> build/temp.darwin-8.9.0-Power_Macintosh-2.4/src/rpymodule2050.o
> gcc-dp-4.0: unrecognized option '-no-cpp-precomp'
> cc1: error: unrecognized command line option "-Wno-long-double"
> error: command 'gcc-dp-4.0' failed with exit status 1
>
> What I need to do is delete the two command-line options
> -Wno-long-double and -no-cpp-precomp. They are valid in
> default gcc 4.0.1 but not in new gcc-dp-4.0 (4.0.4). I don't
> know how to do this in the setup.py script.
>
> The other possible option was:
>
> python setup.py build --compiler=gcc-dp-4.0
>
> which tells us:
>
> error: don't know how to compile C/C++ code on platform 'posix' with
> 'gcc-dp-4.0' compiler
>
> So: What I'd love to know is how I can change the default
> options passed to gcc to get rid of two options. The default
> options don't appear to be anywhere in setup.py, so I'm not
> sure from where they come, but I think this does solve the
> problem (or at least let me make more progress), so anyone
> who understands setup.py and the distutils magic, I'd appreciate
> help!
>
> Thanks!
>
> JDO
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to