Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127034 - kfish-2.01 works on amd64 (with an ebuild tweak)
Summary: kfish-2.01 works on amd64 (with an ebuild tweak)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-20 21:11 UTC by Ryan Grange
Modified: 2006-06-30 19:55 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Grange 2006-03-20 21:11:54 UTC
Please add ~amd64 to keywords and add the following to the .ebuild

IUSE="pic" 
src_unpack() {
	unpack ${A}
	use pic || use amd64 && append-flags -fPIC
}

Not sure if that needs to be ~amd64 following || as my edited testing version has just amd64.

emerge --info follows...

Portage 2.0.54 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Sempron(tm) Processor 3000+
Gentoo Base System version 1.6.14
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.seren.com/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net http://mirror.espri.arizona.edu/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo http://gentoo.cs.lewisu.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://mirror.phy.olemiss.edu/mirror/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirror.clarkson.edu/pub/distributions/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa arts audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 calendar cdparanoia cdr crypt ctype cups curl curlwrappers dba dbx dga dio directfb divx4linux dri dv dvb dvd dvdr dvdread eds emboss encode esd exif expat fam fbcon ffmpeg firefox flac flash flatfile foomaticdb fortran ftp gcj gd gdbm gif glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal idn imagemagick imap imlib java javascript jikes joystick jpeg kde kerberos ladcca lcms libcaca libwww lirc lm_sensors lua lzw lzw-tiff mad memlimit mhash mikmod ming mng mono mp3 mpeg mpeg4 mplayer ncurses nls nptl odbc ofx ogg openal opengl oss pam pcntl pcre pda pdflib perl php plotutils png portaudio posix ppds prelude python qt quicktime readline recode rtc ruby samba sdl simpexml slp sndfile soap sockets sox speex spell spl sqlite ssl svg tcltk tcpd theora tidy tiff tokenizer truetype truetype-fonts type1 type1-fonts udev unichrome unicode usb v4l vcd videos vorbis wddx wifi wmf xcomposite xine xml xml2 xmms xosd xpm xrandr xscreensaver xsl xv xvid xvmc zeroconf zlib video_cards_ati video_cards_radeon userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Ryan Grange 2006-04-01 20:51:47 UTC
I removed kfish from my system, edited the ebuild to only add ~amd64 support and reinstalled.  I removed the PIC from IUSE and from the append-flags so as to follow the one fix at a time method of bug fixing.

So I got my answer as to whether or not the use amd64 would work with an ~amd64 keyword.  Sorry if this is old hat to so many.  It's my first AMD64 conversion.  I thought I'd start with something easy.

My /usr/local/portage/kde-misc/kfish-2.01.ebuild now in its entirety...

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-misc/kfish/kfish-2.01.ebuild,v 1.2 2004/12/31 05:43:53 weeve Exp $

inherit kde
need-kde 3

DESCRIPTION="amusing panel applet animated with a fish, bubbles and extras"
SRC_URI="mirror://sourceforge/kfish/${P}.tar.bz2"
HOMEPAGE="http://sourceforge.net/projects/scofmb/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 x86 ppc ~sparc"
IUSE=""
src_unpack() {
        unpack ${A}
        use amd64 && append-flags -fPIC
}
Comment 2 Michael Weyershäuser 2006-06-25 17:09:30 UTC
From what I read at http://www.gentoo.org/proj/en/hardened/pic-internals.xml the supposed ebuild tweak is rather unacceptable. I don't have any knowledge of autotools, so I can't help to fix this, maybe somebody else is willing to jump in here?
Comment 3 Ryan Grange 2006-06-25 21:08:07 UTC
From http://www.gentoo.org/proj/en/hardened/pic-internals.xml ...

There is only one official method to add flags like "-fPIC" to ebuilds: using the flag-o-matic eclass and "append-flags". However, it is not a good idea to enable "-fPIC" in global CFLAGS or create ebuilds that automatically add the "-fPIC" flag independent of the situation and architecture it is applied.

I remembered reading something about -fPIC, but thought it was in the AMD64 project's pages.  Thank you for giving me the correct URL for fPIC related items.  Unfortunately, kfish insists on having -fPIC to build, at least on AMD64's.  AMD64 is apparently an architecture upon which -fPIC makes a lot of sense if I read the pic-internals page correctly.  (I admit I may be mistaken.)

The Gentoo page on fPIC says to use append-flags, so I don't see how my tweaks are unacceptable.  Anyone from the AMD or PIC projects want to jump in?
Comment 4 Simon Stelling (RETIRED) gentoo-dev 2006-06-26 04:12:13 UTC
objects that are linked with the -shared flag in the end (read: libs) must have -fPIC. executables, however, should not. 
Comment 5 Ryan Grange 2006-06-29 19:31:26 UTC
I guess at this point, I'll try to contact the author and ask them why kfish requires -fPIC. If they don't respond, is my only option to find and remove the -fPIC dependence in the code myself?
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2006-06-30 00:50:45 UTC
yes. besides, the ebuild has also wrong dependencies. I can't build it with USE=-arts here: 

checking for mcopidl... not found
configure: error: The important program mcopidl was not found!
Please check whether you installed aRts correctly.


!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/kfish-2.01/work/kfish-2.01/config.log

!!! ERROR: kde-misc/kfish-2.01 failed.
Call stack:
  ebuild.sh, line 1527:   Called dyn_compile
  ebuild.sh, line 930:   Called src_compile
  ebuild.sh, line 1239:   Called kde_src_compile
  kde.eclass, line 164:   Called kde_src_compile 'all'
  kde.eclass, line 306:   Called kde_src_compile 'myconf' 'configure' 'make'
  kde.eclass, line 288:   Called econf '--with-x' '--enable-mitshm' '--without-xinerama' '--with-qt-dir=/usr/qt/3' '--enable-mt' '--with-qt-libraries=/usr/qt/3/lib64' '--disable-dependency-tracking' '--enable-debug=full' '--with-debug' '--without-arts' '--enable-libsuffix=64' '--with-extra-includes=/usr/kde/3.4/include' '--with-extra-libs=/usr/kde/3.4/lib64'
  ebuild.sh, line 532:   Called die

!!! econf failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

Feel free to reopen this bug with an appropriate patch to the two issues, but until those are fixed I can't keyword this, even though it is a critical core-package ;)
Comment 7 Ryan Grange 2006-06-30 01:04:01 UTC
Well, here's hoping not all my AMD64 testing and attempted fixing end up as a polite "pound sand".  Should I bother submitting a version with the arts requirement or is that pointless since apparently -fPIC is to Gentoo what Shared Source is to the FSF?
Comment 8 Michael Weyershäuser 2006-06-30 05:29:24 UTC
Uh, you misunderstood one thing:
-fPIC is perfectly fine and necessary on shared libraries. It is however bad for executables. Since kfish builds both libraries and executables the Makefile needs to be changed so that libraries (and only they) are built with -fPIC. Once that is done (either by patch or by upstream) we will be happy to include kfish on amd64.
Comment 9 Ryan Grange 2006-06-30 19:52:19 UTC
Sorry about my shortness.  As you can see from the timestamp, it was a bit late in the evening and I wasn
Comment 10 Ryan Grange 2006-06-30 19:55:28 UTC
Sorry about my shortness.  As you can see from the timestamp, it was a bit late in the evening and I wasn't at my best. Unfortunately, I don't feel my C++ coding would be up to snuff to even make a stab at that kind of change. I'll see about contacting the upstream.  (Not sure if this is double posted. Firefox has a weird issue with textboxes and apostrophes that had me hitting submit by mistake a minute ago. Sorry if so.)