Bug #1636

Springlobby can't be build in gentoo with torrent flag

Added by iddqd 7 months ago. Updated 4 months ago.

Status:Resolved Start date:11/09/2011
Priority:Normal Due date:
Assignee:koshi % Done:

0%

Category:build and packaging
Target version:-
Resolution:fixed SpringLobby version:
Platform:Linux

Description

~# emerge -av springlobby

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ~] games-util/springlobby-0.137 USE="libnotify sound torrent* -debug" 0 kB [1]
.....
Linking CXX executable springlobby
CMakeFiles/springlobby.dir/src/torrentwrapper.cpp.o: In function `TorrentWrapper::AddTorrent(PlasmaResourceInfo const&)':
torrentwrapper.cpp:(.text+0x44db): undefined reference to `libtorrent::default_storage_constructor(libtorrent::file_storage const&, libtorrent::file_storage const*, boost::filesystem2::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem2::path_traits> const&, libtorrent::file_pool&)'
torrentwrapper.cpp:(.text+0x4566): undefined reference to `libtorrent::torrent_info::torrent_info(boost::filesystem2::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem2::path_traits> const&)'
collect2: ld returned 1 exit status
make2: * [springlobby] Error 1
make1:
[CMakeFiles/springlobby.dir/all] Error 2
make: *
* [all] Error 2
emake failed

libtorrent version

~# emerge --search libtorrent

  • net-libs/libtorrent
    Latest version available: 0.12.9
    Latest version installed: 0.12.9
    Size of files: 652 kB
    Homepage: http://libtorrent.rakshasa.no/
    Description: BitTorrent library written in C++ for *nix
    License: GPL-2

sl_torrent.patch (511 Bytes) malric, 12/25/2011 02:56 pm

Associated revisions

Revision bbfc69c3
Added by Rene Milk 5 months ago

apply patch by malric, fixes #1636

History

Updated by malric 5 months ago

The error seems to be composed of two problems:
  • net-libs/rb_libtorrent is compiled with a different version of boost than currently selected (with eselect). I would recommend just re-emerging net-libs/rb_libtorrent.
  • the pkg-config CFLAGS for rb_libtorrent do not get into the cmake of springlobby. I tried to add the line "ADD_DEFINITIONS ( ${LIBTORRENT_CFLAGS} )" at line 174 into CMakeLists.txt, but I do not get the expected result (multiple of the defines in /usr/lib/pkgconfig/libtorrent-rasterbar.pc are missing, for example "-DTORRENT_DEBUG -DTORRENT_VERBOSE_LOGGING"). This causes the function to be compiled in springlobby with a different signature than it is compiled in the library.

As a workaround you can add in your local checkout "ADD_DEFINITIONS ( -DTORRENT_LOGGING )"

Updated by koshi 5 months ago

  • Status changed from New to Feedback

So basically this is entirely a packaging issue, corrrect?

Updated by malric 5 months ago

Not only. The makefile seems incorrect (does not add the cflags needed for rb_libtorrent).

My guess is that adding "ADD_DEFINITIONS ( ${LIBTORRENT_CFLAGS} )" should be the proper fix, but for some reasons it does not work now. I will investigate further.

Updated by malric 5 months ago

I confirm that adding "ADD_DEFINITIONS ( ${LIBTORRENT_CFLAGS} )" fixes the problem. Make sure to delete CMakeCache.txt before re-compiling.

The only line patch is attached.

Updated by koshi 5 months ago

  • Status changed from Feedback to Resolved
  • Assignee set to koshi
  • Resolution set to fixed

applied, thanks. Will be in next release

Updated by proton 4 months ago

koshi wrote:

applied, thanks. Will be in next release

springlobby-0.141 still can't be build

Linking CXX executable springlobby
CMakeFiles/springlobby.dir/src/torrentwrapper.cpp.o: In function `TorrentWrapper::AddTorrent(PlasmaResourceInfo const&)':
torrentwrapper.cpp:(.text+0x2e50): undefined reference to `libtorrent::default_storage_constructor(libtorrent::file_storage const&, libtorrent::file_storage const*, boost::filesystem2::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem2::path_traits> const&, libtorrent::file_pool&)'
torrentwrapper.cpp:(.text+0x2ecb): undefined reference to `libtorrent::torrent_info::torrent_info(boost::filesystem2::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem2::path_traits> const&)'

Also available in: Atom PDF