Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 2010 11:34:59 +0100
From:      Francisco de Borja =?ISO-8859-1?Q?L=F3pez_R=EDo?= <borja@pexego.es>
To:        openoffice@freebsd.org
Subject:   Problems with FreeBSD 8, OpenOffice 3.1.1 and pyuno
Message-ID:  <20100104113459.8a500c40.borja@pexego.es>

next in thread | raw e-mail | index | archive | help

Hi guys,

I've a problem with OpenOffice 3.1.1 and FreeBSD 8. I've build the port
from the latest ports tree in FreeBSD 8-STABLE:

cd /usr/ports/editors/openoffice.org-3 && make -DWITHOUT_GNOME
-DWITHOUT_CUPS LOCALIZED_LANG=es && make -DWITHOUT_GNOME -DWITHOUT_CUPS
LOCALIZED_LANG=es package

everything compiled and installed correctly, but as soon as I tried to
use the pyuno bridge I noticed that it was compiled with
SYSTEM_PYTHON="NO", so I wasn't able to import uno within the
system-wide python interpreter. I've added the needed path to my
PYTHONPATH and followed the instructions here:

http://udk.openoffice.org/python/python-bridge.html#replacing

to replace the python version within openoffice with my python version
(installed from ports too). But as soon as I try to import the uno
module I get:

> setenv PYTHONPATH /usr/local/openoffice.org-3.1.1/openoffice.org/basis3.1/program/
> python
Python 2.6.4 (r264:75706, Dec 28 2009, 18:33:38) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import uno
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/local/openoffice.org-3.1.1/openoffice.org/basis3.1/program/uno.py",
line 33, in <module> import pyuno SystemError: dynamic module not
initialized properly
>>> 

which pointed me to some trouble regarding the pyuno.so file. I've
tried to see the libs to which pyuno.so was linked with using ldd, and
I got some really strange response:

> ldd /usr/local/openoffice.org-3.1.1/openoffice.org/basis3.1/program/pyuno.so
/usr/local/openoffice.org-3.1.1/openoffice.org/basis3.1/program/pyuno.so:
> 

(no lib at all!)

I've checked this in a 7-STABLE box with OpenOffice 2.4.0 and the
result is the same (no libs appear when calling ldd).

In some linux boxes I've at the office (ubuntu) calling ldd pyuno.so
returns the usual information about the linked libs, so I think there
is a problem with the building of pyuno.so.

I've tried to rebuild only pyuno from the work directory
in /usr/ports/editors/openoffice.org-3 switching to
SYSTEM_PYTHON="YES", but I had no luck with it, I did:

# cd /usr/ports/editors/openoffice.org-3/work
# source FreeBSDAMDEnv.Set
# setenv SYSTEM_PYTHON "YES"
# setenv PYTHON_CFLAGS "-I/usr/local/include/python2.6"
# setenv PYTHONPATH "/usr/local/lib:/usr/local/lib/python2.6:/usr/local/lib/python2.6/lib-dynload"
# cd pyuno
# rm -r unxfbsdx.pro
# cd source/module
# dmake

Doing that seemed to work until it reaches a point where it does some
checks on the recently created libs:

Making: ../../unxfbsdx.pro/lib/libpyuno.so
c++ -Wl,-z,combreloc -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib'
-shared -L../../unxfbsdx.pro/lib -L../lib
-L/home/openoffice.org-3/work/OOO310_m19/solenv/unxfbsdx/lib
-L/home/openoffice.org-3/work/OOO310_m19/solver/310/unxfbsdx.pro/lib
-L/home/openoffice.org-3/work/OOO310_m19/solenv/unxfbsdx/lib
-L/usr/local/jdk1.6.0/lib -L/usr/local/jdk1.6.0/jre/lib/amd64
-L/usr/local/jdk1.6.0/jre/lib/amd64/server
-L/usr/local/jdk1.6.0/jre/lib/amd64/native_threads
-L/usr/local/lib ../../unxfbsdx.pro/slo/pyuno_version.o
-o ../../unxfbsdx.pro/lib/libpyuno.so ../../unxfbsdx.pro/slo/pyuno_runtime.o ../../unxfbsdx.pro/slo/pyuno.o ../../unxfbsdx.pro/slo/pyuno_callable.o ../../unxfbsdx.pro/slo/pyuno_module.o ../../unxfbsdx.pro/slo/pyuno_type.o ../../unxfbsdx.pro/slo/pyuno_util.o ../../unxfbsdx.pro/slo/pyuno_except.o ../../unxfbsdx.pro/slo/pyuno_adapter.o ../../unxfbsdx.pro/slo/pyuno_gc.o
-luno_cppu -luno_cppuhelpergcc3 -luno_sal -pthread -lm -Wl,-Bdynamic
-lstlport_gcc rm -f ../../unxfbsdx.pro/lib/check_libpyuno.so
mv ../../unxfbsdx.pro/lib/libpyuno.so ../../unxfbsdx.pro/lib/check_libpyuno.so /home/openoffice.org-3/work/OOO310_m19/solenv/bin/checkdll.sh
-L../../unxfbsdx.pro/lib
-L/home/openoffice.org-3/work/OOO310_m19/solver/310/unxfbsdx.pro/lib  ../../unxfbsdx.pro/lib/check_libpyuno.so
Checking DLL ../../unxfbsdx.pro/lib/check_libpyuno.so ...:
ERROR: ../../unxfbsdx.pro/lib/check_libpyuno.so: Undefined symbol
"PyType_Type" dmake:  Error code 1, while making
'../../unxfbsdx.pro/lib/libpyuno.so'

ERROR: Error 65280 occurred while
making /home/openoffice.org-3/work/OOO310_m19/pyuno/source/module
rmdir /tmp/63451
#

and there it crashes.

I'm somehow lost now, as I've searched through google and tried some
many things, so perhaps you could help me with that.

I need pyuno working with the system-wide python version because I need to use it in another piece of software (actually OpenERP).

Ah, almost forgot to mention the arch is amd64 ;D

Thnx for your time and help.

Best regards

-- 

"Perceive that which cannot be seen with the eye." - Miyamoto Musashi
---------------------------------------------------------------------
Francisco de Borja Lopez Rio (wu@e-shell.org)
http://www.codigo23.net / http://www.e-shell.org

-- 

"Do nothing which is of no use." - Miyamoto Musashi
---------------------------------------------------------------------
Francisco de Borja Lopez Rio (borja@pexego.es)
Pexego Sistemas Informaticos S.L.
http://www.pexego.es




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100104113459.8a500c40.borja>