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

Bug 109299

Summary: wget 1.10.2 - unable to build statically
Product: Gentoo Linux Reporter: barthek <gejzer>
Component: New packagesAssignee: Seemant Kulleen (RETIRED) <seemant>
Status: RESOLVED DUPLICATE    
Severity: normal CC: askwar, flash3001, gejzer
Priority: High    
Version: 2005.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: config.log
wget-1.10.2.ebuild_without-static.patch

Description barthek 2005-10-14 13:09:47 UTC
i tried to build wget with USE=static and it fails:

configure: error: --with-ssl was given, but OpenSSL is not available.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/wget-1.10.2/work/wget-1.10.2/config.log

relevant section of config.log shows:

configure:10451: checking for libssl
configure:10483: i686-pc-linux-gnu-gcc -o conftest -pipe -march=pentium3 -O3
-fstack-protector -funroll-al
l-loops  -Wl,-O1 -static conftest.c -ldl -lrt  /usr/lib/libssl.so
/usr/lib/libcrypto.so >&5
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld:
attempted static link of dynami
c object `/usr/lib/libssl.so'
collect2: ld returned 1 exit status
distcc[532] ERROR: compile conftest.c on localhost failed

where the hack did libssl.so come from?
i have libssl.a in /usr/lib

my emerge info:
Portage 2.0.53_rc5 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2,
2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Pentium III (Katmai)
Gentoo Base System version 1.12.0_pre9
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.13
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe -march=pentium3 -O3 -fstack-protector -funroll-all-loops"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-pipe -march=pentium3 -O3 -fstack-protector -funroll-all-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distcc distlocks sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch
http://trumpetti.atm.tut.fi/gentoo/
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync3.se.gentoo.org/gentoo-portage"
USE="x86 X berkdb bitmap-fonts caps chroot crypt eds emboss gd glibc-omitfp gpm
gstreamer gtk gtk2 hardened hpn jpeg minimal mmx mp3 ncurses nptl nptlonly ogg
pam pam_chroot pam_timestamp perl png pthreads python readline sftplogging slang
speex sse ssl symlink tcpd threads truetype type1-fonts vorbis zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS, PORTDIR_OVERLAY
Comment 1 Alexander Skwar 2005-10-15 07:27:05 UTC
I'm seeing the same.
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2005-10-19 06:55:06 UTC
alexander, please paste the output of `emerge --info` here
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2005-10-19 06:55:49 UTC
barthek: why do you have LDFLAGS set in your make.conf?
Comment 4 barthek 2005-10-19 07:17:02 UTC
dont know where it came from, might be that it was a fix
for some improper ebuilds? 

strange thing i havent noticed that at all - of course removing
LDFLAGS made wget compile smoothly :)
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2005-10-19 07:39:23 UTC
barthek, and wget works?
Comment 6 barthek 2005-10-19 08:00:46 UTC
yeah it does perfectly!

file `which wget`
/usr/bin/wget: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.6.6, statically linked, for GNU/Linux 2.6.6, stripped

doli@1g ~ $ wget www.tpsa.pl
--16:59:51--  http://www.tpsa.pl/
           => `index.html'
Resolving www.tpsa.pl... 193.110.121.236
Connecting to www.tpsa.pl|193.110.121.236|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.tp.pl/ [following]
--16:59:51--  http://www.tp.pl/
           => `index.html'
Resolving www.tp.pl... 193.110.121.236
Connecting to www.tp.pl|193.110.121.236|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

    [ <=>                                                                      
                                      ] 34,530        --.--K/s             

16:59:51 (255.70 KB/s) - `index.html' saved [34530]


wondering whether alexander also had ldflags set :)
Comment 7 Alexander Skwar 2005-10-19 10:05:01 UTC
(In reply to comment #2)
> alexander, please paste the output of `emerge --info` here

alexander@blatt ~ $ emerge info
Portage 2.0.53_rc5 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2,
2.6.13-suspend2-r4.036.dm-stat i686)
=================================================================
System uname: 2.6.13-suspend2-r4.036.dm-stat i686 Intel(R) Celeron(R) M
processor         1.50GHz
Gentoo Base System version 1.12.0_pre9
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.4-r1, 2.4.2
sys-apps/sandbox:    1.2.13
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/Gentoo/Portage/distfiles"
FEATURES="autoconfig buildpkg ccache collision-protect distcc distlocks sandbox
sfperms strict"
GENTOO_MIRRORS="http://server.bei.digitalprojects.com/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://stuff.alexander.skwar.name/gentoo/
http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
http://distro.ibiblio.org/pub/linux/distributions/gentoo/
http://distfiles.gentoo.org/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/Gentoo/Portage/packages"
PORTAGE_TMPDIR="/Gentoo/Portage/build"
PORTDIR="/Gentoo/Portage/tree"
PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc"
SYNC="rsync://server/gentoo-portage"
USE="x86 GAPING_SECURITY_HOLE X acpi alsa amd apm arts artswrappersuid async avi
bash-completion bdf berkdb bitmap-fonts bluetooth bootsplash browserplugin
cardbus ccache cdda cddb cdio cdparanoia cdr cdrom cle266 crypt css cups curl
curlwrappers dbus devmap dillo divx4linux dlloader dvd dvdread emoticon esd exif
fam fbcon fbdev fbsplash firefox fping freetype gd gdbm gif gnokii gnome
gstreamer gtk gtk2 hal hpn icc id3 idn imagemagick imap imlib imlib2
insecure-drivers insecure-savers java javascript jikes jpeg kde kdeenablefinal
libedit libwww linuxthreads-tls logrotate lynxkeymap mad madwifi maildir
matroska mbox mmx mmxext mozilla moznoirc mozsvg mp3 mpeg mpeg2 mpeg4 mplayer
multicall ncurses netboot network new-login nfs nis nls no-old-linux no-suexec
noantlr nobcel nobeanutils nobsf nobsh nocd nocommonslogging nocommonsnet nodrm
nogg nogulm nojsch nojython nolog4j nomac nooro nopri norhino noxalan noxerces
nozaptel nptl nsplugin offensive ogg oggvorbis opengl openssh pam_console
pam_timestamp passfile password patented pccts pcmcia pcre perl perlsuid pic
player png pnp qt quicktime rar readline real recode reiserfs ruby samba sdl
sendfile sensord sftp slang sms spell spf sse sse2 ssl startup-notification
stream subp subtitles suid symlink sysfs syslog transcode truetype
truetype-fonts trusted type1-fonts underscores unichrome unicode unsafe usb utf8
uudeview vim vim-pager vlm vorbis wifi win32codecs wma123 x11vnc xine xinetd xml
xml2 xmms xpm xscreensaver xv xvid xvmc zlib video_cards_via linguas_de
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL


LDFLAGS is set.


To confirm the influence of LDFLAGS, I tried:

LDFLAGS='' USE=static Gestoppt sudo emerge -v wget

But this doesn't work:

checking for libssl... no
configure: error: --with-ssl was given, but OpenSSL is not available.

To double check, I even removed LDFLAGS from make.conf (I commented it). As
expected, wget still is not compatible with USE=static.
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2005-10-19 11:20:53 UTC
alexander, please also remove or clear your ccache and disable distcc -- I
believe ccache to be more of the issue (but I hope to $DEITY you don't have
rubbish like LDFLAGS set on the rest of your boxes)
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2005-10-19 11:45:02 UTC
this bug is user error, and I am closing it as such.
Comment 10 Alexander Skwar 2005-10-19 12:54:48 UTC
(In reply to comment #9)
> this bug is user error, and I am closing it as such.

How is it "user error"? Please explain and also reopen the bug, as it's clearly
not user error.

To verify, I ran:

LDFLAGS='' USE=static FEATURES="-ccache -distcc" emerge -v wget

This, of course, broke as well. Nothing else was to be expected. Seemant, please
don't be so quick in wrongly closing bugs :(

Seemant, I'd be interested to know, why you think, that

configure:10483: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=pentium-m -pipe
-fomit-frame-pointer   -static conftest.c -ldl -lrt  /usr/lib/libssl.so
/usr/lib/libcrypto.so >&5
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld:
attempted static link of dynamic object `/usr/lib/libssl.so'

is a "user error".
Comment 11 Alexander Skwar 2005-10-19 12:57:02 UTC
Created attachment 71034 [details]
config.log

!!! Please attach the config.log to your bug report:
!!! /Gentoo/Portage/build/portage/wget-1.10.2/work/wget-1.10.2/config.log

Doing so.
Comment 12 Alexander Skwar 2005-10-20 08:31:41 UTC
Created attachment 71074 [details, diff]
wget-1.10.2.ebuild_without-static.patch

A patch against the wget-1.10.2.ebuild, which removes the non working "static"
flag from the acceptable USE flags.
Comment 13 Alexander Skwar 2005-10-28 22:35:51 UTC
Hello?
Could somebody please reopen that bug? Or better yet, apply my patch which will
do away with "USE=static" as it's obviously not working?
Comment 14 barthek 2005-10-31 02:03:31 UTC
well it is working as expected. why would you want to remove ability to link
wget statically? i can imagine a situation where not having wget statically
linked renders system unusable.

Comment 15 Alexander Skwar 2005-10-31 04:34:24 UTC
(In reply to comment #14)
> well it is working as expected. why would you want to remove ability to link
> wget statically? i can imagine a situation where not having wget statically
> linked renders system unusable.

I'd like to do so, because wget doesn't compile with USE=static.

configure:10483: i686-pc-linux-gnu-gcc -o conftest -O2 -mtune=pentium-m -pipe
-fomit-frame-pointer   -static conftest.c -ldl -lrt  /usr/lib/libssl.so
/usr/lib/libcrypto.so >&5
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld:
attempted static link of dynamic object `/usr/lib/libssl.so'

Could you please reopen the bug?
Comment 16 Seemant Kulleen (RETIRED) gentoo-dev 2005-11-01 09:12:56 UTC
reopening
Comment 17 Seemant Kulleen (RETIRED) gentoo-dev 2005-11-01 09:14:15 UTC
have you tried this with the fixes that were applied from bug #110035 ?  I'd put
that in on Oct 25, so if you haven't emerged sync please do so.
Comment 18 Alexander Skwar 2005-11-01 09:32:26 UTC
(In reply to comment #17)
> have you tried this with the fixes that were applied from bug #110035 ?  I'd put
> that in on Oct 25, so if you haven't emerged sync please do so.

I sync daily and also synced a few seconds ago. Still no go. 

It would've been nice, if you could have added a link to bug #110035 a lit bit
earlier...
Comment 19 Alexander Skwar 2005-11-01 09:55:00 UTC
Solution: In the wget-1.10.2.ebuild, change the PATCHVER=0.1 to PATCHVER=0.2 and
do a "ebuild wget-1.10.2.ebuild digest". After that, wget can be compiled with
USE=static.

I'd still be interested to find out, what the "user error" was...
Comment 20 Seemant Kulleen (RETIRED) gentoo-dev 2005-11-02 07:41:27 UTC
Alexandr, all you have to do is read comment #6 to see what the user error was.
 It wasn't you, it was the *reporter*.
Comment 21 Seemant Kulleen (RETIRED) gentoo-dev 2005-11-02 07:43:21 UTC
Alexandr, please relax with your anger and frustration.

*** This bug has been marked as a duplicate of 110035 ***