Bug 55238 - Moving to applying -fPIC Makefile patches unconditionally / Cleaning 64bit.eclass:64bit()
Bug#: 55238 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: gmsoft@gentoo.org Reported By: kugelfang@gentoo.org
Component: Ebuilds
URL: 
Summary: Moving to applying -fPIC Makefile patches unconditionally / Cleaning 64bit.eclass:64bit()
Keywords:  
Status Whiteboard: 
Opened: 2004-06-26 07:42 0000
Description:   Opened: 2004-06-26 07:42 0000
GMSoft and i talked about moving the 64bit.eclass:64bit() to return only "true"
on
64bit architectures. Currently, 64bit() returns true on all 64bit archs _and_
on hppa, as they depend on all those -fPIC Makefile patches, too. 

For that purpose I made a list of all occurences of 64bit and fPIC in the whole
tree; will attach it to this bug.

TODO: 

1) make sure there is no: "64bit && <fpic-patch>"; move to unconditional
epatch.
   Gentoo Policy sais to apply -fPIC to all shared libraries, regardless of
   ${ARCH}. In case the ebuild both produces executables and binaries, a patch
   to the ebuild's Makefile(s) is neccessary.
2) move "use [amd64, *64] && <some-64bit-patch" to either "64bit && epatch" in
   case the patch breaks 32bit archs or to an unconditional epatch.
3) remove hppa from 64bit().

------- Comment #1 From Danny van Dyk (RETIRED) 2004-06-26 07:43:35 0000 -------
Created an attachment (id=34193) [details]
List of 64bit

------- Comment #2 From Danny van Dyk (RETIRED) 2004-06-26 07:44:19 0000 -------
Created an attachment (id=34194) [details]
List of -fPIC

------- Comment #3 From Travis Tilley (RETIRED) 2004-07-09 08:06:36 0000 -------
...got a patch to make all those fPIC ones do (64-bit || use hppa)? also...
doesnt hppa have 64bit?

we can remove this if hppa doesnt mind and all these ebuilds use the above
syntax. i strongly agree that if a function is named 64-bit, it damn well
better be returning true only on 64bit archs...

------- Comment #4 From Guy Martin 2004-08-30 03:08:15 0000 -------
Created an attachment (id=38481) [details]
Updated list of ebuild which uses 64-bit.eclass

Ok, let's start by this list.

------- Comment #5 From Guy Martin 2004-08-30 03:39:58 0000 -------
Here is what was done :

##./sys-apps/shadow/shadow-4.0.4.1-r1.ebuild:inherit eutils libtool gnuconfig 64-bit flag-o-matic
#./app-text/chasen/chasen-2.3.3-r2.ebuild:inherit perl-module 64-bit flag-o-matic
##./dev-libs/DirectFB/DirectFB-0.9.20-r1.ebuild:inherit eutils 64-bit
#./dev-libs/gmetadom/gmetadom-0.2.1-r1.ebuild:inherit 64-bit flag-o-matic eutils
##./dev-libs/libaio/libaio-0.3.15.ebuild:inherit eutils 64-bit
##./media-gfx/sodipodi/sodipodi-0.34.ebuild:inherit gnome2 64-bit eutils
#./media-libs/libsamplerate/libsamplerate-0.1.1.ebuild:inherit 64-bit
##./media-libs/tse3/tse3-0.2.7.ebuild:inherit eutils 64-bit
##./media-sound/cheesetracker/cheesetracker-0.9.9.ebuild:inherit 64-bit eutils
##./media-video/dvdauthor/dvdauthor-0.6.10.ebuild:inherit eutils 64-bit
#./sys-libs/ncurses/ncurses-5.4-r4.ebuild:inherit eutils flag-o-matic 64-bit gnuconfig
##./x11-libs/libast/libast-0.5-r2.ebuild:inherit 64-bit eutils
#./x11-wm/waimea/waimea-0.5.0_pre040506.ebuild:inherit eutils 64-bit

# done
## unrelated to -fPIC or newer version does not have it


Now, 64-bit isn't used anymore for -fPIC. hppa will be removed from the 64-bit.eclass when I'll mark stable ncurses-5.4-r5 on hppa.

------- Comment #6 From solar 2004-08-30 04:28:06 0000 -------
# These two ebuilds are the only ones showing up for me that 
# are conditionally patched right now with the following commands.

wget -q -O - 'http://bugs.gentoo.org/attachment.cgi?id=4194' | grep -v filter-flags  | grep patch | grep '&&'

media-video/mjpegtools/mjpegtools-1.6.2-r1.ebuild:	[ "$ARCH" != x86 ] && epatch ${FILESDIR}/${P}-fPIC.patch

net-www/gplflash/gplflash-0.4.10-r3.ebuild:	use amd64 && epatch ${FILESDIR}/${P}-fPIC.patch

--------------------------------------------------------------------------------
# To help narrow your list of packages down I did.

wget -q -O - 'http://bugs.gentoo.org/attachment.cgi?id=34194'|grep -v filter-flags|grep patch|grep -v '#'|cut -d : -f 1|cut -d / -f 0-2|sort -u

# And I don't see anything on this bug that is directly related to 
# the toolchain@. Clue me in? Anything we need to change?
--------------------------------------------------------------------------------
# Kugelfang: Narrow down the official list of fPIC down a little please.
--------------------------------------------------------------------------------

------- Comment #7 From Guy Martin 2004-08-30 05:46:42 0000 -------
What about use arch && append-flags -fPIC ?
This should be unconditional too or better a patch to -fPIC only libs.

for this I used "find . -name \*.ebuild | xargs grep -B 3 -i fpic | less"
It's a bit longer but I found thoses ebuild which either conditionaly use append-flags -fPIC or apply conditionaly a fPIC patch.

sys-apps/filelight
sys-apps/pciutils
app-misc/krusader
app-sci/blas
app-sci/lapack
app-text/gpdf
dev-lang/perl
dev-lang/python
dev-libs/ffcall
dev-libs/nettle
dev-perl/PDL
dev-tcltk/tclx
dev-util/cvs
dev-util/kdevelop
mail-client/evolution
mail-client/mozilla-thunderbird
media-gfx/imagemagick
media-libs/flac
media-libs/gst-plugins
media-libs/clibpdf
media-libs/imlib2
media-libs/jbigkit
media-libs/libcdaudio
media-libs/libddmpeg
media-libs/libmatroska
media-libs/libmpeg2
media-libs/libmpeg3
media-libs/plib
media-plugins/live
media-video/ffmpeg
media-video/transcode
net-dialup/wvdial
net-dns/bind-tools
net-ftp/kbear
net-im/silc-toolkit
net-irc/bitchx
net-irc/ctrlproxy
net-libs/c-client
net-libs/openh323
net-mail/checkpassword
net-misc/hylafax
net-wireless/bluez-libs
net-www/gplflash
net-www/mozilla
net-www/mozilla-firefox
sys-devel/patch
sys-libs/libcap
x11-wm/fvwm


This doesn't contain ebuild which unconditionaly use append-flags -fPIC when a fPIC specific patch would be better.


I'll try to produce fPIC patch for the ebuild listed above or at least use fPIC unconditionally.

------- Comment #8 From Danny van Dyk (RETIRED) 2004-08-30 10:30:22 0000 -------
I worked a bit on Guy's list:

app-misc/krusader - -fPIC no longer necessary (Potential problem w/
  libtool/gnuconfig on amd64 which is now solved ?)

app-sci/blas - Will be removed from tree soon. Replacement is
  app-sci/blas-{atlas, reference}

app-sci/lapack - see above

dev-lang/perl - Guy: this doesn't seem to be necessary anymore !
  Can you test just w/o -fPIC on hppa ? See ChangeLog Entry for dcccflags.

dev-libs/ffcall - Already OK. Only library here, no executables

dev-util/kdevelop - fixed

media-gfx/imagemagick - No problems in the latest stable version(all arches).
  Old ebuild will be removed.

--

solar: I remove toolchain@g.o now. amd64, alpha and hppa can handle this. Still can't remember why i CC'ed you guys in the first place ! ;-)

------- Comment #9 From Guy Martin 2004-08-30 12:17:49 0000 -------
And of course, I started to work on thoses at the top of the list :)

I already commited theses :
sys-apps/filelight
sys-apps/pciutils
app-sci/blas

and was working on other in your "not todo" list.

I'll continue my work and notice you if I find a suspect ebuild :)

------- Comment #10 From Danny van Dyk (RETIRED) 2004-08-30 13:00:09 0000 -------
app-text/gpdf - kloeri tested and removed fPIC not necessary anymore

dev-lang/python - needs no -fPIC on amd64.

dev-libs/nettle - -fPIC no longer necessary (Potential problem w/
  libtool/gnuconfig on amd64 which is now solved ?)

dev-perl/PDL - fixed

dev-tcltk/tclx - -fPIC no longer necessary

mail-client/mozilla-thunderbird - works w/o append-flags -fPIC on amd64.

------- Comment #11 From Guy Martin 2004-08-31 04:47:42 0000 -------
x11-wm/fvwm needs checking for alpha it compiled without -fPIC on hppa.
sys-lib/libcap doesn't have -fPIC in the latest version
sys-devel/patch has a hardened/amd64 stuff which may need checking
net-wireless/bluez-libs needs checking on amd64. works on my hppa without -fPIC
net-irc/bitchx did a nice fPIC.patch

------- Comment #12 From Guy Martin 2004-08-31 09:58:32 0000 -------
dev-util/cvs I don't think it's still needed for alpha -> needs test
media-libs/flac newer version is already inconditionnal

------- Comment #13 From Guy Martin 2004-09-09 09:29:33 0000 -------
Little summary of what still need to be done.

Alpha and amd64, can you test thoses plz ?

Need amd64 checking :
sys-devel/patch
net-wireless/bluez-libs

Need alpha checking :
x11-wm/fvwm
dev-util/cvs

TODO :
mail-client/evolution
media-libs/gst-plugins
media-libs/clibpdf
media-libs/imlib2
media-libs/jbigkit
media-libs/libcdaudio
media-libs/libddmpeg
media-libs/libmatroska
media-libs/libmpeg2
media-libs/libmpeg3
media-libs/plib
media-plugins/live
media-video/ffmpeg
media-video/transcode
net-dialup/wvdial
net-dns/bind-tools
net-ftp/kbear
net-im/silc-toolkit
net-irc/ctrlproxy
net-libs/c-client
net-libs/openh323
net-mail/checkpassword
net-misc/hylafax
net-www/gplflash
net-www/mozilla
net-www/mozilla-firefox

------- Comment #14 From Danny van Dyk (RETIRED) 2004-09-13 04:16:17 0000 -------
The fPIC thing in sys-devel/patch was done to solve an amd64/hardened bug. I'll
ask lv if it is still necessary in 2.5.9.

As for bluez-libs: I introduced that -fPIC there myself for version 2.5 when
the
shared libs didn't get build with it. 2.10 builds object files for shared and
static libs now in separate directories. The sed-fPIC line has already been
removed.

------- Comment #15 From Guy Martin 2004-10-13 07:29:03 0000 -------
net-misc/hylafax is done. Btw latest version of if is already applying it
unconditionally.

------- Comment #16 From Bryan Østergaard (RETIRED) 2004-12-06 19:24:53 0000 -------
x11-wm/fvwm and dev-util/cvs is fixed on alpha.

------- Comment #17 From Simon Stelling (RETIRED) 2005-05-04 01:26:19 0000 -------
hppa moved out of 64bit(), the list is horribly messy and last activity was
half a year ago.. closing as fixed, i don't think we still need this bug. feel
free to reopen ;)

------- Comment #18 From SpanKY 2005-05-04 05:33:08 0000 -------
how about we close the bug when we remove the 64-bit.eclass

------- Comment #19 From SpanKY 2005-05-04 19:58:01 0000 -------
only rxvt-unicode (Bug 91511) and dev-lang/R (Bug 91512) use the 64-bit eclass
anymore

ive updated the 64-bit function to call 'die' if $PN != rxvt-unicode and $PV !=
R

------- Comment #20 From Simon Stelling (RETIRED) 2005-05-05 01:55:14 0000 -------
vapier: this bug never wanted to remove the 64bit.eclass. all we wanted is that
only 64bit arches get a 64bit() == true. it used to also return true on hppa,
because hppa relies on -fPIC patches too. this misbehaviour was corrected, so i
can't see a reason to close the bug.

------- Comment #21 From SpanKY 2005-05-05 05:48:41 0000 -------
well regardless, the 64bit eclass is an ugly hack which is plain wrong

only two packages are left which use it and once those are fixed i'll punt the eclass