Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406399 - >=net-dns/bind-9.8.2[dlz] - -o driver.so .libs/driver.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main'
Summary: >=net-dns/bind-9.8.2[dlz] - -o driver.so .libs/driver.o /usr/lib/gcc/x86_64-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 5 votes (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
: 406507 406753 411361 416633 416841 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-01 09:15 UTC by Drunkard Zhang
Modified: 2012-07-28 20:15 UTC (History)
26 users (show)

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


Attachments
Indicative build log (build.log,541.47 KB, text/plain)
2012-03-02 00:37 UTC, Robert White
Details
bind-9.9.0.patch (bind-9.9.0.patch,385 bytes, patch)
2012-03-02 11:35 UTC, Joerg Neikes
Details | Diff
build.log from now also failing net-dns/bind-9.8.1_p1 (bind-9.8.1_p1-build.log,561.66 KB, text/plain)
2012-03-03 12:48 UTC, Torsten Kaiser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drunkard Zhang 2012-03-01 09:15:28 UTC
net-dns/bind-9.9.0 cannot build with dlz USE, while it's OK without dlz USE. No matter with or without database USE.

16:53:55 ~ # emerge --info =net-dns/bind-9.9.0
Portage 2.3.2-r2 (default/linux/amd64/2008.0/desktop, gcc-4.6.2, glibc-2.13-r4, 3.3.0-rc5+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.3.0-rc5+-x86_64-AMD_A8-3500M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.1.8
Timestamp of tree: Thu, 01 Mar 2012 07:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r3, 3.2.2
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1.8-r3
sys-apps/openrc:          0.9.8.4-r1::pentoo
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo sunrise science gentoo-zh ltsp pure-funtoo hacking-gentoo pentoo
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 /etc/udev/rules.d"
CXXFLAGS="-mtune=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles mini-manifest news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirrors.163.com/gentoo/ http://mirrors.sohu.com/gentoo/ http://gentoo.gwbnsh.net.cn/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="zh_CN zh_TW zh en ru de bo ug"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/science /var/lib/layman/gentoo-zh /var/lib/layman/ltsp /var/lib/layman/pure-funtoo /var/lib/layman/hacking-gentoo /var/lib/layman/pentoo"
SYNC="git://github.com/funtoo/portage-mini-2011.git"
SYNC_USER="root"
USE="3dnow 3dnowext X a52 aac acl acpi aio alac alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cjk cli consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr dvdread emboss encode exif fam ffmpeg firefox flac fortran gconf gdbm gdu geoip gif gimp gmp gnome gpm gstreamer gtk gtk3 iconv icu idn introspection ipv6 jpeg jpeg2k lame lcms libnotify libsamplerate mad mmap mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pch pcre pdf perl png postgres ppds pppd pulseaudio python readline sdl session smp sse sse2 ssl startup-notification svg sysfs theora threads tiff truetype udev unicode usb vim-syntax vorbis wavpack wifi x264 xcb xft xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" 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 stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN zh_TW zh en ru de bo ug" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx radeon" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK

=================================================================
                        Package Settings
=================================================================

net-dns/bind-9.9.0 was built with the following:
USE="caps geoip idn ipv6 (multilib) rpz ssl threads urandom -berkdb -dlz -doc -gost -gssapi -ldap -mysql -odbc -pkcs11 -postgres -sdb-ldap (-selinux) -static-libs -xml"
Comment 1 Reuben Farrelly 2012-03-01 09:53:03 UTC
+1 - seeing the exact same problem here also.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-01 14:48:42 UTC
Please attach the entire build log to this bug report.
Comment 3 Stevan Bajić 2012-03-01 22:06:21 UTC
If the error is happening in dlzexternal then the solution is the patch from here -> http://lists.fedoraproject.org/pipermail/scm-commits/2011-November/683368.html
Comment 4 Robert White 2012-03-02 00:37:01 UTC
Created attachment 303901 [details]
Indicative build log

I too am haiving the same problem. The patch mentioned in comment #3 would likely be applicable but I am not sure how to use a one-off like that in portage. Likely others would want the same fix put into the tree (if indeed it is the fix).
Comment 5 Joerg Neikes 2012-03-02 11:35:36 UTC
Created attachment 303969 [details, diff]
bind-9.9.0.patch
Comment 6 Joerg Neikes 2012-03-02 11:38:14 UTC
To put patches in localpatch order for net-dns/bind use this:
(also used by glibc, php ...)

mkdir -p /etc/portage/patches/net-dns/bind-9.9.0
cp bind-9.9.0.patch /etc/portage/patches/net-dns/bind-9.9.0/

vi /usr/portage/net-dns/bind/bind-9.9.0.ebuild

add

post_src_prepare() {
    epatch_user
    }

before

src_configure() {

ebuild /usr/portage/net-dns/bind/bind-9.9.0.ebuild digest

emerge =net-dns/bind-9.9.0
Comment 7 Martin Kramer 2012-03-02 13:42:07 UTC
I can confirm this patch works. Thanks!
Comment 8 Torsten Kaiser 2012-03-03 12:48:30 UTC
Created attachment 304119 [details]
build.log from now also failing net-dns/bind-9.8.1_p1

I am seeing the same problem. Not only on my unstable ~amd64 system, but also on my stable amd64 system with bind-9.8.1_p1.

bind-9.8.1_p1 was successfully build on Feb 22, but now the rebuild because of the added USE flag static-libs is failing, as shown in the attached build.log.

USE=static-libs does not fix it for me in 9.9.0, but rebuilding bind-9.8.1_p1 after removing the line "$(use_enable static-libs static) \" does work.
(I did not try USE=static-libs with 9.8.1_p1 or removing that line from 9.9.0)

So it looks like just specifying this configure option is breaking the buildsystem of the tests of the DLZ patch.
Comment 9 Christian Ruppert (idl0r) gentoo-dev 2012-03-03 12:58:53 UTC
*** Bug 406753 has been marked as a duplicate of this bug. ***
Comment 10 Toei Rei 2012-03-03 14:13:14 UTC
Same problems with bind 9.8.1-p1 and 9.9.0
Patch works for me.
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2012-03-04 00:08:01 UTC
*** Bug 406507 has been marked as a duplicate of this bug. ***
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2012-03-04 18:52:29 UTC
Interesting. This thing does not work:

$ /tmp/portage/net-dns/bind-9.9.0/work/bind-9.9.0/bin/tests/system/dlzexternal:libtool --mode=link --tag=CC x86_64-pc-linux-gnu-gcc -shared -o driver.so driver.lo
libtool: link: x86_64-pc-linux-gnu-gcc -o driver.so .libs/driver.o 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status

While this works:

$ /tmp/portage/net-dns/bind-9.9.0/work/bind-9.9.0/bin/tests/system/dlzexternal:
[sf] /tmp/portage/net-dns/bind-9.9.0/work/bind-9.9.0/bin/tests/system/dlzexternal:libtool --mode=link --tag=CC "x86_64-pc-linux-gnu-gcc -shared" -o driver.so driver.lo
libtool: link: x86_64-pc-linux-gnu-gcc -shared -o driver.so .libs/driver.o

Makefile.in does not look sane:

> driver.@SO@: ${SO_OBJS}
>        ${LIBTOOL_MODE_LINK} @SO_LD@ -o $@ driver.@O@

Could be worked around by:
> driver.@SO@: ${SO_OBJS}
>        ${LIBTOOL_MODE_LINK} "@SO_LD@" -o $@ driver.@O@

But dropping that test sounds better.

Might be a problem with our libtool implementation.
CCed base-system to hear the denial :]
Comment 13 Christian Ruppert (idl0r) gentoo-dev 2012-04-07 18:42:22 UTC
@base-system: any progress on this issue?
Comment 14 Christian Ruppert (idl0r) gentoo-dev 2012-04-09 19:14:29 UTC
*** Bug 411361 has been marked as a duplicate of this bug. ***
Comment 15 Christian Ruppert (idl0r) gentoo-dev 2012-05-19 18:38:44 UTC
*** Bug 416633 has been marked as a duplicate of this bug. ***
Comment 16 SpanKY gentoo-dev 2012-05-20 13:56:47 UTC
pretty sure this isn't a bug in libtool.  you should be outputting to xxx.la, not xxx.so, if you want to create shared libs with libtool.

since the output didn't end in an .la, libtool thinks you're creating a program, not a shared library, and so links it accordingly (which is why you get an error related to missing main).

most likely you want to do something like:
driver.la:
   ${LIBTOOL_MODE_LINK} @SO_LD@ -o $@ driver.@O@ -module -avoid-version \
       -rpath $(LIBDIR)
driver.@SO@: driver.la
   ln -s .libs/$@ $@
Comment 17 Christian Ruppert (idl0r) gentoo-dev 2012-05-21 15:55:02 UTC
*** Bug 416841 has been marked as a duplicate of this bug. ***
Comment 18 Phil Stracchino (Unix Ronin) 2012-05-22 12:08:23 UTC
This bug also affects net-dns/bind-9.9.1.  The same fix with the same patch works.
Comment 19 J.C. Wren 2012-05-27 16:49:25 UTC
Shouldn't disabling dlz with -dlz remove any dependency requirements on mysql and berkdb?

I have a very small household DNS running on bind, and don't need dlz. But to get it to compile, I have to spec -dlz -mysql -berkdb.
Comment 20 Phil Stracchino (Unix Ronin) 2012-06-05 13:45:02 UTC
This bug is not dependent upon USE=dlz, by the way.  It also occurs without it, and the same patch fixes it either way.

The failure is still present in bind-9.9.1_p1:

libtool: link: x86_64-pc-linux-gnu-gcc -o driver.so .libs/driver.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make[4]: *** [driver.so] Error 1
make[4]: Leaving directory `/var/tmp/portage/net-dns/bind-9.9.1_p1/work/bind-9.9.1-P1/bin/tests/system/dlzexternal'
make[3]: *** [subdirs] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-dns/bind-9.9.1_p1/work/bind-9.9.1-P1/bin/tests/system'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-dns/bind-9.9.1_p1/work/bind-9.9.1-P1/bin/tests'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-dns/bind-9.9.1_p1/work/bind-9.9.1-P1/bin'
make: *** [subdirs] Error 1
 * ERROR: net-dns/bind-9.9.1_p1 failed (compile phase):
 *   emake failed


And the patch still fixes the problem.  Part of the problem here seems to be that the build is still descending into dlzexternal even if you told it not to use DLZ.  The other part of the problem is that it appears the dlzexternal code has a link problem.
Comment 21 Christian Ruppert (idl0r) gentoo-dev 2012-06-05 14:58:30 UTC
tests are now disabled, for now.. So this error shouldn't occur again.
Comment 22 Matt Lessins 2012-06-07 18:34:02 UTC
This also seems to happening in 9.8.3-p1
Comment 23 Anton Kochkov 2012-06-19 00:24:54 UTC
just emerged 9.9.1_p1 version from main tree - it now builds ok with and without dlz.