Bug 151851 - net-p2p/ktorrent-2.0.3 fails to build on PPC
|
Bug#:
151851
|
Product: Gentoo Linux
|
Version: 2006.1
|
Platform: PPC
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: ppc@gentoo.org
|
Reported By: neil@digimed.co.uk
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: net-p2p/ktorrent-2.0.3 fails to build on PPC
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-10-18 10:32 0000
|
Updating ktorrent from 2.0.2 to 2.0.3 gives this error:
/bin/sh ../libtool --silent --tag=CXX --mode=compile
powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./.
-I/usr/kde/3.5/include -I/usr/qt/3/include -I. -I/usr/kde/3.5/include
-DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef
-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion
-Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG
-O2 -Os -pipe -mtune=G4 -mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing
-fomit-frame-pointer -Wformat-security -Wmissing-format-attribute
-fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE
-DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions
-c -o pluginmanagerwidget.lo pluginmanagerwidget.cpp
/bin/sh ../libtool --silent --tag=CXX --mode=link powerpc-unknown-linux-gnu-g++
-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -Os -pipe -mtune=G4
-mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing -fomit-frame-pointer
-Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new
-fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
-DQT_NO_TRANSLATION -fexceptions -Wl -z now -o libktorrent.la -rpath
/usr/lib -R /usr/kde/3.5/lib -R /usr/qt/3/lib -R /usr/lib -R /usr/kde/3.5/lib
-L/usr/lib -L/usr/qt/3/lib -L/usr/kde/3.5/lib -L/usr/kde/3.5/lib
pluginmanager.lo functions.lo expandablewidget.lo pluginmanagerprefpage.lo
pluginmanagerwidget.lo pluginmanagerprefpage.moc.lo
../libktorrent/net/libnet.la ../libktorrent/datachecker/libdatachecker.la
../libktorrent/mse/libmse.la ../libktorrent/migrate/libmigrate.la
../libktorrent/util/libutil.la ../libktorrent/torrent/libtorrent.la
../libktorrent/kademlia/libkademlia.la
../libktorrent/interfaces/libinterfaces.la -lkparts
powerpc-unknown-linux-gnu-g++: now: No such file or directory
make[3]: *** [libktorrent.la] Error 1
make[3]: Leaving directory
`/mnt/scratch/portage/net-p2p/ktorrent-2.0.3/work/ktorrent-2.0.3/libktorrent'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/mnt/scratch/portage/net-p2p/ktorrent-2.0.3/work/ktorrent-2.0.3/libktorrent'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/mnt/scratch/portage/net-p2p/ktorrent-2.0.3/work/ktorrent-2.0.3'
make: *** [all] Error 2
!!! ERROR: net-p2p/ktorrent-2.0.3 failed.
Call stack:
ebuild.sh, line 1568: Called dyn_compile
ebuild.sh, line 937: Called src_compile
ktorrent-2.0.3.ebuild, line 42: Called kde_src_compile
kde.eclass, line 171: Called kde_src_compile 'all'
kde.eclass, line 338: Called kde_src_compile 'myconf' 'configure' 'make'
kde.eclass, line 334: Called die
I have no such problems on amd64
Portage 2.1.2_pre3-r4 (default-linux/ppc/ppc32/2006.1/G4, gcc-4.1.1,
glibc-2.5-r0, 2.6.18-gentoo-r1 ppc)
=================================================================
System uname: 2.6.18-gentoo-r1 ppc 7447A, altivec supported
Gentoo Base System version 1.12.5
Last Sync: Wed, 18 Oct 2006 13:50:01 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python: 2.4.3-r4, 2.5-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: 2.4-r6
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.18.1
sys-devel/autoconf: 2.13, 2.60
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r1
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-Os -pipe -mtune=G4 -mcpu=G4 -maltivec -mabi=altivec
-fno-strict-aliasing -fomit-frame-pointer"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/init.d
/etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-Os -pipe -mtune=G4 -mcpu=G4 -maltivec -mabi=altivec
-fno-strict-aliasing -fomit-frame-pointer"
DISTDIR="/mnt/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer parallel-fetch
sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.digimed.co.uk/
http://pandemonium.tiscali.de/pub/gentoo/"
LANG="en_GB"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/mnt/portage/packages/krikkit"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/scratch"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/portage/local /mnt/portage/layman/sunrise"
SYNC="rsync://desiato/gentoo"
USE="ppc X alsa altivec audiofile berkdb bitmap-fonts bluetooth bzip2 cddb cdr
cli cracklib crypt cups curl dbus dlloader dri dv dvb dvb_cards_usb-wt220u dvd
elibc_glibc emboss encode exif ffmpeg firefox flac foomaticdb gdbm gif gimp
gphoto2 gpm gtk gtk2 hal ieee1394 imagemagick imlib input_devices_keyboard
input_devices_mouse isdnlog java jpeg jpeg2k kde kdeenablefinal
kdehiddenvisibility kernel_linux libg++ libwww linguas_en_GB mad mng mono mp3
mpeg musicbrainz mysql ncurses nptl nptlonly offensive ogg opengl pcre pdf png
ppds pppd python qt3 qt4 quicktime readline reflection scanner sdl session slp
speex spell spl ssl svg tcltk tcpd theora tiff truetype truetype-fonts
type1-fonts udev unicode usb userland_GNU userlocales v4l v4l2 vhosts
video_cards_radeon vorbis wifi xml xorg xscreensaver xv xvid zlib"
Unset: CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I've found the cause of this. PPC doesn't with with "-z now" in $LDFLAGS, which
the configure script sets.
I've altered the ebuild to remove this if ACCEPT_KEYWORDS contains ppc. This is
probably a horribly way of doing this; if there's an eclass function that
returns the arch, let me know and I'll do something cleaner.
Created an attachment (id=101809) [details]
Fix -z now
Yeah, that's ugly. :)
A better way is to use:
if use ppc; then
dowhatever
fi
Anyway, that said, a better solution for this would be to fix the -z now
invocation so it works on ppc as well as other arches.
The attached patch should work, is this okay with
Oops, submitted that one before I was ready. :p
Is the "Fix -z now" patch okay with you deathwing00?
I knew it was ugly, but couldn't find another way to test for keywords. I'd
forgotten that they appear in USE.
(In reply to comment #5)
> Oops, submitted that one before I was ready. :p
> Is the "Fix -z now" patch okay with you deathwing00?
Looks like my message didn't go through. The if use solution is the right one.
Please, proceed.
deathwing00:
I know if use ppc; is the proper construct. :) I was wondering if my patch
replacing -Wl -z now to -Wl,z,now was acceptable? This invocation works on ppc
where as the version with spaces does not.
To be honest, you don't need to use the -z flag at all. The stripping is done
already when you call install(). The fact is that the users should *not* set
that LDFLAG. About the syntax, the space is INCORRECT, so no, you should not do
the replacement.
Flameeyes: please, confirm.
-z flag is not -s (stripping).
"-Wl,-z now" is broken as "now" will be passed to the compiler rather than the
linker, "-Wl,-z,now" is correct. Why is it used anyway?
deathwing00:
I don't think you looked at my patch :p The incorrect: "-Wl -z now" is
*hardcoded* in the two files patched. The patch *corrects* this to
"-Wl,-z,-now" which is the correct invocation.
I do not know why they did this in the build, I only fixed the problem.
(In reply to comment #11)
> deathwing00:
> I don't think you looked at my patch :p The incorrect: "-Wl -z now" is
> *hardcoded* in the two files patched. The patch *corrects* this to
> "-Wl,-z,-now" which is the correct invocation.
> I do not know why they did this in the build, I only fixed the problem.
If the problem is that they supply it like that, go ahead and patch it already.
Why they did it? The fact is that it's not the first case (I found yet another
package around the tree with a similar problem). The reasons may vary: maybe
there is an important performance impact, linkage does not work as expected
otherwise or they are simply ricers. :)
Still, the comma separation is the correct one against the space separation, as
Flameeyes stated.
Sure thing. I just wanted to ask you first, that's all. INCVS.