Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291229 - net-libs/libtorrent-0.12.5 and net-p2p/rtorrent-0.8.5 patches for solaris
Summary: net-libs/libtorrent-0.12.5 and net-p2p/rtorrent-0.8.5 patches for solaris
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 19:56 UTC by Brian D Kacos
Modified: 2010-01-30 10:18 UTC (History)
0 users

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


Attachments
Updated ebuild (libtorrent-0.12.5.ebuild,1.27 KB, text/plain)
2009-10-30 19:57 UTC, Brian D Kacos
Details
Updated ebuild (rtorrent-0.8.5.ebuild,2.12 KB, text/plain)
2009-10-30 19:57 UTC, Brian D Kacos
Details
libtorrent patch (libtorrent-0.12.5-solaris2.patch,652 bytes, patch)
2009-10-30 19:58 UTC, Brian D Kacos
Details | Diff
rtorrent patch (rtorrent-0.8.5-solaris2.patch,3.92 KB, patch)
2009-10-30 19:58 UTC, Brian D Kacos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian D Kacos 2009-10-30 19:56:25 UTC
After much frustration, I was able to get rtorrent and libtorrent compiling and running on a gentoo prefix on OpenSolaris (latest release 6/9 I beleive). The main issues are that /bin/sh on Solaris can't be used with libtool and autoconf (fixed in the ebuild) and some patches dealing with system structs and headers. I've submitted these patches to upstream, but he hasn't been too receptive to these types of patches in the past (mostly because we have to use an extern function declaration instead of an #include due to a Solaris bug.).

Reproducible: Always

Steps to Reproduce:
1.emerge rtorrent
2.
3.

Actual Results:  
Fails to compile. With patches and ebuilds, compiles fine.

Expected Results:  
Everything should work now.
Comment 1 Brian D Kacos 2009-10-30 19:57:08 UTC
Created attachment 208777 [details]
Updated ebuild
Comment 2 Brian D Kacos 2009-10-30 19:57:33 UTC
Created attachment 208779 [details]
Updated ebuild
Comment 3 Brian D Kacos 2009-10-30 19:58:08 UTC
Created attachment 208781 [details, diff]
libtorrent patch
Comment 4 Brian D Kacos 2009-10-30 19:58:25 UTC
Created attachment 208782 [details, diff]
rtorrent patch
Comment 5 Fabian Groffen gentoo-dev 2009-11-11 16:10:05 UTC
somehow this patching seems not enough:

libtool: compile:  i386-pc-solaris2.10-g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -O2 -Wall -DNDEBUG -fvisibility=hidden -I/Library/Gentoo/usr/include -I/Library/Gentoo/usr/include/sigc++-2.0 -I/Library/Gentoo/usr/lib/sigc++-2.0/include -c memory_chunk.cc -o memory_chunk.o >/dev/null 2>&1
socket_file.cc: In member function ‘bool torrent::SocketFile::reserve(uint64_t, uint64_t)’:
socket_file.cc:114: error: ‘posix_fallocate’ was not declared in this scope
make[3]: *** [socket_file.lo] Error 1
make[3]: *** Waiting for unfinished jobs....

there is indeed no such function on solaris 10
Comment 6 Matt Michalowski 2009-12-09 03:38:47 UTC
(In reply to comment #5)
> somehow this patching seems not enough:
> 
> libtool: compile:  i386-pc-solaris2.10-g++ -DHAVE_CONFIG_H -I. -I../.. -I.
> -I./.. -I../.. -O2 -Wall -DNDEBUG -fvisibility=hidden
> -I/Library/Gentoo/usr/include -I/Library/Gentoo/usr/include/sigc++-2.0
> -I/Library/Gentoo/usr/lib/sigc++-2.0/include -c memory_chunk.cc -o
> memory_chunk.o >/dev/null 2>&1
> socket_file.cc: In member function ‘bool
> torrent::SocketFile::reserve(uint64_t, uint64_t)’:
> socket_file.cc:114: error: ‘posix_fallocate’ was not declared in this scope
> make[3]: *** [socket_file.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> 
> there is indeed no such function on solaris 10
> 

This doesn't exist on x64-macos either (and x86-macos I'd imagine), so perhaps it should do something like:

    local myconf=""
    if use amd64-linux || use x86-linux ; then
        myconf="--with-posix-fallocate"
    fi

    econf \
        $(use_enable debug) \
        $(use_enable ipv6) \
        --enable-aligned \
        --enable-static \
        --enable-shared \
        --disable-dependency-tracking \
        ${myconf} || die "econf failed"

to only enable it on Linux?
Comment 7 Fabian Groffen gentoo-dev 2009-12-20 20:28:45 UTC
thanks for the patches and fixes!

librtorrent fixed and keyworded ~x64-solaris
rtorrent fixed and keyworded ~x64-solaris

If you need other keywords, please note on this bug.
Comment 8 Matt Michalowski 2010-01-30 00:09:41 UTC
~x64-macos would be nice :)
Comment 9 Fabian Groffen gentoo-dev 2010-01-30 10:18:45 UTC
done