'emerge -vD nmap' fails with: ... [ebuild U ] net-analyzer/nmap-4.76 [4.68] USE="gtk lua ssl" 0 kB ... x86_64-pc-linux-gnu-g++ -Wl,-E -Wl,-O1 -Lnbase -Lnsock/src/ -o nmap main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o osscan2.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o MACLookup.o nmap_tty.o nmap_dns.o traceroute.o portreasons.o nse_main.o nse_nsock.o nse_init.o nse_fs.o nse_nmaplib.o nse_debug.o nse_pcrelib.o nse_binlib.o nse_hash.o nse_bit.o -lnbase -lnsock -lpcre -lpcap -lssl -lcrypto libdnet-stripped/src/.libs/libdnet.a -llua -ldl nse_main.o: In function `process_preparethread(lua_State*, thread_record*)': nse_main.cc:(.text+0x12b): undefined reference to `lua_newthread' nse_main.cc:(.text+0x13b): undefined reference to `luaL_ref' nse_main.cc:(.text+0x14f): undefined reference to `lua_pushvalue' ... nse_bit.cc:(.text+0x2fb): undefined reference to `lua_pushnumber' collect2: ld returned 1 exit status make[1]: *** [nmap] Error 1 Reproducible: Always root@deer:/root(13)# emerge --info Portage 2.2_rc12 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r2 x86_64) ================================================================= System uname: Linux-2.6.26-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-glibc2.2.5 Timestamp of tree: Wed, 15 Oct 2008 09:00:01 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.4.4-r13, 2.5.2-r8 dev-python/pycrypto: 2.0.1-r6 dev-util/cmake: 2.6.2 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.26 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-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 /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /e tc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /e tc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" FFLAGS="-march=nocona -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="C" LDFLAGS="-Wl,-O1" LINGUAS="de fr" MAKEOPTS="-j1" 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/local/portage/layman/science /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d a52 aac acl acpi administrator afs aiglx alsa amd64 amrr ao aotuv apache2 asf atlas auctex audacious audiofile automount bash-completion beagle berkdb bjam blas bluetooth bonobo boo boost bzip2 c++ cairo cdda cddb cdf cdio cdparanoia cdr cgi chm cli corba cracklib cran crypt cups curl cxx daap dbus device-mapper dga dia divx djvu dlloader dmi dri ds3490 dv dvb dvd dvdr dvi dxr3 dynagrap h eds effects elf emacs emboss encode epiphany esd evo examples exif expat extra fam fame ffmpeg fftw firefox fits flac fltk foomaticd b fortran fpx galago gd gdal gdbm geos gif gimp gimpprint ginac glade glitz gml gmp gnokii gnome gnuplot gnutls gphoto2 gpm graphics g raphviz gs gsl gsm gstreamer gtk guile hal hardened hddtemp hdf hdf5 hlapi http hvm iconv icq icu id3 imagemagick imap innodb ipv6 ird a irmc isdnlog ithreads jabber java jbig john jpeg jpeg2k kerberos kexi keyring ladspa lame lapack latex lcms ldap libffi libgda libsa mplerate lirc lm_sensors lua lzo lzw mad maildir math matroska midi mmx mmxext mng mod mono motif mozdevelop mozilla mozsvg mozxmlterm mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networkmanag er nfs nls nntp nptl nptlonly nsplugin ntfs numarray numeric nvidia obex ocaml octave odbc ogdi ogg ole opengl openmp pae pam pcre pda pdf perl plotutils plugins png posix postgres postscript pppd preview-latex proj projectx pstricks python qhull quicktime readline re flection reiserfs rhythmbox rle rpc rrdcgi rrdtool samba sasl science sdl session slang slp smp sndfile snmp soup sox speex spell spl sqlite sse sse2 ssl stlport subtitles subversion suexec svg sysfs t1lib tcl tcpd tex theora threads thunderbird tidy tiff tk truetype unicode userlocales utempter v4l2 vorbis wmf wxwindows xattr xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc zli b zvbi" ALSA_CARDS="intel8x0" 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 auth_diges t authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user au toindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include i nfo log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse " KERNEL="linux" LC D_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" USERLAND="GNU" VIDEO_CARDS="nv nvidi a vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
On a hunch: what is your version of lua (including useflags) ?
As suggested by Rafał, if the user's lua is 5.1.4-r1 built with USE="cxx", this bug is likely to be related to bug 234622.
rose@deer:/home/rose(1)$ emerge -pvD lua These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/lua-5.1.4-r1 USE="cxx deprecated readline -static" 0 kB
In such case, for both of your bugs solution is the same: reemerge lua with -cxx. I think not only this useflag was a bad idea, but lua upstream was thinking of just the static linking, when they came up with that idea of longjmp vs exceptions depending on compiler used (cause, as we see here, this sucks for shared libs).
After reemerging lua with USE=-cxx I could also emerge nmap. Thank you for the hint. Juergen
Closing as WORKSFORME now that bug #234622 is closed.