View previous topic :: View next topic |
Author |
Message |
Spiros Apprentice
Joined: 11 Mar 2008 Posts: 189 Location: Zurich
|
Posted: Sun Jun 28, 2009 10:17 pm Post subject: [SOLVED] sys-devel/dev86 doesn't compile |
|
|
I need dev86 to compile VirtualBox. The version I tried to emerge is the stable one (0.16.17-r5). The error I become is:
Code: |
make[3]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/ld'
cp -p ld/objdump86 bin/objdump86
test -f bin/ncc
make -C libc CC=ncc "CCFLAGS=-O" AR=ar86 ARFLAGS=r PLATFORM=i86-ELKS
make[3]: Entering directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc'
ncc -c -Mn -O -D__LIBC__ -D__LIBC_VER__='"0.16.17"' -o crt0.o crt0.c
*** buffer overflow detected ***: ncc terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x2b77fe010567]
/lib/libc.so.6[0x2b77fe00e370]
/lib/libc.so.6[0x2b77fe00ea5b]
ncc[0x401548]
ncc[0x403347]
/lib/libc.so.6(__libc_start_main+0xe6)[0x2b77fdf4b486]
ncc[0x400db9]
======= Memory map: ========
00400000-00405000 r-xp 00000000 08:05 363917 /var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/bin/ncc
00604000-00605000 r--p 00004000 08:05 363917 /var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/bin/ncc
00605000-00606000 rw-p 00005000 08:05 363917 /var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/bin/ncc
0135a000-0137b000 rw-p 0135a000 00:00 0 [heap]
2b77fdb00000-2b77fdb1c000 r-xp 00000000 08:05 277578 /lib64/ld-2.8.so
2b77fdb1c000-2b77fdb1e000 rw-p 2b77fdb1c000 00:00 0
2b77fdd1b000-2b77fdd1c000 r--p 0001b000 08:05 277578 /lib64/ld-2.8.so
2b77fdd1c000-2b77fdd1d000 rw-p 0001c000 08:05 277578 /lib64/ld-2.8.so
2b77fdd1d000-2b77fdd29000 r-xp 00000000 08:05 12281 /usr/lib64/libsandbox.so
2b77fdd29000-2b77fdf29000 ---p 0000c000 08:05 12281 /usr/lib64/libsandbox.so
2b77fdf29000-2b77fdf2a000 r--p 0000c000 08:05 12281 /usr/lib64/libsandbox.so
2b77fdf2a000-2b77fdf2b000 rw-p 0000d000 08:05 12281 /usr/lib64/libsandbox.so
2b77fdf2b000-2b77fdf2d000 rw-p 2b77fdf2b000 00:00 0
2b77fdf2d000-2b77fe076000 r-xp 00000000 08:05 277605 /lib64/libc-2.8.so
2b77fe076000-2b77fe276000 ---p 00149000 08:05 277605 /lib64/libc-2.8.so
2b77fe276000-2b77fe27a000 r--p 00149000 08:05 277605 /lib64/libc-2.8.so
2b77fe27a000-2b77fe27b000 rw-p 0014d000 08:05 277605 /lib64/libc-2.8.so
2b77fe27b000-2b77fe280000 rw-p 2b77fe27b000 00:00 0
2b77fe280000-2b77fe282000 r-xp 00000000 08:05 277587 /lib64/libdl-2.8.so
2b77fe282000-2b77fe482000 ---p 00002000 08:05 277587 /lib64/libdl-2.8.so
2b77fe482000-2b77fe483000 r--p 00002000 08:05 277587 /lib64/libdl-2.8.so
2b77fe483000-2b77fe484000 rw-p 00003000 08:05 277587 /lib64/libdl-2.8.so
2b77fe484000-2b77fe486000 rw-p 2b77fe484000 00:00 0
2b77fe486000-2b77fe49c000 r-xp 00000000 08:05 272682 /lib64/libgcc_s.so.1
2b77fe49c000-2b77fe69b000 ---p 00016000 08:05 272682 /lib64/libgcc_s.so.1
2b77fe69b000-2b77fe69c000 r--p 00015000 08:05 272682 /lib64/libgcc_s.so.1
2b77fe69c000-2b77fe69d000 rw-p 00016000 08:05 272682 /lib64/libgcc_s.so.1
7fffacf92000-7fffacfa9000 rw-p 7ffffffe8000 00:00 0 [stack]
7fffacffc000-7fffacffd000 r-xp 7fffacffc000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
make[3]: *** [crt0.o] Aborted
make[3]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17/libc'
make[2]: *** [library] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/dev86-0.16.17-r5/work/dev86-0.16.17'
make: *** [all] Error 2
*
* ERROR: sys-devel/dev86-0.16.17-r5 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 2239: Called die
* The specific snippet of code:
* emake -j1 DIST="${D}" || die;
* The die message:
* (no error message)
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/dev86-0.16.17-r5/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/dev86-0.16.17-r5/temp/environment'.
|
My system's informations:
Code: |
spiros ~ $ emerge --info
Portage 2.2_rc33 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-gentoo-1.12.11.1
Timestamp of tree: Fri, 26 Jun 2009 17:00:01 +0000
app-shells/bash: 3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python: 2.4.4-r13, 2.5.4-r2, 2.6.2-r1
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake: 2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.13, 2.63
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/ /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="it_CH.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="it"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 bash-completion berkdb bittorrent branding bzip2 cairo cdr chm cli consolekit cracklib crypt cups dbus dhcpcd djvu dri dvd dvdr dvdread eds eigen emboss encode esd evo fam ffmpeg fftw firefox flac fortran gdbm gif gkt google-gadgets gpm gstreamer gtk hal iconv isdnlog java jpeg kde lapack laptop latex ldap libnotify lm_sensors mad midi mikmod mmx mng mozilla mp3 mp4 mpeg msn mudflap multilib mysql ncurses network networkmanager nls npp nptl nptlonly octave offensive ogg opengl openmp pam pcre pdf perl phonon plasma plotutils png policykit ppds pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection rss sdl semantic-desktop sensord session sound spell spl sse sse2 ssh ssl startup-notification svg sysfs tcpd templates theora tiff truetype unicode upnp usb vim-pager vim-syntax vorbis webkit xcomposite xinerama xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
|
Any help?
Thank you. _________________ Spiros
Last edited by Spiros on Thu Jul 02, 2009 3:38 pm; edited 1 time in total |
|
Back to top |
|
|
gms1 n00b
Joined: 10 Oct 2008 Posts: 27
|
Posted: Mon Jun 29, 2009 5:45 am Post subject: |
|
|
Code: |
/lib/libc.so.6(__fortify_fail+0x37)
|
it looks like you have a kind of hardened toolchain active. If this is the case, try to disable 'fortify source' during emerge of dev86 |
|
Back to top |
|
|
Spiros Apprentice
Joined: 11 Mar 2008 Posts: 189 Location: Zurich
|
Posted: Tue Jun 30, 2009 9:51 pm Post subject: |
|
|
gms1 wrote: | try to disable 'fortify source' during emerge of dev86 |
How could I do that?
I'm not sure that I have a hardened toolchain. How can I check that? _________________ Spiros |
|
Back to top |
|
|
mziab l33t
Joined: 01 Oct 2004 Posts: 644
|
Posted: Tue Jun 30, 2009 10:38 pm Post subject: |
|
|
Long answer: Gentoo's GCC 4.3.3 has FORTIFY_SOUCE which enables some extra protection against buffer overflows and such. Some applications do not take well to that, one of them being dev86.
Short answer: Unmask dev86-0.16.17-r6. It helped me. _________________ Gentoo Linux 13.0 | 3.19 | glibc 2.19 | gcc 4.9.2
mteam | mziab's blog | roslin |
|
Back to top |
|
|
gms1 n00b
Joined: 10 Oct 2008 Posts: 27
|
Posted: Wed Jul 01, 2009 5:22 am Post subject: |
|
|
mziab wrote: | Long answer: Gentoo's GCC 4.3.3 has FORTIFY_SOUCE which enables some extra protection against buffer overflows and such. |
shouldn't this be disabled by default ?
But I can not guess from the 'emerge --info' output what went wrong, in my environment the compile of dev86 succeeded ( without -D_FORTIFY_SOURCE=n and gcc 4.3.2)
edit: ok I found the answer
https://bugs.gentoo.org/256782 |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21624
|
Posted: Thu Jul 02, 2009 2:52 am Post subject: |
|
|
gms1 wrote: | mziab wrote: | Long answer: Gentoo's GCC 4.3.3 has FORTIFY_SOUCE which enables some extra protection against buffer overflows and such. |
shouldn't this be disabled by default ? |
The majority of programs work fine with _FORTIFY_SOURCE, so it is better to enable it by default. For those rare packages where _FORTIFY_SOURCE breaks valid code, a workaround can be applied or the code can be changed to allow use of _FORTIFY_SOURCE. |
|
Back to top |
|
|
gms1 n00b
Joined: 10 Oct 2008 Posts: 27
|
Posted: Thu Jul 02, 2009 7:12 am Post subject: |
|
|
Hu wrote: |
The majority of programs work fine with _FORTIFY_SOURCE, so it is better to enable it by default. |
yes, without question, but I wouldn't expect such changes from a bugfix release ( 4.3.2 -> 4.3.3 ) |
|
Back to top |
|
|
Spiros Apprentice
Joined: 11 Mar 2008 Posts: 189 Location: Zurich
|
Posted: Thu Jul 02, 2009 3:38 pm Post subject: |
|
|
I tried with -D_FORTIFY_SOURCE in cflags and cxxflags, but nothing changed.
Then I emerged the unstable version and I solved.
Thanks! _________________ Spiros |
|
Back to top |
|
|
emc Guru
Joined: 02 Jul 2004 Posts: 564 Location: Cracow, Poland
|
Posted: Thu Feb 14, 2013 2:50 pm Post subject: |
|
|
It work with dev86-0.16.19:
# emerge --info '=sys-devel/dev86-0.16.19' | grep -i source
CFLAGS="-march=btver1 -mtune=btver1 -u-fortify-source -u-fortify-source -u-fortify-source -u-fortify-source -u-fortify-source -u-fortify-source -u-fortify-source"
# emerge -1 =sys-devel/dev86-0.16.19
And it's fine |
|
Back to top |
|
|
|