Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 226649 - sys-block/partimage-0.6.7 will not compile with static USE flag
Summary: sys-block/partimage-0.6.7 will not compile with static USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 210075
  Show dependency tree
 
Reported: 2008-06-14 13:55 UTC by ta2002
Modified: 2010-07-07 23:00 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ta2002 2008-06-14 13:55:33 UTC
Compiles fine without USE=static, but I want a static version for another computer.

# USE=static emerge -v partimage

[...]

mkdir .libs
i686-pc-linux-gnu-g++ -march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse -static -o partimage netclient.o imagefile.o misc.o image_net.o buffer.o gui_text.o main.o imginfo.o cbitmap.o interface_base.o interface_newt.o interface_none.o mbr_backup.o  -L/usr/lib -lslang fs/libfs.a ../shared/libshared.a -lcrypt -lz -lnewt -lbz2 -lpthread /usr/lib/libslang.a /usr/lib/libnewt.a /usr/lib/libdl.a /usr/lib/libssl.a /usr/lib/libcrypto.a -lcrypto -lssl
/usr/lib/libnewt.a(form.o): In function `Gpm_Open':
(.text+0xa4d): warning: the use of `tempnam' is dangerous, better use `mkstemp'
netclient.o: In function `CNetClient::Connect(char*, unsigned short)':
netclient.cpp:(.text+0x768): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x31f): undefined reference to `dlsym'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x409): undefined reference to `dlerror'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x497): undefined reference to `dlsym'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x57d): undefined reference to `dlerror'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
(.text+0x5ed): undefined reference to `dlclose'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x6cb): undefined reference to `dlopen'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x732): undefined reference to `dlclose'
/usr/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
(.text+0x76f): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make[4]: *** [partimage] Error 1
make[4]: Leaving directory `/var/tmp/portage/sys-block/partimage-0.6.7/work/partimage-0.6.7/src/client'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-block/partimage-0.6.7/work/partimage-0.6.7/src/client'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-block/partimage-0.6.7/work/partimage-0.6.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-block/partimage-0.6.7/work/partimage-0.6.7'
make: *** [all] Error 2
 *
 * ERROR: sys-block/partimage-0.6.7 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3019:  Called die
 * The specific snippet of code:
 *       emake || die "make failed"
 *  The die message:
 *   make failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-block:partimage-0.6.7:20080614-133852.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-block/partimage-0.6.7/temp/environment'.
 *

$ emerge -p --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: 2.6.24-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Timestamp of tree: Fri, 13 Jun 2008 22:35:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 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.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j3"
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/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa arts audiofile berkdb bitmap-fonts bzip2 cairo caps cdparanoia cdr cjk cpudetection cracklib crypt css cups dbus dga directfb dri dvd dvdr dvdread encode exif expat fam fbcon ffmpeg flac fortran gcj ggi gif glibc-omitfp gmp gphoto2 gpm gstreamer hal iconv idea imagemagick imap imlib ipv6 javascript jbig joystick jpeg kde lcms libcaca libwww live lm_sensors mad matroska mbox memlimit midi mmx mmxext mng mp3 mpeg mudflap mysql nas ncurses network nls no-old-linux nodrm nptl nptlonly ogg opengl openmp oscar pcre pdf perl png qt3 quicktime readline real rtc samba scanner sdl sensord silc smtp sndfile speex spell sse sse2 ssl stream svg sysfs tcpd theora threads threadsafe tiff timidity truetype truetype-fonts type1-fonts unicode usb userlocales utf8 vcd vorbis wideband win32codecs x86 xinerama xml xorg xv xvid yahoo zlib zrtp" 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" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Obviously, add static to the above for this ebuild.

I tried to search for these messages, and found a few mentions of openssl getting built without libdl, but I don't see any evidence of that (the openssl log file has a line "EX_LIBS       =-ldl").
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-14 14:05:50 UTC
I'm not sure how to fix this but I can tell you why it happens: libdl.a is not used by partimage but just by libgcrypt.a, but it's listed _before_ that. The order in which the libraries are given _is_ important.

libgcrypt-config does not list libdl in --libs at all, quite not so cool of them; and they don't have a pkg-config file.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-07-07 23:00:32 UTC
(In reply to comment #0)
> Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0,

Bug from 2008, ancient toolchain, ...

0.6.8 compiles fine