net-misc/curl-7.27.0-r3 with CURL_SSL=nss USE=metalink fails to compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../src -I../lib -I../src -I/usr/include/nss -I/usr/include/nspr -march=native -O2 -pipe -ggdb -c tool_metalink.c tool_metalink.c:56:4: error: #error "Can't compile METALINK support without a crypto library." tool_metalink.c:198:29: error: ‘MD5_Init’ undeclared here (not in a function) tool_metalink.c:199:31: error: ‘MD5_Update’ undeclared here (not in a function) tool_metalink.c:200:30: error: ‘MD5_Final’ undeclared here (not in a function) tool_metalink.c:201:12: error: ‘MD5_CTX’ undeclared here (not in a function) tool_metalink.c:208:29: error: ‘SHA1_Init’ undeclared here (not in a function) tool_metalink.c:209:31: error: ‘SHA1_Update’ undeclared here (not in a function) tool_metalink.c:210:30: error: ‘SHA1_Final’ undeclared here (not in a function) tool_metalink.c:211:12: error: ‘SHA_CTX’ undeclared here (not in a function) tool_metalink.c:218:29: error: ‘SHA256_Init’ undeclared here (not in a function) tool_metalink.c:219:31: error: ‘SHA256_Update’ undeclared here (not in a function) tool_metalink.c:220:30: error: ‘SHA256_Final’ undeclared here (not in a function) tool_metalink.c:221:12: error: ‘SHA256_CTX’ undeclared here (not in a function) make[2]: *** [tool_metalink.o] Error 1 Reproducible: Always Portage 2.2.0_alpha124 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r2, 3.6.0-rc4 x86_64) ================================================================= System uname: Linux-3.6.0-rc4-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.2 Timestamp of tree: Mon, 03 Sep 2012 13:45:01 +0000 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.9.6-r3, 1.11.6, 1.12.3 sys-devel/binutils: 2.22.90 sys-devel/gcc: 4.6.3, 4.7.1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.5 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo local embe ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3 googleearth google-talkplugin" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe -ggdb" DISTDIR="/home/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --complete-graph y --quiet-build y" FCFLAGS="-march=native -O2 -pipe -ggdb" FEATURES="assume-digests binpkg-logs buildpkg clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=native -O2 -pipe -ggdb" GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/ http://ftp.vectranet.pl/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" INSTALL_MASK="/etc/rmt" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-z,now" LINGUAS="en en_US pl pl_PL" MAKEOPTS="-j10" PKGDIR="/home/portage/packages" PORTAGE_BUNZIP2_COMMAND="pbunzip2 --ignore-trailing-garbage=1" PORTAGE_BZIP2_COMMAND="pbzip2" PORTAGE_COMPRESS="man-symlinker" PORTAGE_COMPRESS_FLAGS="xz --" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude /lost+found" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/embe" SYNC="rsync://maluch/gentoo-portage" USE="X a52 aac aacplus acl acpi adns alsa amd64 ass avahi avx bazaar berkdb bluetooth bzip2 cairo caps cdb cdda cddb cdr cli clutter colord consolekit crypt cryptsetup cups curl cvs cxx dbus device-mapper dirac djvu dri dts dvb dvd dvdr eds emboss encode evo examples exif fam fat ffmpeg fftw firefox flac fontconfig fortran fuse gadu gdbm gif gimp git gmp gnome gnome-keyring gnome-online-accounts gnuplot gpg gphoto2 graphviz gstreamer gtk gtk3 iconv icu idn iproute2 ipv6 jabber java jpeg lame lapack latex lcms ldap libkms libnotify libproxy live llvm lua lzma mad man matroska mercurial metalink mmx mng modules mp3 mp4 mpeg mtp mudflap multilib musepack nautilus ncurses netlink networkmanager nls nptl nsplugin offensive ogg openal opengl openmp openvg pam pango pch pcre pdf pgf pkcs11 png policykit postproc postscript ppds pppd pulseaudio python qt3support qt4 raw readline rtmp samba schroedinger sdl session sip smartcard smp socialweb speex spell sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification subversion svg syslog system-sqlite theora tiff tls truetype udev udisks unicode upnp upower urandom usb uuid v4l vaapi vala vdpau vim-syntax vorbis vpx wifi wxwidgets x264 xattr xcb xinerama xml xmp xv xvid zeroconf 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 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 sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="en en_US pl pl_PL" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, USE_PYTHON
Attach full build log (and - most likely - config.log too).
Created attachment 322930 [details] build log
Created attachment 322932 [details] config log (xzipped)
I checked with curl-7.28.0 and this issue is still there. Looks like its time to do some debugging and submit patches upstream.
Actually, it seem it's simply that tool_metalink.c doesn't have an option to be built against NSS.
(In reply to comment #5) > Actually, it seem it's simply that tool_metalink.c doesn't have an option to > be built against NSS. Okay I finally gave this issue some attention. You are clearly right, that code is just not there. Ideally one should patch the build system, ie configure.ac, to not allow both options together. Something like if [[ "x$OPT_NSS" == "xyes" && "x$OPT_LIBMETALINK" == "xyes" ]]; then AC_MSG_ERROR([cannot enable both nss and metalink]) fi This would go upstream, but they prefer doing AC_MSG_RESULT([no ($version)]) AC_MSG_NOTICE([libmetalink library defective or too old]) want_metalink="no" which is a problem for Gentoo since it introduces automagic. We don't want our use flags turned on or off behind the users back. Instead, I simple added that logic to the ebuild. I'll open a bug upstream and link to this one to let them know the issue and they can decide how to proceed.
For the records, here's the upstream bug report: https://sourceforge.net/tracker/?func=detail&aid=3578163&group_id=976&atid=100976
there's a patch on the upstream bug report http://thread.gmane.org/gmane.comp.web.curl.library/37248 that let's metalink use NSS, which should fix this.
(In reply to comment #8) > there's a patch on the upstream bug report > http://thread.gmane.org/gmane.comp.web.curl.library/37248 > that let's metalink use NSS, which should fix this. Thanks for this. I'm certain Dudka's patch is correct. Patch 2 of 2 is the real guts of it and adds the "missing" code. Still, I think we can wait until the next release to include this feature.
fix included in curl 7.28.1 :)
(In reply to comment #10) > fix included in curl 7.28.1 :) please test. the ebuild is in the tree