# Can't get bind-9.9.0 to compile

## LubosD

Hello,

the compilation of bind-9.9.0 always crashes for me:

```
/bin/sh /var/tmp/portage/net-dns/bind-9.9.0/work/bind-9.9.0/libtool --mode=link --tag=CC  x86_64-pc-linux-gnu-gcc -O2 -pipe -mmmx -msse -msse2 -I/usr/include/db4.8 -fPIC -Wl,-O1 -Wl,--as-needed \

        -o dlopen dlopen.lo -ldl -lcap -lpthread 

libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -mmmx -msse -msse2 -I/usr/include/db4.8 -fPIC -Wl,-O1 -Wl,--as-needed -o dlopen .libs/dlopen.o  -ldl -lcap -lpthread

/bin/sh /var/tmp/portage/net-dns/bind-9.9.0/work/bind-9.9.0/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

make[4]: *** [driver.so] Error 1

```

Googling the error got me nowhere. Does anyone have an idea what could be wrong?

Thanks!

----------

## Splink

Think this may go under portage and programming. 

paste your emerge --info here and your emerge -vp bind.

----------

## LubosD

Apparently, if I disable DLZ support, it works...

emerge -vp bind

```
Calculating dependencies... done!

[ebuild     U  ] net-dns/bind-9.9.0 [9.8.1_p1] USE="berkdb caps dlz ipv6 ssl threads -doc -geoip -gost -gssapi -idn -ldap -mysql -odbc -pkcs11 -postgres -rpz -sdb-ldap (-selinux) -static-libs% -urandom -xml" 0 kB

```

emerge --info

```
Portage 2.1.10.49 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.2.1-gentoo-r2 x86_64)

=================================================================

System uname: Linux-3.2.1-gentoo-r2-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4600+-with-gentoo-2.1

Timestamp of tree: Mon, 12 Mar 2012 08:15:01 +0000

ccache version 3.1.7 [disabled]

app-shells/bash:          4.2_p20

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.7.2-r3, 3.2.2

dev-util/ccache:          3.1.7

dev-util/cmake:           2.8.7-r5

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.1

sys-apps/openrc:          0.9.9.3

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.9.6-r3, 1.11.3

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.4.6-r1, 4.5.3-r2

sys-devel/gcc-config:     1.5.1

sys-devel/libtool:        2.4.2

sys-devel/make:           3.82-r3

sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers)

sys-libs/glibc:           2.14.1-r2

Repositories: gentoo vdr-testing vdr-devel benf hwoarang arcon x-portage

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -mmmx -msse -msse2"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe -mmmx -msse -msse2"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://gentoo.mirror.web4u.cz/ ftp://ftp.sh.cvut.cz/MIRRORS/gentoo"

LANG="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

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="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/var/lib/layman/vdr-testing /var/lib/layman/vdr-devel /var/lib/layman/benf /var/lib/layman/hwoarang /var/lib/layman/arcon /usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pch pcre pppd qt3support readline session sse sse2 ssl sysfs tcpd unicode usb xinetd xorg 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="proxy alias cgi deflate rewrite setenvif mime include expires autoindex dir log_config auth_basic authn_file authn_default vhost_alias proxy_http filter authz_host actions env" APACHE2_MPMS="event" 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## Simba7

I've been having this same issue with all the systems I've tried to update.. even fresh installs.

I've tried to update to bind 9.9.0 on mostly i686 systems and a few i586 systems with it failing with that particular error.

----------

## kinders

I have same error, amd64.

----------

## Hu

I was going to post that we have enough "Me too" reports to file a bug, but it seems someone is ahead of us.  net-dns/bind-9.9.0 USE=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' was filed 2012-03-01 09:15:28 UTC.

----------

