First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 219282
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo net-p2p team <net-p2p@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Nikolay S. Rybaloff <dairinin@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
build.log Complete build log text/plain Nikolay S. Rybaloff 2008-04-25 17:51 0000 142.53 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 219282 depends on: Show dependency tree
Bug 219282 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-04-25 17:48 0000
Build failed with error:
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld:
build/common.a(commonTypes.o): relocation R_X86_64_PC32 against
`pow@@GLIBC_2.2.5' can not be used when making a shared object; recompile with
-fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value

Reproducible: Always

Steps to Reproduce:
1. Switch profile to hardened ~amd64
2. Rebuid world
4. Look for failed mldonkey

Actual Results:  
Adding "-fPIC" to CFLAGS does not solve problem. With USE="-ocamlopt" app
compiles just fine.


gcc -v
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/specs
Configured with:
/var/tmp/portage/sys-devel/gcc-3.4.6-r2/work/gcc-3.4.6/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/include/g++-v3
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --disable-multilib --disable-libgcj
--enable-languages=c,c++,treelang --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0, pie-8.7.10)


Portage 2.1.5_rc6 (hardened/amd64, gcc-3.4.6, glibc-2.7-r2, 2.6.25-gentoo-r1
x86_64)
=================================================================
System uname: 2.6.25-gentoo-r1 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Thu, 24 Apr 2008 22:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.2-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.62
sys-devel/automake:  1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release
/etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo
/etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles/
ftp://gentoo.tiscali.nl/pub/mirror/gentoo/  http://gentoo.tiscali.nl/
http://21cma.bao.ac.cn/gentoo/distfiles/"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LDFLAGS=""
LINGUAS="ru en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/portage/local/mine"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="a52 aac acl acpi alsa amd64 async berkdb bzip2 caps cgi charconv cli
cracklib crypt ctype daemon diskio encode exif expat extensions fastcgi ffmpeg
force-cgi-redirect gd gpm hardened ifsession javascript justify logrotate
mailwrapper memcache midi mysql mysqli ncurses network nfs nls nptl nptlonly
ogg openmp pam pcre perl php pic png posix python readline remote samba sensord
server session shaper sitemisc slang snmp sockets sqlite sse2 ssl swat taglib
tcpd threads truetype unicode urandom vchroot vorbis x264 xml xorg xvid 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 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en"
USERLAND="GNU" VIDEO_CARDS="vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Nikolay S. Rybaloff 2008-04-25 17:51:33 0000 -------
Created an attachment (id=150958) [edit]
Complete build log

------- Comment #2 From Jeroen Roovers 2008-04-26 05:20:32 0000 -------
@aballier: Please tell me what common e-mail address to CC for ml bugs. :)

------- Comment #3 From Alexis Ballier 2008-04-27 20:42:59 0000 -------
(In reply to comment #2)
> @aballier: Please tell me what common e-mail address to CC for ml bugs. :)

ml@g.o should be fine


@Nikolay: what ocaml version are you using ?
stable one (3.09.3) is known to have problems with hardened.
3.10.2 should be much better (in the sense that it doesnt try to use pie/pic
where it cant); this one should go stable soon, I'm working on the last few
remaining bits before asking for it.

------- Comment #4 From Nikolay S. Rybaloff 2008-04-28 12:41:50 0000 -------
It's 3.10.2:

#ocaml -version
The Objective Caml toplevel, version 3.10.2

------- Comment #5 From Alexis Ballier 2008-04-28 22:15:10 0000 -------
It seems mldonkey overrides the gcc call configured at ocaml build time for
hardened.

We have this in ocaml ebuild:
pkg_setup() {
    # dev-lang/ocaml creates its own objects but calls gcc for linking, which
will
    # results in relocations if gcc wants to create a PIE executable
    if gcc-specs-pie ; then
        append-ldflags -nopie
        ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
        ewarn "We have appended -nopie to ocaml build options"
        ewarn "because linking an executable with pie while the objects are not
pic will not work"
    fi
}


This is probably what you need for mldonkey.

------- Comment #6 From Nikolay S. Rybaloff 2008-04-29 06:41:20 0000 -------
That works! :))

------- Comment #7 From Nikolay S. Rybaloff 2008-04-29 06:50:28 0000 -------
This should definetely be in ebuild, I think.

------- Comment #8 From Nikolay S. Rybaloff 2008-05-05 19:26:54 0000 -------
So... What can I do for this fix to be added to the tree? Or nobody cares? Or
maybe this fix is not safe enough?

------- Comment #9 From solar 2008-05-05 20:59:05 0000 -------
vs. just linking with nopie. You might actually want to pass down -fno-pie to
the
build process to the final ET_EXEC does not get -fPIE on it's object files
while 
compiling.

------- Comment #10 From Raúl Porcel 2008-06-14 09:14:27 0000 -------
Don't close this bug until is fixed

------- Comment #11 From Alexis Ballier 2008-06-16 19:54:29 0000 -------
(In reply to comment #7)
> This should definetely be in ebuild, I think.
> 

comitted

First Last Prev Next    No search results available      Search page      Enter new bug