Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402971 - Cannot compile statically linked sys-fs/dmraid-1.0.0_rc16-r3
Summary: Cannot compile statically linked sys-fs/dmraid-1.0.0_rc16-r3
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-10 09:25 UTC by Paolo Pedroni
Modified: 2012-02-10 10:34 UTC (History)
0 users

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


Attachments
ebuild log for sys-fs/dmraid-1.0.0_rc16-r3 (dmraid-1.0.0_rc16-r3:20120210-090748.log.gz,8.94 KB, application/octet-stream)
2012-02-10 09:28 UTC, Paolo Pedroni
Details
ebuild environment for sys-fs/dmraid-1.0.0_rc16-r3 (environment,139.75 KB, text/plain)
2012-02-10 09:29 UTC, Paolo Pedroni
Details
build log with stable gcc for sys-fs/dmraid-1.0.0_rc16-r3 (dmraid-1.0.0_rc16-r3:20120210-102006.log.gz,8.57 KB, application/octet-stream)
2012-02-10 10:24 UTC, Paolo Pedroni
Details
ebuild environment with stable gcc for sys-fs/dmraid-1.0.0_rc16-r3 (environment,139.70 KB, text/plain)
2012-02-10 10:25 UTC, Paolo Pedroni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2012-02-10 09:25:43 UTC
I am recompiling my system with gcc-4.6.2 and I found out that sys-fs/dmraid-1.0.0_rc16-r3 cannot be compiled statically anymore. This is the error I get:

make[1]: Entering directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc16-r3/work/dmraid/1.0.0.rc16-3/dmraid/tools'
x86_64-pc-linux-gnu-gcc -o dmraid.o -c -I -I. -I../include -I../lib -include ../include/config.h  -march=amdfam10 -O2 -pipe -fomit-frame-pointer -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 dmraid.c
x86_64-pc-linux-gnu-gcc -o commands.o -c -I -I. -I../include -I../lib -include ../include/config.h  -march=amdfam10 -O2 -pipe -fomit-frame-pointer -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 commands.c
x86_64-pc-linux-gnu-gcc -o toollib.o -c -I -I. -I../include -I../lib -include ../include/config.h  -march=amdfam10 -O2 -pipe -fomit-frame-pointer -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 toollib.c
x86_64-pc-linux-gnu-gcc -o dmraid dmraid.o commands.o toollib.o -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -static -L../lib -ldmraid -L/lib64 -ldevmapper-event -ldevmapper -ludev -lrt   -L/lib64 -ldevmapper -ludev -lrt   -ldl 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper-event
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper
collect2: ld returned 1 exit status
distcc[26374] ERROR: compile (null) on localhost failed
make[1]: *** [dmraid] Errore 1
make[1]: Leaving directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc16-r3/work/dmraid/1.0.0.rc16-3/dmraid/tools'
make: *** [tools] Errore 2
emake failed

If I build it with USE=-static it works fine but it's useless to me because I can't put it in my (custom-built) initramfs.

I don't really know if it's gcc-4.6.2 related because it's been a while since I last rebuilt dmraid. I have already deleted stable gcc so it would be a minor PITA to install it and try to rebuild dmraid with it but I can do it if absolutely necessary.

I will of course attach the complete build log and environment to this bug ASAP.

Reproducible: Always

Steps to Reproduce:
1. USE=static emerge -1 dmraid
Actual Results:  
The error above.

Expected Results:  
A functioning, statically linked, dmraid binary.

# emerge --info
Portage 2.1.10.44 (default/linux/amd64/10.0/desktop, gcc-4.6.2, glibc-2.13-r4, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.0.3
Timestamp of tree: Fri, 10 Feb 2012 07:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.6 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y"
FEATURES="assume-digests binpkg-logs ccache compress-build-logs distcc distlocks ebuild-locks news parallel-fetch protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.mneisen.org/ http://gentoo.wheel.sk/ ftp://mirror.switch.ch/mirror/gentoo/ http://tux.rainside.sk/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it"
MAKEOPTS="-j12"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aalib acl acpi alsa amd64 ao audiofile bash-completion bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus dga djvu dri dts dvd dvdr emboss encode exif expat fam fbcon ffmpeg fftw flac fontconfig fortran ftp gd gdbm gdu ggi gif gmp gnutls gpm graphviz gstreamer gtk handbook iconv icu idn ieee1394 imagemagick imlib ipv6 java jbig jpeg jpeg2k kde lame lcms libcaca libnotify libsamplerate lm_sensors lua lzma lzo mad mmap mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp pam pango pch pcre pdf png policykit ppds pppd qt3support qt4 rdesktop readline sdl session smartcard sndfile speex spell sqlite sqlite3 sse sse2 ssl startup-notification svg symlink sysfs syslog taglib tcpd theora threads tiff truetype udev unicode usb vcd vim-syntax vorbis wavpack wmf x264 xattr xcb xcomposite xinerama xml xorg xpm xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="hda-intel virmidi" 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="kodak ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

# emerge -pqv =sys-fs/dmraid-1.0.0_rc16-r3
[ebuild   R   ] sys-fs/dmraid-1.0.0_rc16-r3  USE="mini static* -dietlibc -intel_led -klibc -led"
Comment 1 Paolo Pedroni 2012-02-10 09:28:32 UTC
Created attachment 301459 [details]
ebuild log for sys-fs/dmraid-1.0.0_rc16-r3
Comment 2 Paolo Pedroni 2012-02-10 09:29:57 UTC
Created attachment 301461 [details]
ebuild environment for sys-fs/dmraid-1.0.0_rc16-r3
Comment 3 Paolo Pedroni 2012-02-10 09:35:20 UTC
One more thing before I forget: it's not a parallel make issue either, I've already tried with FEATURES=-distcc MAKEOPTS=-j1 and it didn't work.
Comment 4 Paolo Pedroni 2012-02-10 10:21:28 UTC
It fails with stable gcc as well :-(

Error:
make[1]: Entering directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc16-r3/work/dmraid/1.0.0.rc16-3/dmraid/tools'
x86_64-pc-linux-gnu-gcc -o dmraid.o -c -I -I. -I../include -I../lib -include ../include/config.h  -march=amdfam10 -O2 -pipe -fomit-frame-pointer -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 dmraid.c
x86_64-pc-linux-gnu-gcc -o commands.o -c -I -I. -I../include -I../lib -include ../include/config.h  -march=amdfam10 -O2 -pipe -fomit-frame-pointer -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 commands.c
x86_64-pc-linux-gnu-gcc -o toollib.o -c -I -I. -I../include -I../lib -include ../include/config.h  -march=amdfam10 -O2 -pipe -fomit-frame-pointer -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 toollib.c
x86_64-pc-linux-gnu-gcc -o dmraid dmraid.o commands.o toollib.o -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -static -L../lib -ldmraid -L/lib64 -ldevmapper-event -ldevmapper -ludev -lrt   -L/lib64 -ldevmapper -ludev -lrt   -ldl 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper-event
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper
collect2: ld returned 1 exit status
make[1]: *** [dmraid] Errore 1
make[1]: Leaving directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc16-r3/work/dmraid/1.0.0.rc16-3/dmraid/tools'
make: *** [tools] Errore 2
emake failed

Adding build log and environment for this case as well, just in case...
Comment 5 Paolo Pedroni 2012-02-10 10:24:17 UTC
Created attachment 301467 [details]
build log with stable gcc for sys-fs/dmraid-1.0.0_rc16-r3
Comment 6 Paolo Pedroni 2012-02-10 10:25:07 UTC
Created attachment 301469 [details]
ebuild environment with stable gcc for sys-fs/dmraid-1.0.0_rc16-r3
Comment 7 Paolo Pedroni 2012-02-10 10:34:58 UTC
Marked "RESOLVED INVALID".

You need static-libs USE flag in lvm2 to build a static dmraid. Shame on me for not noticing before.

It could be nice if dmraid ebuild could force this...