[R-SIG-Mac]Rpy-0.3

Jan de Leeuw deleeuw@stat.ucla.edu
Tue, 3 Dec 2002 22:46:58 -0800


--Apple-Mail-19-547676006
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

I have compiled/installed Rpy-0.3 on OS X (Darwin 6.3) into

-- the Python 2.2 provided by Apple in the standard Jaguar
distribution (which uses flat namespaces). This seems to be
most reliable.

-- the Python 2.2 from fink, which uses two-level namespaces.
This installs and loads, but does not really work. Probably
namespace problems -- I remember Rpy-0.2 in fink also had
to be linked using flat namespaces.

-- the Python 2.3 framework build from CVS. This fails on
quite a few tests, but it also uses two-level namespaces.

Neither of the three passes all tests -- the first one passes
all tests except three. I attach a log in case you want to look
at it.

I had to change some things. In the first place gcc in OS X
(or ld) does not know about "-shared", which I replaced in
setup.py by "-fno-common". Secondly, linking _rpymodule.so
fails, because the two symbols _RPyExc_Exception and _python_sigint
are multiply defined in the Rpy source code files. The linker does not 
allow this
if flat namespaces are used. I solved it by passing the
flag "-Xlinker -m" to gcc for the final link, it would be better
solved in the C code by suitably using external definitions.

The failed test maybe due to the fact that the symbol _setenv
is also multiply defined -- once in setenv.o and once in
libSystem.dylib (which includes the traditional libc and libm).
The linker uses the definition from setenv.o. I could remove
setenv.o alltogether from the link.

For some unknown reason in the final link gcc gets both flags
-arch i386 -arch ppc, which does not seem to be desirable. I
obviously removed the offending -arch i386 flag.


--Apple-Mail-19-547676006
Content-Disposition: attachment;
	filename=testall2.log
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="testall2.log"

......E
======================================================================
ERROR: testROutOfBounds (test_array.ArrayTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_array.py", line 53, in testROutOfBounds
    self.failUnlessRaises(RException, lambda: idx(self.ra, 5,5,5))
  File "/BinaryCache/python/python-3.root~193/usr/lib/python2.2/unittest.py", line 273, in failUnlessRaises
    apply(callableObj, args, kwargs)
  File "test_array.py", line 53, in <lambda>
    self.failUnlessRaises(RException, lambda: idx(self.ra, 5,5,5))
SystemError: NULL result without error in PyObject_Call

----------------------------------------------------------------------
Ran 7 tests in 0.731s

FAILED (errors=1)
..
----------------------------------------------------------------------
Ran 2 tests in 0.001s

OK
......
----------------------------------------------------------------------
Ran 6 tests in 0.009s

OK
..........
----------------------------------------------------------------------
Ran 10 tests in 0.017s

OK
.......E..
======================================================================
ERROR: testNotFound (test_robj.RobjTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_robj.py", line 34, in testNotFound
    self.failUnlessRaises(RException, lambda: r.foo)
  File "/BinaryCache/python/python-3.root~193/usr/lib/python2.2/unittest.py", line 273, in failUnlessRaises
    apply(callableObj, args, kwargs)
  File "test_robj.py", line 34, in <lambda>
    self.failUnlessRaises(RException, lambda: r.foo)
  File "/usr/lib/python2.2/site-packages/rpy.py", line 144, in __getattr__
    return self.__getitem__(name)
  File "/usr/lib/python2.2/site-packages/rpy.py", line 147, in __getitem__
    obj = self.__dict__[name] = self.__dict__.get(name, _rpy.get(name))
SystemError: NULL result without error in PyObject_Call

----------------------------------------------------------------------
Ran 10 tests in 0.155s

FAILED (errors=1)
.
----------------------------------------------------------------------
Ran 1 tests in 0.000s

OK
...............
----------------------------------------------------------------------
Ran 15 tests in 0.013s

OK
.............
----------------------------------------------------------------------
Ran 13 tests in 0.004s

OK
.E.
======================================================================
ERROR: testRCode (test_util.UtilityTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_util.py", line 29, in testRCode
    self.failUnlessRaises(RException, lambda: r("foo"))
  File "/BinaryCache/python/python-3.root~193/usr/lib/python2.2/unittest.py", line 273, in failUnlessRaises
    apply(callableObj, args, kwargs)
  File "test_util.py", line 29, in <lambda>
    self.failUnlessRaises(RException, lambda: r("foo"))
  File "/usr/lib/python2.2/site-packages/rpy.py", line 151, in __call__
    return r.eval(r.parse(text=s))
SystemError: NULL result without error in PyObject_Call

----------------------------------------------------------------------
Ran 3 tests in 0.003s

FAILED (errors=1)
Testing: array
Testing: boolean
Testing: io
Testing: modes
Testing: numeric
Numeric not available. Skipping.

Testing: robj
Testing: sigint
Testing: topy
Testing: tor
Testing: util

--Apple-Mail-19-547676006
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	delsp=yes;
	charset=US-ASCII;
	format=flowed


===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
------------------------- 
        
--Apple-Mail-19-547676006--