Can we please get a transmission library enabled by default or at least as a USE flag in the ebuild? Some third-party programs depend on it and there is no way for me to currently compile them. It is a one-line fix. Add `-DINSTALL_LIB=ON` to the `mycmakeargs` in the `src_configure`. I tested it and it works just fine. https://github.com/transmission/transmission/blob/79e8bc5c460e608f9346504021d879111c2a22aa/CMakeLists.txt#L28
Out of interest, which third-party programs?
A Google search for "libtransmission" turned up "Fragments". https://gitlab.gnome.org/World/Fragments
I tried testing -DINSTALL_ON with transmission-9999, and it did nothing. It looks like support for this option was (mistakenly) dropped in this commit: https://github.com/transmission/transmission/commit/677dc73eac3efa769eefb1c7ec4eda232a35977a#diff-a02b46337b6b27dcfb4e7c5fc518017109e20a8fff8a54a20947440a573e2861L328
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9687ba5881a2e14b2fbdbbfa3c0724168df6569 commit d9687ba5881a2e14b2fbdbbfa3c0724168df6569 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-08-13 15:28:02 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-08-13 15:28:02 +0000 net-p2p/transmission: optionally install libtransmission.a Closes: https://bugs.gentoo.org/807993 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-p2p/transmission/transmission-3.00-r1.ebuild | 5 ++++- net-p2p/transmission/transmission-9999.ebuild | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)
Sorry for bumping, but I didn't want to create a new ticket for this since it is related to this one. I tried to build Fragments with the libtransmission.a static library but compilation fails with this error message: ``` cc -o src/fragments src/fragments.p/meson-generated_.._.._data_de.haeckerfelix.Fragments.c.o src/fragments.p/meson-generated_fragments-app.c.o src/fragments.p/meson-generated_fragments-utils.c.o src/fragments.p/meson-generated_fragments-torrent.c.o src/fragments.p/meson-generated_fragments-torrent-group.c.o src/fragments.p/meson-generated_fragments-torrent-manager.c.o src/fragments.p/meson-generated_fragments-torrent-model.c.o src/fragments.p/meson-generated_fragments-torrent-listbox.c.o src/fragments.p/meson-generated_fragments-settings-window.c.o src/fragments.p/meson-generated_fragments-torrent-row.c.o src/fragments.p/meson-generated_fragments-settings.c.o src/fragments.p/meson-generated_fragments-window.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib64/libgtk-3.so /usr/lib64/libgdk-3.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libharfbuzz.so /usr/lib64/libatk-1.0.so /usr/lib64/libcairo-gobject.so /usr/lib64/libcairo.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libhandy-1.so -lb64 -lutp -lminiupnpc /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/dht.a -lnatpmp -levent -lcurl -lcrypto -lssl -lutp /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libpthread.so -lz -ltransmission -Wl,--end-group /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(tr-utp.c.o): in function `incoming': (.text+0x4d): undefined reference to `UTP_GetPeerName' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x9d): undefined reference to `UTP_Close' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(tr-utp.c.o): in function `timer_callback': (.text+0x175): undefined reference to `UTP_CheckTimeouts' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(tr-utp.c.o): in function `tr_utpPacket': (.text+0x206): undefined reference to `UTP_IsIncomingUTP' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(net.c.o): in function `tr_netOpenPeerUTPSocket': (.text+0x11c3): undefined reference to `UTP_Create' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(peer-io.c.o): in function `io_close_socket': (.text+0xbe): undefined reference to `UTP_SetCallbacks' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xc7): undefined reference to `UTP_Close' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(peer-io.c.o): in function `tr_peerIoNew': (.text+0x5cd): undefined reference to `UTP_SetSockopt' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x5ec): undefined reference to `UTP_SetCallbacks' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x606): undefined reference to `UTP_Connect' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(peer-io.c.o): in function `tr_peerIoTryWrite': (.text+0xdcf): undefined reference to `UTP_Write' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(peer-io.c.o): in function `tr_peerIoTryRead': (.text+0x27c8): undefined reference to `UTP_RBDrained' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libtransmission.a(peer-mgr.c.o): in function `close_peer_socket': (.text+0x55c): undefined reference to `UTP_Close' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ``` I'm not very experienced in this, but I think it is somehow related to the libutp library? https://github.com/bittorrent/libutp I built and installed it to my system, tried to add it as a dependency in meson.build, but it didn't work. Then I noticed there is an -DUSE_SYSTEM_UTP=OFF option in the transmission ebuild. Is it related? Tried to build it with this option enabled but without any success. Does it have to do something with the libtransmission.a library itself and its compilation?
Create a new bug please.
libtransmission.a is broken without libutp.a, and we don't package libutp. I'm just going to drop libtransmission again.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adb7f025a8208f192c9ee1cb7834dbedecdb2043 commit adb7f025a8208f192c9ee1cb7834dbedecdb2043 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-11-21 19:53:21 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-11-21 19:53:21 +0000 net-p2p/transmission: drop broken libtransmission.a Bug: https://bugs.gentoo.org/807993 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-p2p/transmission/transmission-3.00-r1.ebuild | 5 +---- net-p2p/transmission/transmission-9999.ebuild | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)
(In reply to Mike Gilbert from comment #6) > Create a new bug please. Never mind on this. Making this work in an ebuild is really not worth the effort. If you want to build against libtransmission, you'll need to compile it manually.
Alright, but I don't really understand what the problem is here and what should I do to make it work even if building manually. Could you point me in the right direction, please?
You would need to build/install libutp yourself and build transmission with -DINSTALL_LIB=ON. Alternatively, transmission builds its own private copy of libutp, so maybe you could piggy-back on that without installing libutp systemwide. Manually building software is outside the scope of this bug tracker, so please seek further assistance elsewhere.
(In reply to Mike Gilbert from comment #7) > libtransmission.a is broken without libutp.a, and we don't package libutp. I'm sorry, I missed your previous comment. I tried to build transmission with libutp installed, https://github.com/BlueManCZ/edgets/blob/master/net-libs/libutp/libutp-18.05.15.ebuild and with -DUSE_SYSTEM_UTP=ON in your ebuild, but it didn't work either. It's not that I didn't try. I'm sorry to bother you. I just thought it would be something small.
(In reply to Ivo Šmerek from comment #12) The problem is somewhat complex due to the use of bundled libutp and libb64 in the transmission ebuild. To make this work, those would somehow need to be bundled into libtransmission.a, or we would need to use the system libutp and libb64. Using the system libs is problematic because the transmission developer has forked these projects and altered them. Installing the forked libs is probably not a good idea.
Thank you, now I see the transmission developer is probably not using the master branches of https://github.com/transmission/libutp and https://github.com/transmission/libb64 right? There are other more recent branches. It conflicts with https://packages.gentoo.org/packages/dev-libs/libb64 as well? I will look into it, thank you for your tips.
It looks like Fragments uses flatpak as its primary build mechanism. You might try messing around with sys-apps/flatpak as a shortcut here.