From: Bruce S. <Bru...@nc...> - 2010-12-29 23:29:13
|
I got farther still in trying to build Visual for Python 3 on Ubuntu 10.10. I rebuilt the Boost libraries for Python 3.1 with an option for longer library names (--layout=versioned) which inserted (in my case) -gcc44-mt into the library names. Now I could put these in /usr/lib, because libboost_thread for Python 2.6 doesn't conflict with libboost_thread-gcc44-mt for Python 3.1. I put the folder of boost includes in my own location, which overrode looking in /usr/include/boost. However, although I can build and link and install, when I try to import visual, an import error occurs on trying to import the C++ component, cvisual. The import error message is "dynamic module does not define init function (PyInit_cvisual)" This sounds like a failure of the Boost mechanisms to tag the cvisual entry point properly. Sigh. I don't know what to try next. I would of course be interested to hear from anyone who has attempted to build Visual for Python 3.1 on Ubuntu (or other Linux, for that matter). Bruce Sherwood On Mon, Dec 27, 2010 at 3:12 PM, Bruce Sherwood <Bru...@nc...> wrote: > I got a little farther. Although the documentation looks like > --library-path and -L should be synonyms, it seems like they aren't. > With -L I do find the libraries for Python 3. But then when I try to > run Visual, "import cvisual" fails because there's a search for > libboost_python in /usr/libs which finds a version for Python 2.6, > even if I've copied the Python 3 libraries to /usr/libs. The > fundamental problem is that I don't see how to use distinctive names > for the Python 3 libraries, such as "libboost3_python" instead of > "libboost_python". > > I also tried ld -static and produced a large static library. But > "import cvisual" is apparently unable to deal with a static library on > Ubuntu. > > Bruce Sherwood > > On Sun, Dec 26, 2010 at 10:17 PM, Bruce Sherwood > <Bru...@nc...> wrote: >> I'm trying to build Visual on Ubuntu (10.10) for Python 3.1, where the >> standard Python is Python 2.6, and the Boost 1.42 libraries are >> installed for this version of Python. >> >> I've built the Boost 1.43 libraries for Python 3.1 and placed in my >> own space the Boost folder of include files and, in a folder beside >> the include files, the boost_python, boost_signals, and boost_thread >> libraries. I altered the make file to specify linking these libraries >> from my own directory rather than from the standard locations, as >> follows: >> >> ld ..... --library-path=mylibs -lboost_python -lboost_signals >> -lboost_thread .... >> >> What happens when I build looks like I'm linking against the >> Ubuntu-installed libraries for Python 2.6, because when I try to run >> Visual, I get an import error referring to >> /usr/lib/libboost_python-py2.6.so.1.42.0, which is of course missing a >> needed symbol. >> >> Can anyone shed any light on this? Thanks. >> >> Bruce Sherwood >> > |