Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 518582

Summary: net-libs/libtorrent-0.13.4 - add --disable-instrumentation to econf
Product: Gentoo Linux Reporter: Manuel Lauss <manuel.lauss>
Component: [OLD] LibraryAssignee: Jason Zaman <perfinion>
Status: RESOLVED FIXED    
Severity: normal CC: khepler, net-p2p
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/rakshasa/rtorrent/issues/151
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 721344    

Description Manuel Lauss 2014-07-30 13:06:36 UTC
starting with libtorrent-0.13.x, some instrumentation code uses atomic ops on 64bit variables, which leads to build failures on 32bit targets using libtorrent
because of missing builtins: (example from rtorrent on 32bit MIPS and ARM):

/usr/lib/libtorrent.so: undefined reference to `__sync_add_and_fetch_8'
/usr/lib/libtorrent.so: undefined reference to `__sync_fetch_and_and_8'

The developer added a "--disable-instrumentation" switch which skips the build
of the offending codepaths in libtorrent.


Reproducible: Always
Comment 1 Kris Hepler 2017-06-10 19:56:20 UTC
Affects (32b bit) ppc arch as well.
Comment 2 Jason Zaman gentoo-dev 2017-08-19 10:14:01 UTC
https://github.com/rakshasa/rtorrent/issues/151

commit 11ea311f95c00f9a9003c4cf41d9fe1ce4244960
Author: Jason Zaman <perfinion@g.o>
Date:   Sat Aug 19 15:53:16 2017

    net-libs/libtorrent: fix undefined __sync_add_and_fetch_8 (bug 518582)
    
    Package-Manager: Portage-2.3.6, Repoman-2.3.1

I added a test if the compiler can use those symbols, if not it disables instrumentation. Seemed better that way than hardcoding only for amd64