Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73383 - sys-apps/memtest86+-1.40 doesn't compile
Summary: sys-apps/memtest86+-1.40 doesn't compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-04 13:41 UTC by Prakash Punnoor
Modified: 2005-01-24 04:37 UTC (History)
3 users (show)

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


Attachments
patch enabling -fno-stack-protector and -fno-pic for memtest86+ (memtest86+-1.50-hardened.patch,651 bytes, patch)
2005-01-23 05:59 UTC, Aurélien Francillon
Details | Diff
makes the ebuid use the patch for ssp/pic (memtest86+-1.50-ebuild.patch,670 bytes, patch)
2005-01-23 06:02 UTC, Aurélien Francillon
Details | Diff
memtest86+-1.50-hardened.patch (memtest86+-1.50-hardened.patch,802 bytes, patch)
2005-01-23 07:25 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Prakash Punnoor 2004-12-04 13:41:44 UTC
gcc -c -Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC init.c
test.c: In function `modtst':
test.c:975: error: can't find a register in class `BREG' while reloading `asm'
make: *** [test.o] Error 1
make: *** Waiting for unfinished jobs....


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




Portage 2.0.51-r8 (gcc34-x86-2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.10-rc3-ck1 i686)
=================================================================
System uname: 2.6.10-rc3-ck1 i686 AMD Athlon(tm)
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov 29 2004, 12:17:47)]
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r2, 1.9.3, 1.5, 1.6.3, 1.7.9, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -frename-registers
-fomit-frame-pointer -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /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=athlon-xp -mtune=athlon-xp -O2 -pipe -frename-registers
-fomit-frame-pointer -fprefetch-loop-arrays -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs candy ccache digest distlocks prelink sandbox"
GENTOO_MIRRORS=" ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/bmg-main /usr/lportage"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage/"
USE="3dnow 3dnowex S3TC X Xaw3d aac acpi acpi4linux alsa apm audiofile avi
berkdb bitmap-fonts cddb cdparanoia cdr crypt cups curl dga divx4linux dts dv
dvb dvd dvdr dvdread edl encode ext-png ext-zlib faac faad ffmpeg fftw flac
foomaticdb freetype gdbm gif gimp gimpprint gnome gphoto2 gpm gs gstreamer gtk
gtk2 gtkhtml hal ieee1394 imlib ithreads java javascript jpeg jpeg2k kde ldap
libg++ libwww live lm_sensors lzo mad matroska mikmodmmx mmx2 monkey motif
moznocompose mpeg mpi nas ncurses network nls no_wxgtk1 nocd nptl nvidia
oggvorbis openal opengl openssh oss pam pdflib perl pic png povray ppds python
qt qtmt quicktime readline real rtc samba scanner sdl slang smime speex spell
sqlite sse ssl tcpd tetex theora threads tiff transcode truetype usb videos wmf
wxwindows x86 xfs xine xinetd xml xml2 xmms xprint xv xvid xvmc yv12 zlib
linguas_de"
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2004-12-05 11:33:02 UTC
I was able to reproduce that bug on my system for a while. It turned out it was realated to #68799. Please update gcc-config and make sure that you are using the i686-pc-linux-gnu-3.4.3 gcc profile. Then do `unset GCC_SPECS` just to be sure, and try emerging memtest86+ again.
Comment 2 Prakash Punnoor 2004-12-05 14:02:41 UTC
To my big disbelief: It worked...
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2004-12-06 06:21:49 UTC
In that case, I consider this bug to be fixed by the new gcc-config release. 
Comment 4 César Fernández 2005-01-09 09:55:56 UTC
Doesn't work for me.

** gcc-config -c = i686-pc-linux-gnu-3.4.3

** Error:

gcc -c -Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC init.c
test.c: In function `modtst':
test.c:975: error: can't find a register in class `BREG' while reloading `asm'
make: *** [test.o] Error 1

** Emerge info::

Portage 2.0.51-r8 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-nitro2 i686)
=================================================================
System uname: 2.6.10-nitro2 i686 AMD Athlon(TM) XP 2500+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Dec 27 2004, 21:33:48)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.8.5-r2, 1.6.3, 1.9.3, 1.5, 1.7.9
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r2
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS=""
MAKEOPTS="-j2"
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="x86 16bit 3dnow 3dnowex S3TC X aac aalib acl acpi alsa avi berkdb bidi bzip2 cdparanoia cdr chroot cjk crypt cups dvd dvdr dvdread edl faac faad fam fbcon flac font-server foomaticdb foreign-sysvinit fortran gd gdbm gif gimpprint gphoto2 gpm graphviz gstreamer gtk gtk2 hardenedimagemagick imap imlib imlib2 ipv6 ithreads jabber java javascript jbig jce jikes jpeg jpeg2k justify kde lcms libcaca libwww live lzo lzw-tiff mad matroska mikmod mmap mmx mmx2 mng monkey mozilla moznoirc mozsvg mpeg mpeg4 mpi mplayer msn ncurses network nls no-old-linux no_wxgtk1 nomac nomalloccheck nptl nptlonly nvidia oggvorbis opengl pam pdflib perl pic png ppds python qt readline real rtc sasl snmp speex spell sse ssl stencil-buffer svg tcltk tcpd tga theora threads tiff truetype truetype-fonts unicode usb userlocales vim-with-x wmf xml xml2 xmms xprint xrandr xscreensaver xv xvid xvmc zlib"

Comment 5 César Fernández 2005-01-22 17:49:37 UTC
Again the same error as before with memtest86+ v1.50, same config.

I've no problems with memtest86-3.2. Maybe the + version needs the same patches used in the original version.
Comment 6 Aurélien Francillon 2005-01-23 05:55:10 UTC
I have the same problem here using a  hardened gentoo 
the flags -fstack-protecor -fPIC  must be filtred for pepole having it in their CFLAGS and 
for hardened gcc -fno-stack-protector and -fno-pic must be added.
This is really the same problem than on bug #66630
I'm joining a patch, really simmilar to the one from solar for memtest
i think this bug should be reopend ...
Comment 7 Aurélien Francillon 2005-01-23 05:59:41 UTC
Created attachment 49276 [details, diff]
patch enabling -fno-stack-protector and -fno-pic for memtest86+

against memtest86+-1.50
Comment 8 Aurélien Francillon 2005-01-23 06:02:43 UTC
Created attachment 49277 [details, diff]
makes the ebuid use the patch for ssp/pic

i dont know if "test_flag -fno-stack-protector && epatch ... " is needed as it
is  done in the ebuild of memtest86-3.2
Comment 9 solar (RETIRED) gentoo-dev 2005-01-23 07:03:48 UTC
Bug is still present. Patches need to be added. But they also have to be reworked for 1.50. I'll hack on it and post here.
Comment 10 solar (RETIRED) gentoo-dev 2005-01-23 07:25:41 UTC
Created attachment 49285 [details, diff]
memtest86+-1.50-hardened.patch

fstack has to be filtered on reloc.c also.
have fun fighting the dos format of the orig Makefile while trying to patch.
Comment 11 solar (RETIRED) gentoo-dev 2005-01-23 15:06:30 UTC
Spock,
I you do not wish to make the changes yourself then feel free to reassign the bug to hardened@
Comment 12 solar (RETIRED) gentoo-dev 2005-01-23 15:07:03 UTC
If you ^^
Comment 13 Michal Januszewski (RETIRED) gentoo-dev 2005-01-24 02:39:26 UTC
Patch added to CVS. Thanks for your help :)
Comment 14 César Fernández 2005-01-24 04:37:50 UTC
WFM, thanks.