code-google-com / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

link boost statically #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I obtain this:
onur@master:~/thirdparty$ python
Python 2.5.2 (r252:60911, Jan 20 2010, 23:14:04) 
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyV8
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/PyV8.py", line 17, in <module>
  File "build/bdist.linux-x86_64/egg/_PyV8.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/_PyV8.py", line 6, in __bootstrap__
ImportError: 
/home/onur/.python-eggs/PyV8-1.0-py2.5-linux-x86_64.egg-tmp/_PyV8.so: undefined 
symbol: _ZNK5boost6python6detail17exception_handlerclERKNS_9function0IvEE

which seems to be a dynamic binding issue.
Could it be possible to ship a version of pyv8 with all depencencies statically 
included in compilation?

I have an old debian but am using head checkout of pyv8, boost-trunk and v8.

Original issue reported on code.google.com by on.cel...@gmail.com on 9 Aug 2011 at 6:14

GoogleCodeExporter commented 9 years ago
Or if you can include needed boost-python code in your's, it will be even 
better :)

Original comment by on.cel...@gmail.com on 9 Aug 2011 at 6:44

GoogleCodeExporter commented 9 years ago
I have tried to link the static boost library with -static argument, but it 
seems doesn't work when both the .a and .so exists.

http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Link-Options.html#Link-Options
-static
On systems that support dynamic linking, this prevents linking with the shared 
libraries. On other systems, this option has no effect

So, I think the most simple way is rename/remove the symbol link of 
libboost_python.so before build the pyv8; on the other hand, you may build 
boost with -link=static which only generate .a

Original comment by flier...@gmail.com on 10 Aug 2011 at 3:26

GoogleCodeExporter commented 9 years ago
add a global BOOST_STATIC_LINK flag, please verify it with SVN code r389 or 
later

Original comment by flier...@gmail.com on 10 Aug 2011 at 4:43