Skip to contentSkip to conversation

libtorrent / rtorrent: add latest upstream versions and fix crash on nslu2

PATCH In review Henry von Tresckow 4 participants 7 messages May 5, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtorrent / rtorrent: add latest upstream versions and fix crash on nslu2

- added version 0.12.6 of libtorrent and 0.8.6 of rtorrent
- added FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline" These parameters were recommended at the rtorrent website (http://libtorrent.rakshasa.no/wiki/LibTorrentKnownIssues#NSLU2routersandxscalebaseddevices)

---
 recipes/libtorrent/libtorrent_0.12.6.bb |   22 ++++++++++++++++++++++
 recipes/libtorrent/rtorrent_0.8.6.bb    |   17 +++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 recipes/libtorrent/libtorrent_0.12.6.bb
 create mode 100644 recipes/libtorrent/rtorrent_0.8.6.bb
recipes/libtorrent/libtorrent_0.12.6.bb new file +22 -0
new file mode 100644
index 0000000..075ce40
@@ -0,0 +1,22 @@
+DESCRIPTION = "library implementing the bittorrent protocol"
+HOMEPAGE = "http://libtorrent.rakshasa.no"
+SECTION = "libs/network"
+LICENSE = "GPL"
+DEPENDS = "libsigc++-2.0 openssl"
+
+SRC_URI = "http://libtorrent.rakshasa.no/downloads/libtorrent-${PV}.tar.gz"
+PR = "r0.1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-aligned"
+
+FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"
+
+do_stage() {
+	autotools_stage_all
+}
+
+
+SRC_URI[md5sum] = "037499ed708aaf72988cee60e5a8d96b"
+SRC_URI[sha256sum] = "7b02f33164966a05261e83bad76eef537198fefe76eaf57dfd64bb27c7d77129"
recipes/libtorrent/rtorrent_0.8.6.bb new file +17 -0
new file mode 100644
index 0000000..c765086
@@ -0,0 +1,17 @@
+DESCRIPTION = "Console bittorrent client using libtorrent"
+HOMEPAGE = "http://libtorrent.rakshasa.no"
+SECTION = "libs/network"
+LICENSE = "GPL"
+DEPENDS = "libtorrent curl ncurses gnutls libgpg-error"
+
+SRC_URI = "http://libtorrent.rakshasa.no/downloads/rtorrent-${PV}.tar.gz \
+           file://autoconf-cross-fix.patch;patch=1"
+
+PR = "r0"
+
+inherit autotools
+
+FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"
+
+SRC_URI[md5sum] = "b804c45c01c40312926bcea6b55bb084"
+SRC_URI[sha256sum] = "8c96c68e1524162abd1fc4b612d0c3d924fccc25159c0b3f208e69281f0b32db"
Signature · 1 line
1.6.3.3
#1 lore raw

You need to add a PACKAGE_ARCH_nlus2 = "${MACHINE_ARCH}" to this as its now nslu2 specific.

Graeme

Quoted 71 lines · Henry von Tresckow

- added version 0.12.6 of libtorrent and 0.8.6 of rtorrent
- added FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline" These parameters were recommended at the rtorrent website (http://libtorrent.rakshasa.no/wiki/LibTorrentKnownIssues#NSLU2routersandxscalebaseddevices)

---
 recipes/libtorrent/libtorrent_0.12.6.bb |   22 ++++++++++++++++++++++
 recipes/libtorrent/rtorrent_0.8.6.bb    |   17 +++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 recipes/libtorrent/libtorrent_0.12.6.bb
 create mode 100644 recipes/libtorrent/rtorrent_0.8.6.bb
recipes/libtorrent/libtorrent_0.12.6.bb new file +22 -0
new file mode 100644
index 0000000..075ce40
@@ -0,0 +1,22 @@
+DESCRIPTION = "library implementing the bittorrent protocol"
+HOMEPAGE = "http://libtorrent.rakshasa.no"
+SECTION = "libs/network"
+LICENSE = "GPL"
+DEPENDS = "libsigc++-2.0 openssl"
+
+SRC_URI = "http://libtorrent.rakshasa.no/downloads/libtorrent-${PV}.tar.gz"
+PR = "r0.1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-aligned"
+
+FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"
+
+do_stage() {
+	autotools_stage_all
+}
+
+
+SRC_URI[md5sum] = "037499ed708aaf72988cee60e5a8d96b"
+SRC_URI[sha256sum] = "7b02f33164966a05261e83bad76eef537198fefe76eaf57dfd64bb27c7d77129"
recipes/libtorrent/rtorrent_0.8.6.bb new file +17 -0
new file mode 100644
index 0000000..c765086
@@ -0,0 +1,17 @@
+DESCRIPTION = "Console bittorrent client using libtorrent"
+HOMEPAGE = "http://libtorrent.rakshasa.no"
+SECTION = "libs/network"
+LICENSE = "GPL"
+DEPENDS = "libtorrent curl ncurses gnutls libgpg-error"
+
+SRC_URI = "http://libtorrent.rakshasa.no/downloads/rtorrent-${PV}.tar.gz \
+           file://autoconf-cross-fix.patch;patch=1"
+
+PR = "r0"
+
+inherit autotools
+
+FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"
+
+SRC_URI[md5sum] = "b804c45c01c40312926bcea6b55bb084"
+SRC_URI[sha256sum] = "8c96c68e1524162abd1fc4b612d0c3d924fccc25159c0b3f208e69281f0b32db"
Signature · 7 lines
1.6.3.3


_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
#4 lore raw
In reply to Henry von Tresckow
Quoted 13 lines
recipes/libtorrent/libtorrent_0.12.6.bb new file +7 -0
new file mode 100644
index 0000000..075ce40
@@ -0,0 +1,22 @@
+DESCRIPTION = "library implementing the bittorrent protocol"
+HOMEPAGE = "http://libtorrent.rakshasa.no"
+SECTION = "libs/network"
+LICENSE = "GPL"
+DEPENDS = "libsigc++-2.0 openssl"
+
+SRC_URI = "http://libtorrent.rakshasa.no/downloads/libtorrent-${PV}.tar.gz"

recipes/libtorrent/libtorrent_0.12.6.bb line 17

Quoted 10 lines
recipes/libtorrent/libtorrent_0.12.6.bb new file +10 -0
+PR = "r0.1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-aligned"
+
+FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"
+
+do_stage() {
+       autotools_stage_all

1) No need for further dividing PR into subnumbers, r0 is sufficient.

2) On .dev your do not need to stage (mostly) anymore. If autotools installs everything correctly you can just dismiss the do_stage() routine. If something is missing, then install it via do_install_append in the appropriate folder and OE will determine that it needs to be staged. depending on the files' paths.

Regards,
Michael

#5 lore raw
Quoted 24 lines · Michael Lippautz

Review

Quoted 1 line
(quoted diff) +0 -0

libtorrent_0.12.6.bb

recipes/libtorrent/libtorrent_0.12.6.bb line 7

Quoted 12 lines

new file mode 100644
index 0000000..075ce40

recipes/libtorrent/libtorrent_0.12.6.bb new file +7 -0
@@ -0,0 +1,22 @@
+DESCRIPTION = "library implementing the bittorrent protocol"
+HOMEPAGE = "http://libtorrent.rakshasa.no"
+SECTION = "libs/network"
+LICENSE = "GPL"
+DEPENDS = "libsigc++-2.0 openssl"
+
+SRC_URI = "

http://libtorrent.rakshasa.no/downloads/libtorrent-${PV}.tar.gz<http://libtorrent.rakshasa.no/downloads/libtorrent-$%7BPV%7D.tar.gz>
"

recipes/libtorrent/libtorrent_0.12.6.bb

Quoted 7 lines
recipes/libtorrent/libtorrent_0.12.6.bb new file +7 -0
+PR = "r0.1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-aligned"
+
+FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations

-frename-registers -O2 -fpermissive -fno-inline"

Quoted 6 lines

recipes/libtorrent/libtorrent_0.12.6.bb line 17

Quoted 3 lines
recipes/libtorrent/libtorrent_0.12.6.bb new file +3 -0
+
+do_stage() {
+       autotools_stage_all

1) No need for further dividing PR into subnumbers, r0 is sufficient.

Thanks for catching that... left over from testing...

Quoted 7 lines

2) On .dev your do not need to stage (mostly) anymore. If autotools installs everything correctly you can just dismiss the do_stage() routine. If something is missing, then install it via do_install_append in the appropriate folder and OE will determine that it needs to be staged. depending on the files' paths.

Ok. I just copied the older revisinons. I'll chek on that tomorrow

Quoted 9 lines

Regards,
Michael

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
Henry von Tresckow (hvontres)
#2 lore raw
In reply to Graeme Gregory
Quoted 6 lines · Graeme Gregory

You need to add a PACKAGE_ARCH_nlus2 = "${MACHINE_ARCH}" to this as its now nslu2 specific.

Graeme

How should I apply the optimization only for nslu2 and other xscale machines? To make matters even more complicated, it seems that gcc > 4.3.0 doesn't need this workaround.

Any pointers would be appreciated. Also, should I fix up the older revisions as well or just the newest version?

Signature · 1 line
Henry von Tresckow (hvontres)
#3 lore raw
Quoted 8 lines · Hans Henry von Tresckow
Quoted 6 lines · Graeme Gregory

You need to add a PACKAGE_ARCH_nlus2 = "${MACHINE_ARCH}" to this as its now nslu2 specific.

Graeme

Quoted 6 lines

How should I apply the optimization only for nslu2 and other xscale machines? To make matters even more complicated, it seems that gcc > 4.3.0 doesn't need this workaround.

Any pointers would be appreciated. Also, should I fix up the older revisions as well or just the newest version?

Is this some recent bug, back in my zaurus days I never had a problem running rtorrent without special flags?

In the Angstrom distribution we had to add CPU class support for some things so we can for example add the same optimisations to all omap3 without naming each machine individually. I also added this years ago to openmoko distribution. Its something someone needs to get right for inclusion into OE wholescale!

Graeme

#6 lore raw
In reply to Henry von Tresckow

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · Henry von Tresckow

- added version 0.12.6 of libtorrent and 0.8.6 of rtorrent
- added FULL_OPTIMIZATION_nslu2 ="-mcpu=xscale -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"

It would be better to stuff that in your $DISTRO as:

FULL_OPTIMIZATION_pn-rtorrent = "-mcpu=xscale -fexpensive-optimizations
- -frename-registers -O2 -fpermissive -fno-inline"

or

FULL_OPTIMIZATION_pn-rtorrent_nslu2 = "-mcpu=xscale
- -fexpensive-optimizations -frename-registers -O2 -fpermissive -fno-inline"

See the perl example in
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/conf/distro/include/angstrom-glibc.inc

And "-fexpensive-optimizations" should only be used after manually verifying the performance increase, on ARM it usually doesn't work as intended.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFL4S8IMkyGM64RGpERAsQqAJ48FKOGVu0W2fWNjoj9nqabFo+dnwCeNqsa d7h1UrgBA+KqUsQziN40OYY=
=U5hG
-----END PGP SIGNATURE-----