Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518582 - net-libs/libtorrent-0.13.4 - add --disable-instrumentation to econf
Summary: net-libs/libtorrent-0.13.4 - add --disable-instrumentation to econf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libatomic-linking
  Show dependency tree
 
Reported: 2014-07-30 13:06 UTC by Manuel Lauss
Modified: 2023-03-10 13:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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