Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72665 - unable to compile gcc-3.3.5 since pie patches are applied out of order
Summary: unable to compile gcc-3.3.5 since pie patches are applied out of order
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 72890 74095 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-27 11:55 UTC by Sandro Bonazzola (RETIRED)
Modified: 2005-10-12 14:10 UTC (History)
7 users (show)

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


Attachments
output of patch command (00_all_gcc-3.3.5-sparc-pic.patch.bz2-12540.out,4.91 KB, text/plain)
2004-11-28 00:52 UTC, Jean Bréfort
Details
output log from 'emerge =sys-devel/gcc-3.3.5' (log.txt,3.18 KB, text/plain)
2004-11-30 12:39 UTC, Sandro Bonazzola (RETIRED)
Details
output from patch, as required by emerge on failure (00_all_gcc-3.3.5-sparc-pic.patch.bz2-3968.out,4.90 KB, text/plain)
2004-11-30 12:40 UTC, Sandro Bonazzola (RETIRED)
Details
renumbered piepatches to apply correctly (gcc-3.3.5-piepatches-v8.7.7.1.tar.bz2,25.36 KB, patch)
2004-12-05 03:57 UTC, Peter S. Mazinger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sandro Bonazzola (RETIRED) gentoo-dev 2004-11-27 11:55:28 UTC
It's impossible to emerge gcc-3.3.5. No files can be patched by the above patch file. It doesn't depend by the compiler, I've the same result on a pentium3 with gcc-3.4.3 and on a pentium-mmx with gcc-3.3.4.

Reproducible: Always
Steps to Reproduce:
1. emerge gcc 
2.
3.

Actual Results:  
patch failure.

Expected Results:  
gcc emerged.
Comment 1 Jean Bréfort 2004-11-28 00:52:26 UTC
Created attachment 44853 [details]
output of patch command

I have the same problem. Attached
/var/tmp/portage/gcc-3.3.5/temp/00_all_gcc-3.3.5-sparc-pic.patch.bz2-12540.out
Comment 2 Guillaume Castagnino 2004-11-28 02:16:08 UTC
Same probleme

Adding :
PIEPATCH_EXCLUDE="upstream/00_all_gcc-3.3.5-sparc-pic.patch.bz2"
To the ebuild solves the problem
Comment 3 SpanKY gentoo-dev 2004-11-29 19:18:18 UTC
you guys neglected to provide `emerge info` like the bug report page says to ... we cant guess :P

gcc-3.3.5 works fine for me on arm/hppa/x86
Comment 4 Benjamin Braatz 2004-11-30 00:44:13 UTC
Got the same problem.
I also think Bug 72890 is a duplicate of this one.
It has "emerge info".

FWIW here's mine:
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.8-gentoo-r10 i686)
=================================================================
System uname: 2.6.8-gentoo-r10 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.6
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache distlocks fixpackages sandbox severe sfperms strict userpriv"
GENTOO_MIRRORS="http://mirror.uni-c.dk/gentoo/ http://www.gigaload.org/gentoo.org/ ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/manual"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X Xaw3d aalib alsa apm avi berkdb bitmap-fonts cdr crypt doc dvd encode esd fam flac fortran gdbm gif gnome gstreamer gtk gtk2 gtkhtml hal imagemagick imlib java jpeg junit libg++ libwww mad mikmod mmx mono mpeg ncurses nls nptl oggvorbis opengl pam pdflib perl png python quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype wmf x86 xml2 xmms xprint xv zlib"

My /var/tmp/portage/gcc-3.3.5/temp/00_all_gcc-3.3.5-sparc-pic.patch.bz2-14800.out also says:
|--- gcc-3.3.5/gcc/config/sparc/linux.h.upstream~       Thu Nov 18 23:11:39 2004
|+++ gcc-3.3.5/gcc/config/sparc/linux.h Thu Nov 18 23:32:55 2004
--------------------------
No file to patch.  Skipping patch.

Which seems logical since:
sean@lois ~ $ su -c "ls /var/tmp/portage/gcc-3.3.5/work/gcc-3.3.5/gcc/config/sparc/linux*"
/var/tmp/portage/gcc-3.3.5/work/gcc-3.3.5/gcc/config/sparc/linux64.h     /var/tmp/portage/gcc-3.3.5/work/gcc-3.3.5/gcc/config/sparc/linux.h
/var/tmp/portage/gcc-3.3.5/work/gcc-3.3.5/gcc/config/sparc/linux-aout.h

There is no "linux.h.upstream~". Don't know how that could work for you. :/
Comment 5 SpanKY gentoo-dev 2004-11-30 06:52:57 UTC
*** Bug 72890 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2004-11-30 06:54:27 UTC
patch doesnt use the '--- ' filename, it uses the '+++ ' filename

it could have been
--- some/wanker
+++ linux.h

and it'd patch linux.h just fine
Comment 7 Sandro Bonazzola (RETIRED) gentoo-dev 2004-11-30 12:07:34 UTC
> you guys neglected to provide `emerge info` like the bug report page says to .. > we cant guess :P
>
>gcc-3.3.5 works fine for me on arm/hppa/x86

Well... Here my two emerge --info:
Olivetti Xana MT-200 X: (note that I've just upgraded to gcc-3.3.5 modifyng the ebuild with the above "patch"
Gentoo Base System version 1.6.6
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r0, 2.6.9 i586)
=================================================================
System uname: 2.6.9 i586 Pentium MMX
distcc 2.18.2 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r6,sys-devel/autoconf-2.13
Automake: sys-devel/automake-1.8.5-r2,sys-devel/automake-1.5,sys-devel/automake-1.4_p6,sys-devel/automake-1.6.3,sys-devel/automake-1.7.9,sys-devel/automake-1.9.3
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS=" -march=pentium-mmx -O2 -pipe "
CHOST="i586-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=" -march=pentium-mmx -O2 -pipe "
DISTDIR="/home/ftp/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks nodoc sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/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="X acl alsa apm avi bitmap-fonts crypt cups dga directfb encode esd esound fbcon flac foomaticdb ggi gif gpm jpeg libg++ libwww mad mmx mpeg mysql ncurses no-old-linux nptl nptlonly oggvorbis pam perl pic png python readline sdl spell ssl svga tcpd tiff truetype x86 xml2 xv zlib linguas_it"


Toshiba Satellite 1800-100 (idem)
Gentoo Base System version 1.6.6
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r0, 2.6.9 i686)
=================================================================
System uname: 2.6.9 i686 Celeron (Coppermine)
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r6
Automake: sys-devel/automake-1.8.5-r2,sys-devel/automake-1.9.3
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS=" -march=pentium3 -O2 -pipe "
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=" -march=pentium3 -O2 -pipe "
DISTDIR="/home/ftp/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo ftp://ftp.solnet.ch/mirror/Gentoo http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi acpi4linux alsa apache2 arts audiofile avi berkdb bitmap-fonts bzlib caps cdparanoia chroot clamav crypt cups curl dba dedicated dio divx4linux encode erandom faac faad fam fbcon ffmpeg flac foomaticdb gd gdbm ggi gif gimpprint gmp gnokii gphoto2 gpm graphviz gtk gtk2 iconv imagemagick imlib imlib2 innodb irda java javascript jbig jpeg jpeg2k junit justify jython kde lcms ldap libclamav libg++ libwww lzo mad mbox md5sum mikmod mime mmap mmx mng motif mozcalendar mozdevelop mozilla moznoirc mozsvg mpeg mysql ncurses nls no-old-linux no_wxgtk1 nomac nptl nptlonly oav objc odbc offensive oggvorbis opengl pam pdflib perl php pic png pnp posix ppds pwdb python qt quicktime readline real rhino rtc samba sasl scanner sdl shared sharedmem slang sms softquota spell spl sse ssl svg svga tcltk tcpd tetex theora tidy tiff timidity truetype trusted unicode usb userlocales vda wmf wsconvert x86 xine xml xml2 xmms xprint xsl xv xvid zlib linguas_it"
Comment 8 Sandro Bonazzola (RETIRED) gentoo-dev 2004-11-30 12:39:24 UTC
Created attachment 45016 [details]
output log from 'emerge  =sys-devel/gcc-3.3.5'
Comment 9 Sandro Bonazzola (RETIRED) gentoo-dev 2004-11-30 12:40:23 UTC
Created attachment 45017 [details]
output from patch, as required by emerge on failure
Comment 10 SpanKY gentoo-dev 2004-11-30 14:59:02 UTC
hmm, 00_all_gcc-3.3-pie-3.patch.bz2 isnt being applied on your machine

over here i have:
 * Applying various patches (bugfixes/updates) ...
 *   00_all_gcc-3.3-pie-3.patch.bz2 ...                                   [ ok ]
 *   00_all_gcc-3.3.5-rs6000-pic.patch.bz2 ...                            [ ok ]
 *   00_all_gcc-3.3.5-sparc-pic.patch.bz2 ...                             [ ok ]

but you have:
 * Applying various patches (bugfixes/updates) ...
 *   00_all_gcc-3.3.5-rs6000-pic.patch.bz2 ...                            [ ok ]
 *   00_all_gcc-3.3.5-sparc-pic.patch.bz2 ...
 * Failed Patch: 00_all_gcc-3.3.5-sparc-pic.patch.bz2!
Comment 11 Jean Bréfort 2004-11-30 23:56:27 UTC
I found what is wrong!

linux.h contains (lines 107 and 111):
"%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \

but in the pacth:
-"%{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \

And line numbers do not conincide. The same thing is true for linux64.h

It seems that the patch was not against the correc version of these files.
Comment 12 Jean Bréfort 2004-12-01 00:24:20 UTC
Oops, sorry for mast last comment, I didn't read comment #10. That's what happens, 00_all_gcc-3.3-pie-3.patch.bz2 is not applied first.
ls upstream gives on my machine:

00_all_gcc-3.3.5-rs6000-pic.patch
00_all_gcc-3.3.5-sparc-pic.patch
00_all_gcc-3.3-pie-3.patch
00_all_gcc-4.0-cvs-for-3.3.5-pic.patch
Comment 13 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-01 11:48:50 UTC
looks like the patch order is incorrect.
Comment 14 SpanKY gentoo-dev 2004-12-02 19:06:14 UTC
hrm, what version of coreutils do you guys have ?
Comment 15 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-02 23:25:50 UTC
sys-apps/coreutils-5.2.1-r2
a full ~x86 system here
Comment 16 Jean Bréfort 2004-12-02 23:26:55 UTC
coreutils is 5.2.1-r2.
I could compile gcc-3.3.5 after renaming 00_all_gcc-3.3-pie-3.patch.bz2 so that it comes first (and ebuild digest).
Comment 17 SpanKY gentoo-dev 2004-12-03 20:57:04 UTC
psm: think you could roll some new pie patch tarballs but this time number them (instead of just 00_*) so these errors wont happen ?
Comment 18 SpanKY gentoo-dev 2004-12-04 09:16:42 UTC
do you guys set LANG/LOCALE in your env ?  could you try unsetting it and see if it patches ?
Comment 19 Jean Bréfort 2004-12-04 09:22:41 UTC
If I unset LC_ALL, things work.
Comment 20 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-04 09:51:52 UTC
I have had more than only this problem with custom lang settings in portage. Is it possible to set LANG=C and LC_ALL=C only for portage?
Specifying it in /etc/make.conf does not work.
Comment 21 SpanKY gentoo-dev 2004-12-05 00:26:12 UTC
well the lesson here is that we should use #'s for sorting, not the alphabet :)

could you guys try this ?

edit /usr/portage/eclass/toolchain.eclass
find the do_gcc_PIE_patches() function
add this to the top of the function: local my_lang=${LANG} ; unset LANG
add this to just after the three calls to epatch: [[ -n ${my_lang} ]] && export LANG=${my_lang}
Comment 22 Jean Bréfort 2004-12-05 00:58:33 UTC
Does not work, but with the two lines:

local my_lang=${LC_ALL} ; export LC_ALL="C"
...
[[ -n ${my_lang} ]] && export LC_ALL=${my_lang}

it works!
Comment 23 Peter S. Mazinger 2004-12-05 03:57:36 UTC
Created attachment 45315 [details, diff]
renumbered piepatches to apply correctly

upstream/00* is the official pie patch used for 3.3 series
upstream/0[1-9]* are pic patches accepted for gcc cvs
upstream/1* are pic backports from gcc-3.4
upstream/[3-5]* are pie patches sent upstream, not applied to cvs
upstream/61* is a special case for arm (this was called earlier 04_* and is
referenced
in ebuilds (commented currently), because it depends on gcc-uclibc patches
Comment 24 Sandro Bonazzola (RETIRED) gentoo-dev 2004-12-06 13:40:42 UTC
Unsetting LANG and LOCALE solve the problem for me.
The new numeration seems work fine.
This bug is close and resolved for me :-)
Comment 25 SpanKY gentoo-dev 2004-12-12 00:58:41 UTC
*** Bug 74095 has been marked as a duplicate of this bug. ***
Comment 26 Andrew Gaydenko 2005-01-03 11:53:15 UTC
Quote: "Unsetting LANG and LOCALE solve the problem for me"

If I understand well, 'unset LANG; unset LOCALE; emerge gcc' must be OK.
You see, new gcc is very important step :-)

Are there any possible side-effects of such emerging? 
Comment 27 Sandro Bonazzola (RETIRED) gentoo-dev 2005-01-05 11:44:38 UTC
quote from Andrew Gaydenko  2005-01-03 11:53 PST
> If I understand well, 'unset LANG; unset LOCALE; emerge gcc' must be OK.
> You see, new gcc is very important step :-)

Yes, you understand well :-)
I haven't seen any side effects by unesetting LANG and LOCALE.
Well... remember to re-export them after the emerge if you want to use your locale in the same shell :-)
Comment 28 Andrew Gaydenko 2005-01-05 11:53:16 UTC
After the mentioned unsettings I have got the same error :-(
Comment 29 SpanKY gentoo-dev 2005-01-06 17:45:19 UTC
fixed in cvs, sorry for the delay
Comment 30 Andrew Gaydenko 2005-01-07 05:12:35 UTC
Thanks - it works for me!
Comment 31 Sandro Bonazzola (RETIRED) gentoo-dev 2005-10-12 14:10:54 UTC
Closing.