Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 131841

Summary: sys-apps/parted: fix for --as-needed compilation
Product: Gentoo Linux Reporter: TGL <>
Component: [OLD] Core systemAssignee: John N. Laliberte (RETIRED) <allanonjl>
Severity: minor CC: flameeyes, llucas
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    
Attachments: files/parted-1.6.25-as-needed.patch
emerge --info

Description TGL 2006-04-30 17:05:07 UTC
Parted fails to build with -Wl,--as-needed because of some unresolved symbols in libparted. This patch makes it links against libdl to solve that. As a side effect, it also makes qtparted compiles fine.
Comment 1 TGL 2006-04-30 17:05:31 UTC
Created attachment 85878 [details, diff]
Comment 2 TGL 2006-04-30 17:06:03 UTC
Created attachment 85879 [details, diff]

patch for the ebuild
Comment 3 Lance Lucas 2006-05-06 02:49:09 UTC
works great here, also allows gparted to compile.

Gentoo Base System version 1.12.0_pre19
Portage 2.1_pre10-r3 (default-linux/amd64/2006.0, gcc-4.1.0, glibc-2.4-r2, 2.6.16-gentoo-r6 x86_64)
System uname: 2.6.16-gentoo-r6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-util/ccache:     2.4-r1
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1, 2.16.92
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O3 -march=athlon64 -pipe -fomit-frame-pointer -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -ffast-math -msse3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -pipe"
FEATURES="autoconfig ccache metadata-transfer sandbox sfperms strict"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/as-needed-overlay"
USE="amd64 X a52 aac aalib acpi aim alsa artworkextra audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo caps cd cddb cdparanoia cdr chroot clamav cli crypt css cups curl dbus divx4linux dv dvd dvdr dvdread eds emboss encode esd evo exif fame ffmpeg firefox flac flash foomaticdb fortran gd gdbm gif glitz gmp gnome gphoto2 gpm gs gstreamer gtk gtk2 gtkhtml hal ieee1394 imagemagick imap imlib isdnlog java javascript jikes joystick jpeg jpeg2k lcms ldap libcaca live logrotate lzo lzw lzw-tiff mad maildir mbox memlimit mikmod mmap mng mono motif moznocompose moznoirc moznomail moznosvg mozsvg mp3 mpeg musepack musicbrainz nautilus ncurses network nls nptl nptlonly nsplugin nvidia offensive ogg oggvorbis openexr opengl oss pam pcre pdf pdflib perl php pic png posix ppds pppd python qt quicktime readline reflection sdl session smp sndfile speex spell spl sqlite ssl svg tcltk tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd videos vorbis wmf wxwindows xine xml xml2 xmms xorg xpm xv xvid xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en userland_GNU video_cards_nvidia"
Comment 4 Lance Lucas 2006-05-06 02:52:48 UTC
(In reply to comment #3)

> CXXFLAGS="-O2 -pipe"

apologies for double message, forgot i was futzing with make.conf at the time :)  at compile time,  CXXFLAGS="${CFLAGS}"
Comment 5 TGL 2006-05-14 06:14:23 UTC
Patch (rediffed for trunk) sent upstream (bug-partedATgnuDOTorg).
Comment 6 John N. Laliberte (RETIRED) gentoo-dev 2006-05-20 05:26:28 UTC
can you guys try parted 1.7.0 ?

just went in the tree and i have no issues with as-needed with that version.

Comment 7 TGL 2006-05-21 11:43:18 UTC
(In reply to comment #6)
> can you guys try parted 1.7.0 ?
> just went in the tree and i have no issues with as-needed with that version.
> thanks.

I still get this (same as with 1.6.25):

make[2]: Entering directory `/var/tmp/portage/parted-1.7.0/work/parted-1.7.0/partprobe'
if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include     -march=pentium-m -O2 -pipe -ggdb -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DLOCALEDIR="\"/usr/share/locale\"" -DLOCALEDIR="\"/usr/share/locale\"" -W -Wall -Wno-unused -Wno-switch -Wno-format -MT partprobe.o -MD -MP -MF ".deps/partprobe.Tpo" -c -o partprobe.o partprobe.c; \
        then mv -f ".deps/partprobe.Tpo" ".deps/partprobe.Po"; else rm -f ".deps/partprobe.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc  -march=pentium-m -O2 -pipe -ggdb -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DLOCALEDIR="\"/usr/share/locale\"" -DLOCALEDIR="\"/usr/share/locale\"" -W -Wall -Wno-unused -Wno-switch -Wno-format  -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -o partprobe  partprobe.o ../libparted/ -lreadline  -ldl -lncurses
mkdir .libs
i686-pc-linux-gnu-gcc -march=pentium-m -O2 -pipe -ggdb -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DLOCALEDIR=\"/usr/share/locale\" -DLOCALEDIR=\"/usr/share/locale\" -W -Wall -Wno-unused -Wno-switch -Wno-format -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -o .libs/partprobe partprobe.o  ../libparted/.libs/ -luuid -lreadline -ldl -lncurses
../libparted/.libs/ undefined reference to `dlerror'
../libparted/.libs/ undefined reference to `dlclose'
../libparted/.libs/ undefined reference to `dlopen'
../libparted/.libs/ undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[2]: *** [partprobe] Error 1
make[2]: Leaving directory `/var/tmp/portage/parted-1.7.0/work/parted-1.7.0/partprobe'

I will attach a rediffed patch.
Comment 8 TGL 2006-05-21 11:43:58 UTC
Created attachment 87204 [details, diff]
Comment 9 TGL 2006-05-21 11:44:44 UTC
Created attachment 87205 [details, diff]
Comment 10 Lance Lucas 2006-05-24 18:55:11 UTC
(In reply to comment #6)
> can you guys try parted 1.7.0 ?
> just went in the tree and i have no issues with as-needed with that version.
> thanks.

tree version is broken for me (w/same errors as TGL); 1.7.0 using TGL's patch allows parted to compile cleanly.  i have not done much testing of the actual binaries though.  using binutils-2.6.93 and gcc-4.1.1 prelease (from portage).
Comment 11 Lance Lucas 2006-05-24 18:56:45 UTC
Created attachment 87448 [details]
emerge --info
Comment 12 John N. Laliberte (RETIRED) gentoo-dev 2006-05-30 11:40:07 UTC
thanks, looks like patch was applied in 1.7.1.

in cvs.