python3-libtorrent linking libboost_python27.so instead of libboost_python36.so

Bug #1800264 reported by stupid user
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
boost1.67 (Ubuntu)
Won't Fix
Undecided
Unassigned
Cosmic
Won't Fix
Undecided
Unassigned
libtorrent-rasterbar (Ubuntu)
Fix Released
Critical
Unassigned
Cosmic
Fix Released
Critical
Unassigned

Bug Description

[Impact]

Due to the libboost-python naming convention changing, python3-libtorrent incorrectly links to libboost_python27.so instead of libboost_python36.so in cosmic. The essentially renders the package useless.

[Test Case]

Run the command:

$ python3 -c "import libtorrent"

With 1.1.9-1 on cosmic, it will fail with:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python27.so.1.67.0: undefined symbol: PyClass_Type

The command should exit without error in the fixed version.

[Regression Potential]

There is little regression potential as the package is currently broken without this fix.

----

An error occurs when importing the libtorrent module from python 3.x script:

ImportError: /usr/lib/x86_64-linux-gnu/libboost_python27.so.1.67.0: undefined symbol: PyClass_Type

How to reproduce:
1. Install packages:
python36
python3-libtorrent
2. Run any python script importing libtorrent module

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: python3-libtorrent 1.1.9-1
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
Uname: Linux 4.18.0-10-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Oct 27 09:21:43 2018
InstallationDate: Installed on 2009-11-28 (3254 days ago)
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
SourcePackage: libtorrent-rasterbar
UpgradeStatus: Upgraded to cosmic on 2018-10-25 (1 days ago)

Revision history for this message
stupid user (mc6312) wrote :
Cas (calumlind)
Changed in libtorrent-rasterbar (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Cas (calumlind) wrote :

The issue seems to be that in Cosmic the libboost-python lib naming convention has changed and that affects the debian rules scripts picking the correct lib python version.

Bionic: /usr/lib/x86_64-linux-gnu/libboost_python-py36.so.1.62.0
Cosmic: /usr/lib/x86_64-linux-gnu/libboost_python36.so.1.67.0

https://packages.ubuntu.com/bionic/amd64/libboost-python1.62.0/filelist
https://packages.ubuntu.com/cosmic/amd64/libboost-python1.67.0/filelist

Revision history for this message
Cas (calumlind) wrote :

So the backward compatibility links were broken in libboost_python 1.67:

https://salsa.debian.org/debian/boost/commit/264a065b6996f87b3825afdc679474faff78d748#8756c63497c8dc39f7773438edf53b220c773f67_185_182

There is the new:

libboost_python$(py3default).so

The old:

libboost_python3-py$(py3default).so

But the other old name is missing:

libboost_python-py$(py3default).so

Revision history for this message
Cas (calumlind) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in boost1.67 (Ubuntu):
status: New → Confirmed
Revision history for this message
Cas (calumlind) wrote :

Created a debdiff to fix the 1.1.9 package on Cosmic.

For reference to easily replicate the bug:

    apt install python3-libtorrent
    python3 -c 'import libtorrent as lt; print(lt.__version__)'

Changed in libtorrent-rasterbar (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Cas (calumlind) wrote :

This won't be fixed in upstream boost package so instead I have made an upstream request to fix the package that should propagate to Disco https://salsa.debian.org/debian/libtorrent-rasterbar/merge_requests/1

In the meantime for any users needing a fixed version, there is a daily build PPA: https://code.launchpad.net/~libtorrent.org/+archive/ubuntu/rc-1.1-daily

Cas (calumlind)
Changed in boost1.67 (Ubuntu):
status: Confirmed → Won't Fix
Changed in libtorrent-rasterbar (Ubuntu Cosmic):
status: New → Confirmed
importance: Undecided → Critical
description: updated
Changed in libtorrent-rasterbar (Ubuntu Cosmic):
status: Confirmed → In Progress
Changed in libtorrent-rasterbar (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libtorrent-rasterbar - 1.1.11-2

---------------
libtorrent-rasterbar (1.1.11-2) unstable; urgency=medium

  * d/rules: Use boost-python >=1.67 soname suffix to fix
    Python 3 linking (LP: #1800264).

 -- Calum Lind <email address hidden> Sat, 08 Dec 2018 21:49:08 -0500

Changed in libtorrent-rasterbar (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

It doesn't seem worth fixing but the debdiff has an extraneous line removal in debian/changelog.

Changed in libtorrent-rasterbar (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello stupid, or anyone else affected,

Accepted libtorrent-rasterbar into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libtorrent-rasterbar/1.1.9-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Cas (calumlind) wrote :

Thanks Brian, weirdly missed receiving notification about this update so would have checked sooner!

I have tested the 1.1.9-1ubuntu0.1 package and confirm it works.

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libtorrent-rasterbar - 1.1.9-1ubuntu0.1

---------------
libtorrent-rasterbar (1.1.9-1ubuntu0.1) cosmic; urgency=medium

  * Fix linking to wrong boost_python with Python 3. (LP: #1800264)

 -- Calum Lind <email address hidden> Wed, 05 Dec 2018 11:12:55 +0000

Changed in libtorrent-rasterbar (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for libtorrent-rasterbar has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 18.10 (Cosmic Cuttlefish) has reached end of life, so this bug will not be fixed for that specific release.

Changed in boost1.67 (Ubuntu Cosmic):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.