# Can't emerge cyrus-sasl-2.1.22 with USE="ldap" [SOLVED]

## fitzy

I usually manage to find solutions on the forums, but this one has me beat!

I'm attempting to follow the Gentoo Guide to OpenLDAP Authentication (I know it's mostly out of date but that's not the problem).  When I try to emerge cyrus-sasl with USE="ldap" I get the following error:

```
[ebuild   R   ] dev-libs/cyrus-sasl-2.1.22  USE="authdaemond crypt gdbm ldap* mysql pam ssl -berkdb -java -kerberos -ntlm_unsupported_patch -postgres -sample -srp -urandom" 0 kB

<snipped>

i686-pc-linux-gnu-gcc -Wall -W -O3 -march=i686 -funroll-loops -pipe -o .libs/dbconverter-2 dbconverter-2.o  ../sasldb/.libs/libsasldb.a ../lib/.libs/libsasl2.so -ldl /usr/lib/libgdbm.so -lresolv

../lib/.libs/libsasl2.so: undefined reference to `crypt'

collect2: ld returned 1 exit status

make[2]: *** [dbconverter-2] Error 1

make[2]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.22/work/cyrus-sasl-2.1.22/utils'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/cyrus-sasl-2.1.22/work/cyrus-sasl-2.1.22'

make: *** [all] Error 2

!!! ERROR: dev-libs/cyrus-sasl-2.1.22 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  cyrus-sasl-2.1.22.ebuild, line 166:   Called die

!!! compile problem

!!! If you need support, post the topmost build error, and the call stack if relevant.

```

The results of emerge --info:

```
www openldap # emerge --info

Portage 2.1.1 (default-linux/x86/2006.0, gcc-vanilla, glibc-2.4-r3, 2.6.11-hardened-r15 i686)

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

System uname: 2.6.11-hardened-r15 i686 Celeron (Coppermine)

Gentoo Base System version 1.12.5

Last Sync: Tue, 24 Oct 2006 14:00:01 +0000

app-admin/eselect-compiler: [Not Present]

dev-java/java-config: [Not Present]

dev-lang/python:     2.3.5-r2, 2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     [Not Present]

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.17

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-r2

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.13-r4

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.4.19, 2.6.17-r1

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O3 -march=i686 -funroll-loops -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-O3 -march=i686 -funroll-loops -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LINGUAS=""

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

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

USE="x86 acpi apache2 apm arts authdaemond bitmap-fonts cgi chroot cli cracklib crypt dlloader dri eds elibc_glibc emboss encode esd fam flash foomaticdb fortran frxp gdbm geoip gif gpm gstreamer gtk2 imap imlib input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog jpeg kde kernel_linux ldap libg++ libwww mad maildir mikmod motif mp3 mpeg mysql ncurses nls nodoc nptl nptlonly ogg opengl openssl oss pam pam-mysql pcre perl php png pppd python qt3 qt4 quicktime readline reflection sasl sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev userland_GNU vhosts video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis xml xorg xv zlib"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

I'm out of ideas!  I don't really know what the "undefined reference to crypt" means.  Anyone able to help?Last edited by fitzy on Sun Nov 05, 2006 6:33 am; edited 1 time in total

----------

## zsitvaij

Not an ldap problem.

https://bugs.gentoo.org/show_bug.cgi?id=152544

----------

## thecooptoo

ive followed the instructions for the patch and now get this 

```
grenada files # emerge -p cyrus-sasl

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] net-nds/openldap-2.3.27-r2  USE="berkdb crypt gdbm perl readline samba sasl ssl tcpd -debug -ipv6 -kerberos -minimal -odbc -overlays (-selinux) -slp -smbkrb5passwd"

[ebuild  N    ] dev-libs/cyrus-sasl-2.1.22  USE="berkdb crypt gdbm ldap mysql pam ssl -authdaemond -java -kerberos -ntlm_unsupported_patch -postgres -sample -srp -urandom"

grenada files #     
```

and then after a bit 

```
checking for sasl.h... no

configure: error: Could not locate Cyrus SASL

!!! Please attach the following file when filing a report to bugs.gentoo.org:

!!! /var/tmp/portage/openldap-2.3.27-r2/work/openldap-2.3.27/config.log

!!! ERROR: net-nds/openldap-2.3.27-r2 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  openldap-2.3.27-r2.ebuild, line 284:   Called econf '--enable-static' '--enable-shared' '--libexecdir=/usr/lib/openldap' '--enabl                       e-slapd' '--enable-slurpd' '--enable-ldbm' '--enable-bdb' '--enable-ldbm-api=berkeley' '--enable-hdb=mod' '--enable-passwd=mod' '--                       enable-phonetic=mod' '--enable-dnssrv=mod' '--enable-ldap' '--enable-meta=mod' '--enable-monitor=mod' '--enable-null=mod' '--enable                       -shell=mod' '--enable-relay=mod' '--enable-perl=mod' '--disable-sql' '--enable-crypt' '--disable-slp' '--enable-rewrite' '--enable-                       rlookups' '--enable-aci' '--enable-modules' '--enable-cleartext' '--enable-slapi' '--with-lmpasswd' '--enable-dyngroup' '--enable-p                       roxycache' '--disable-overlays' '--enable-syslog' '--enable-dynamic' '--enable-local' '--enable-proctitle' '--disable-ipv6' '--enab                       le-readline' '--with-cyrus-sasl' '--enable-spasswd' '--enable-wrappers' '--with-tls'

  ebuild.sh, line 540:   Called die

!!! econf failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

grenada files #                                                                   
```

----------

## .:chrome:.

mask 2.1.22 version and use 2.1.21

----------

## thecooptoo

```

grenada files # emerge -p cyrus-sasl

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] net-nds/openldap-2.3.27-r2  USE="berkdb crypt gdbm perl readline samba sasl ssl tcpd -debug -ipv6 -kerberos -minimal -odbc -overlays (-selinux) -slp -smbkrb5passwd"

[ebuild  N    ] dev-libs/cyrus-sasl-2.1.21-r2  USE="berkdb crypt gdbm ldap mysql pam ssl -authdaemond -java -kerberos -ntlm_unsupported_patch -postgres -sample -srp -urandom"

grenada files #                      
```

and  then 

```
checking for sasl.h... no

configure: error: Could not locate Cyrus SASL

!!! Please attach the following file when filing a report to bugs.gentoo.org:

!!! /var/tmp/portage/openldap-2.3.27-r2/work/openldap-2.3.27/config.log

!!! ERROR: net-nds/openldap-2.3.27-r2 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  openldap-2.3.27-r2.ebuild, line 284:   Called econf '--enable-static' '--enable-shared' '--libexecdir=/usr/lib/openldap' '--enable-slapd' '--enable-slurpd' '--enable-ldbm' '--enable-bdb' '--enable-ldbm-api=berkeley' '--enable-hdb=mod' '--enable-passwd=mod' '--enable-phonetic=mod' '--enable-dnssrv=mod' '--enable-ldap' '--enable-meta=mod' '--enable-monitor=mod' '--enable-null=mod' '--enable-shell=mod' '--enable-relay=mod' '--enable-perl=mod' '--disable-sql' '--enable-crypt' '--disable-slp' '--enable-rewrite' '--enable-rlookups' '--enable-aci' '--enable-modules' '--enable-cleartext' '--enable-slapi' '--with-lmpasswd' '--enable-dyngroup' '--enable-proxycache' '--disable-overlays' '--enable-syslog' '--enable-dynamic' '--enable-local' '--enable-proctitle' '--disable-ipv6' '--enable-readline' '--with-cyrus-sasl' '--enable-spasswd' '--enable-wrappers' '--with-tls'

  ebuild.sh, line 540:   Called die

!!! econf failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

grenada files #                                                                     
```

----------

## Januszzz

Well,

this problem in fact exists for a year or so and none of Gentoo devs seems to have ever try to resolve it. In June I started virtualmailhosting based on ldap and for me solution was the following:

1. USE=-ldap emerge cyrus-sasl

2. emerge openldap

3. USE=ldap emerge cyrus-sasl

4. emerge openldap

That worked for me and I guess it is so called "circulal dependencies"

BTW I've found this post now becuse I have other serious problem with ldap which also exists for a half a year or longer and of course still isn't solved.

----------

## fitzy

Thanks for the help.  I've managed to resolve the problem.

For the record - the instructions at https://bugs.gentoo.org/show_bug.cgi?id=152544 by Herbert Nachtnebel worked for me except there's a typo in his instructions.  Where he writes "<filename>.epatch" he means "<filename>.ebuild"

I also hear the new cyrus-sasl ebuild (2.1.22-r1) apparently fixes this error, although I haven't tested it myself.

----------

## Gentoo613

Just a FYI... I've been trying to install cyrus-sasl-2.1.22-r1 and openldap 2.3.27-r2 and this problem still exists.  Althought the USE flag "fix" (posted above) is working for me.

----------

## nandelbosc

Hi gurus!

I need to install cyrus-sasl but I have a configure error with openldap...

```
vito ~ # emerge -pv cyrus-sasl

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] net-nds/openldap-2.3.27-r2  USE="berkdb crypt ipv6 perl samba sasl ssl tcpd -debug -gdbm -kerberos -minimal -odbc -overlays -readline (-selinux) -slp -smbkrb5passwd" 0 kB

[ebuild  N    ] dev-libs/cyrus-sasl-2.1.22-r1  USE="berkdb crypt java ldap mysql pam ssl -authdaemond -gdbm -kerberos -ntlm_unsupported_patch -postgres -sample -srp -urandom" 0 kB

Total size of downloads: 0 kB
```

when try to emerge:

```

vito# emerge syrus-sasl

....

checking for sasl.h... no

configure: error: Could not locate Cyrus SASL

!!! Please attach the following file when filing a report to bugs.gentoo.org:

!!! /var/tmp/portage/openldap-2.3.27-r2/work/openldap-2.3.27/config.log

!!! ERROR: net-nds/openldap-2.3.27-r2 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  openldap-2.3.27-r2.ebuild, line 284:   Called econf '--enable-static' '--enable-shared' '--libexecdir=/usr/lib64/openldap' '--enable-slapd' '--enable-slurpd' '--enable-ldbm' '--enable-bdb' '--enable-ldbm-api=berkeley' '--enable-hdb=mod' '--enable-passwd=mod' '--enable-phonetic=mod' '--enable-dnssrv=mod' '--enable-ldap' '--enable-meta=mod' '--enable-monitor=mod' '--enable-null=mod' '--enable-shell=mod' '--enable-relay=mod' '--enable-perl=mod' '--disable-sql' '--enable-crypt' '--disable-slp' '--enable-rewrite' '--enable-rlookups' '--enable-aci' '--enable-modules' '--enable-cleartext' '--enable-slapi' '--with-lmpasswd' '--enable-dyngroup' '--enable-proxycache' '--disable-overlays' '--enable-syslog' '--enable-dynamic' '--enable-local' '--enable-proctitle' '--enable-ipv6' '--disable-readline' '--with-cyrus-sasl' '--enable-spasswd' '--enable-wrappers' '--with-tls'

  ebuild.sh, line 540:   Called die

!!! econf failed

!!! If you need support, post the topmost build error, and the call stack if relevant.
```

emerge info:

```

vito ~ # emerge --info

Portage 2.1.1-r2 (default-linux/amd64/2006.1/server, gcc-4.1.1, glibc-2.4-r4, 2.6.17-gentoo-r8 x86_64)

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

System uname: 2.6.17-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3500+

Gentoo Base System version 1.12.6

Last Sync: Sun, 19 Nov 2006 16:30:01 +0000

app-admin/eselect-compiler: [Not Present]

dev-java/java-config: 1.3.7, 2.0.30

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     [Not Present]

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.60

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.13-r4

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://ftp.gentoo.or.kr/ http://mymirror.asiaosc.org/gentoo/ http://gentoo.kems.net ftp://mirror.bih.net.ba/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo"

LINGUAS="ca"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

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

USE="amd64 amuled apache2 apic berkdb calendar clflush cli cmov cracklib crypt cups cx8 de dlloader dri elibc_glibc epson exif extensions ffmpeg foomatic foomaticdb fortran fpu ftp fxsr fxsr_opt gd gdbmsamba gimp-print gimpprint gpm iconv imagemagick imap input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg2k kernel_linux lahf_lm ldap libclamav libg++ linguas_ca lm maildir mailwrapper mca mce mpeg msr mtrr mysql ncurses network nls nptl nptlonly nx pae pam pat pcre perl pge php png pni ppds pppd pse pse36 qmail reflection remote samba sasl sep session snmp spamassassin spl sqlite ssl stats syscall tcpd tiff tsc udev unicode unzip userland_GNU vhosts video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vme xml xorg zip zlib zlib2"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

If I try to emerge openldap first...

```
vito ~ # emerge -pv openldap

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] dev-libs/cyrus-sasl-2.1.22-r1  USE="berkdb crypt java ldap mysql pam ssl -authdaemond -gdbm -kerberos -ntlm_unsupported_patch -postgres -sample -srp -urandom" 0 kB

[ebuild  N    ] net-nds/openldap-2.3.27-r2  USE="berkdb crypt ipv6 perl samba sasl ssl tcpd -debug -gdbm -kerberos -minimal -odbc -overlays -readline (-selinux) -slp -smbkrb5passwd" 0 kB

Total size of downloads: 0 kB

```

```
vito# emerge openldap

....

checking OpenLDAP version... no

configure: error: Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible

!!! Please attach the following file when filing a report to bugs.gentoo.org:

!!! /var/tmp/portage/cyrus-sasl-2.1.22-r1/work/cyrus-sasl-2.1.22/config.log

!!! ERROR: dev-libs/cyrus-sasl-2.1.22-r1 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  cyrus-sasl-2.1.22-r1.ebuild, line 152:   Called econf '--with-saslauthd=/var/lib/sasl2' '--with-pwcheck=/var/lib/sasl2' '--with-configdir=/etc/sasl2' '--with-plugindir=/usr/lib64/sasl2' '--with-dbpath=/etc/sasl2/sasldb2' '--enable-login' '--enable-ntlm' '--enable-auth-sasldb' '--disable-krb4' '--disable-otp' '--with-openssl' '--with-pam' '--with-ldap' '--enable-ldapdb' '--disable-sample' '--disable-gssapi' '--with-mysql' '--enable-mysql' '--disable-postgres' '--disable-srp' '--enable-java' '--with-javahome=/opt/blackdown-jdk-1.4.2.03' '--without-authdaemond' '--enable-sql' '--with-dblib=berkeley'

  ebuild.sh, line 540:   Called die

!!! econf failed

!!! If you need support, post the topmost build error, and the call stack if relevant.
```

----------

## nixnut

merged above post here.

----------

## nandelbosc

You really think is the same problem?

----------

## nandelbosc

Sorry for bugging. I solved it whith three simple steps (without use patch):

# USE="-ldap" emerge cyrus-sasl

# emerge openldap

# emerge cyrus-sasl

Bye!   :Laughing: 

----------

## b1f30

 *nandelbosc wrote:*   

> Sorry for bugging. I solved it whith three simple steps (without use patch):
> 
> # USE="-ldap" emerge cyrus-sasl
> 
> # emerge openldap
> ...

 

Nice work with the quick and clean instructions. Worked like a charm.

Cheers!

~b1f

----------

## Inodoro_Pereyra

 *Quote:*   

> Sorry for bugging. I solved it whith three simple steps (without use patch): 
> 
> # USE="-ldap" emerge cyrus-sasl 
> 
> # emerge openldap 
> ...

 

Dude, you save my life today!! (BTW cyrus-sasl-2.1.22-r1 seems to have the same problem)

----------

