jash-kothari-forks / libtorrent

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

python3 bindings fail on ArchLinux 32bit #478

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compiled and installed libtorrent-rasterbar 0.16.10 python bindings on a 
ArchLinux 32bit system, see PKGBUILD: 
https://aur.archlinux.org/packages/py/python-libtorrent-rasterbar/PKGBUILD
2. onny@onny> python                                                            
                                                ~
Python 3.3.1 (default, Apr  6 2013, 19:11:39) 
[GCC 4.8.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import libtorrent
zsh: segmentation fault (core dumped)  python

Original issue reported on code.google.com by onnyonn...@gmail.com on 15 May 2013 at 6:47

Attachments:

GoogleCodeExporter commented 9 years ago
I also have to note that the same package works fine on ArchLinux x64 systems.

Original comment by onnyonn...@gmail.com on 15 May 2013 at 6:51

GoogleCodeExporter commented 9 years ago
Here a more verbose backtrace. This time I tried boost 1.54.0 beta1 but it 
still fails.

Original comment by onnyonn...@gmail.com on 5 Jun 2013 at 8:40

Attachments:

GoogleCodeExporter commented 9 years ago
Here is a gdb backtrace for libtorrent compiled with debug symbols

Original comment by onnyonn...@gmail.com on 7 Jul 2013 at 7:04

Attachments:

GoogleCodeExporter commented 9 years ago
Following "patch" fixes the crash of libtorrent with python3 on x32 systems:
sed -i '/all_categories/s/0x7fffffff/0xfffffff/' include/libtorrent/alert.hpp

Now I'm able to import and use libtorrent on my 32-bit system :)

Original comment by onnyonn...@gmail.com on 7 Jul 2013 at 8:45

GoogleCodeExporter commented 9 years ago
I'm applying this. Please let me know if that doesn't work:

Index: bindings/python/src/alert.cpp
===================================================================
--- bindings/python/src/alert.cpp   (revision 8586)
+++ bindings/python/src/alert.cpp   (working copy)
@@ -126,7 +126,7 @@
             .value("ip_block_notification", alert::ip_block_notification)
             .value("performance_warning", alert::performance_warning)
             .value("stats_notification", alert::stats_notification)
-            .value("all_categories", alert::all_categories)
+            .value("all_categories", (alert::category_t)0xfffffff)
             ;

     }

Thanks for figuring this out!

Original comment by arvid.no...@gmail.com on 9 Jul 2013 at 6:10

GoogleCodeExporter commented 9 years ago
Tested python bindings with libtorrent-rasterbar version 0.16.11 and it's fixed 
now, thank you!

Original comment by onnyonn...@gmail.com on 25 Aug 2013 at 9:52