Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 825742 - net-p2p/transmission-3.00-r1: Undefined references when building with libtransmission.a
Summary: net-p2p/transmission-3.00-r1: Undefined references when building with libtran...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-21 19:58 UTC by Ivo Šmerek
Modified: 2021-11-21 20:10 UTC (History)
0 users

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 Ivo Šmerek 2021-11-21 19:58:36 UTC
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?

Reproducible: Always

Steps to Reproduce:
1. Install all dependencies
2. git clone https://gitlab.gnome.org/World/Fragments
3. cd Fragments
4. meson build
5. cd build
6. ninja
Comment 1 Mike Gilbert gentoo-dev 2021-11-21 20:10:52 UTC
See bug 807993 comment 11.

If you manage to get everything working, patches would be welcome. But I'm not planning to spend any effort myself on this.