Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34739 - x11-misc/electricsheep vs. hcc gives BREG
Summary: x11-misc/electricsheep vs. hcc gives BREG
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Daniel Black (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-29 21:40 UTC by Scott Taylor (RETIRED)
Modified: 2005-09-10 15:39 UTC (History)
2 users (show)

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


Attachments
Patches ebuild to fixup __PIC__ macro usage (electricsheep-pie.patch,534 bytes, patch)
2005-09-10 07:23 UTC, Kevin F. Quinn (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Taylor (RETIRED) gentoo-dev 2003-11-29 21:40:13 UTC
make[3]: Entering directory `/var/tmp/portage/electricsheep-2.4-r1/work/electricsheep-2.4/mpeg2dec/src'
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include    -march=athlon -O2  -c `test -f 'cpu_accel.c' || echo './'`cpu_accel.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include    -march=athlon -O2  -c `test -f 'mpeg2dec_onroot.c' || echo './'`mpeg2dec_onroot.c
cpu_accel.c: In function `arch_accel':
cpu_accel.c:78: error: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:84: error: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:92: error: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:96: error: can't find a register in class `BREG' while reloading `asm'
make[3]: *** [cpu_accel.o] Error 1


needs flag-o-matic added and filter-flags -fPIC
Comment 1 Alexander Gabert (RETIRED) gentoo-dev 2003-12-09 13:12:53 UTC
>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...                                                                                            [ ok ]
>>> x11-misc/electricsheep-2.4-r2 merged.
>>> Recording x11-misc/electricsheep in "world" favorites file...

>>> clean: No packages selected for removal.

>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...                                                                                            [ ok ]
>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


 * GNU info directory index is up-to-date.

22:07:23 [/usr/local/chroots/chroot001:5925.pty-s0.epoch] epoch ~ # hcc -l
 glibc: GNU C Library stable release version 2.3.2, by Roland McGrath et al.
 glibc: Compiled by GNU CC version 3.3.2 20031022 (Gentoo Linux 3.3.2-r3, propolice).
   gcc: gcc version 3.3.2 20031022 (Gentoo Linux 3.3.2-r3, propolice)
    ld: GNU ld version 2.14.90.0.7 20031029

config: hcc-3.3.2.0-x86  -  /etc/hcc.conf
*cpp:
%{posix:-D_POSIX_SOURCE} %{D__KERNEL__: %{nostartfiles|nodefaultlibs|nostdlib: %{!D__ASSEMBLY__: /root/ssp.c}}} %{!D__KERNEL__: %{!DIN_GCC: %{!static: %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: %{!yet_exec: %{!nopie: -D__PIC__ -D__pic__ -DPIC -Dpic}} } } } } } } } %{pthread:-D_REENTRANT}
--
*cc1:
%(cc1_cpu) %{!yno_propolice: %{!fno-stack-protector: %{!D__ASSEMBLY__: -fstack-protector -fstack-protector-all %{!D__KERNEL__: -fforce-addr}}}} %{!D__KERNEL__: %{!DIN_GCC: %{!static: %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: %{!yet_exec: %{!nopie: -fPIC -fpie}} } } } } } } } %{profile:-p}
--
*endfile:
%{static|yet_exec|D__KERNEL__|DIN_GCC: crtend.o%s} %{!static: %{!yet_exec: %{!D__KERNEL__: %{!DIN_GCC: crtendS.o%s}}}} crtn.o%s
--
*link:
%{!static:--eh-frame-hdr} -m elf_i386 %{shared:-shared} %{!shared: %{!ibcs: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} %{static:-static}}} %{!D__KERNEL__: %{!DIN_GCC: %{!static: %{!nostartfiles: %{!nodefaultlibs: %{!nostdlib: %{!nostdinc: %{!shared: %{!Bshareable: %{!i: %{!r: %{!yet_exec: %{!nopie: -pie -z combreloc}} } } } } } } } } } } }
--
*startfile:
%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile: %{static|yet_exec|D__KERNEL__|DIN_GCC: crt1.o%s} %{!static: %{!yet_exec: %{!D__KERNEL__: %{!DIN_GCC: crt1S.o%s}}}} }}}} crti.o%s %{static:crtbeginT.o%s} %{!static: %{yet_exec|D__KERNEL__|DIN_GCC: crtbegin.o%s} %{!yet_exec: %{!D__KERNEL__: %{!DIN_GCC: crtbeginS.o%s}}} }


works here,

Alex
Comment 2 Zaid A. 2005-08-20 18:34:08 UTC
Hi, I thought this is a good place for the problem I'm having instead of opening
a new bugreport, if I'm wrong, I apologize.

I am having a similar problem with electricsheep-2.6.3, I'm running a hardened
profile and this is where it fails:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../inc
                                                                               
   lude    -march=pentium4 -pipe -O3 -fomit-frame-pointer -march=pentiumpro
-Wall -                                                                        
           Werror -c mpeg2dec_onroot.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../inc
                                                                               
   lude    -march=pentium4 -pipe -O3 -fomit-frame-pointer -march=pentiumpro
-Wall -                                                                        
           Werror -c getopt.c
cpu_accel.c: In function `arch_accel':
cpu_accel.c:78: error: can't find a register in class `BREG' while reloading `as
                                                                               
   m'
cpu_accel.c:84: error: can't find a register in class `BREG' while reloading `as
                                                                               
   m'
cpu_accel.c:92: error: can't find a register in class `BREG' while reloading `as
                                                                               
   m'
cpu_accel.c:96: error: can't find a register in class `BREG' while reloading `as
                                                                               
   m'
make[3]: *** [cpu_accel.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/electricsheep-2.6.3/work/electricsh
                                                                               
   eep-2.6.3/mpeg2dec/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/electricsheep-2.6.3/work/electricsh
                                                                               
   eep-2.6.3/mpeg2dec'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/electricsheep-2.6.3/work/electricsh
                                                                               
   eep-2.6.3'
make: *** [all] Error 2

!!! ERROR: x11-misc/electricsheep-2.6.3 failed.
!!! Function src_compile, Line 556, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.

and this is my emerge info:
Portage 2.0.51.22-r2 (hardened/x86/2.6, gcc-3.3.5-20050130, glibc-2.3.5-r1,
2.6.11-hardened-r15 i686)
=================================================================
System uname: 2.6.11-hardened-r15 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /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=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="/ X a52 aac/ acl alsa apache2 avi bash-completion berkdb cdr crypt cups
curl dlloader dts dvd dvdr encode ffmpeg flac gd gdbm gif gpm gtk gtk2 hardened
imagemagick imlib java jpeg libwww lzo mad mailwrapper matroska mikmod mmx motif
mozilla mp3 mpeg ncurses network nls nptl nvidia ogg opengl oss pam perl pic png
postgres python quicktime readline rtc scanner sdl slang spell sse sse2 ssl svg
svga tcpd tetex tiff truetype usb userlocales vorbis win32codecs x86 xine xml
xml2 xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2005-08-23 00:55:26 UTC
Re-opening.  Looks like it'll need some asm patching.  Also I notice the build
is overriding the user CFLAGS options, forcing -O3 instead of -O2, so perhaps we
should fix that as well.
Comment 4 Zaid A. 2005-09-09 15:46:48 UTC
I got it to compile and install by switching the gcc profile to hardenednopie.
I tried the latest electricsheep ebuild 2.6.3-r1 and the problem still persists
there.
Let me know if you need any further information.

Zaid
Comment 5 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-10 07:20:20 UTC
To fix, change the ifndef PIC to ifndef __PIC__ in cpu_accel.c.
ebuild patch to follow.
Comment 6 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-10 07:23:19 UTC
Created attachment 68109 [details, diff]
Patches ebuild to fixup __PIC__ macro usage

Adds a simple in-place sed to the unpack phase to choose PIC code when
__PIC__ is defined, which is automatic by the compiler, rather than
PIC which is a libtool creation.
Comment 7 Zaid A. 2005-09-10 12:50:18 UTC
Hi Kevin,
I just tested the patch and it works great.
Thanks.

Zaid
Comment 8 Daniel Black (RETIRED) gentoo-dev 2005-09-10 15:39:44 UTC
thanks Kevin