Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibTorrentTest fails to build on 13.8 due to multiple definitions. #210

Open
matzeri opened this issue Mar 14, 2020 · 2 comments
Open

LibTorrentTest fails to build on 13.8 due to multiple definitions. #210

matzeri opened this issue Mar 14, 2020 · 2 comments

Comments

@matzeri
Copy link

matzeri commented Mar 14, 2020

Cygwin 64bit with gcc 9.2

On test\Makefile.am there are an excess of libraries causing link to fail
as multiple definitions are not permitted

LibTorrentTest_LDADD = \
        ../src/libtorrent.la \
        ../src/torrent/libsub_torrent.la \
        ../src/torrent/data/libsub_torrentdata.la \
        ../src/torrent/download/libsub_torrentdownload.la \
        ../src/torrent/peer/libsub_torrentpeer.la \
        ../src/data/libsub_data.la \
        ../src/dht/libsub_dht.la \
        ../src/net/libsub_net.la \
        ../src/protocol/libsub_protocol.la \
        ../src/download/libsub_download.la \
        ../src/tracker/libsub_tracker.la \
        ../src/utils/libsub_utils.la \
        ../src/torrent/utils/libsub_torrentutils.la

the correct form should be just

LibTorrentTest_LDADD = \
        ../src/libtorrent.la

as the shared library includes already all the other block of codes.

@ghost
Copy link

ghost commented Nov 24, 2021

I can't for the life of me get libtorrent to link (in Cygwin) on master. It complains about a multiple definition.

This one IIRC, in src/torrent/net/socket_address.h:
inline bool sap_is_broadcast(const sa_unique_ptr& sap) { return sa_is_broadcast(sap.get()); }

Hm, looking at it now, that's a pretty recent addition.

@rakshasa
Copy link
Owner

I fixed an issue with linking the tests a couple months ago, the OP's issue should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants