# Missing SQL Headers

## madjaz

```
livecd root # emerge --emptytree system --resume *** Resuming merge...

>>> emerge (1 of 86) net-nds/openldap-2.1.30-r4 to /

>>> md5 files   ;-) openldap-2.1.30-r3.ebuild

>>> md5 files   ;-) openldap-2.2.27.ebuild

>>> md5 files   ;-) openldap-2.1.30-r5.ebuild

>>> md5 files   ;-) openldap-2.2.24.ebuild

>>> md5 files   ;-) openldap-2.1.27.ebuild

>>> md5 files   ;-) openldap-2.1.30-r2.ebuild

>>> md5 files   ;-) openldap-2.2.26-r2.ebuild

>>> md5 files   ;-) openldap-2.2.26.ebuild

>>> md5 files   ;-) openldap-2.1.30-r4.ebuild

>>> md5 files   ;-) openldap-2.2.27-r1.ebuild

>>> md5 files   ;-) openldap-2.2.23-r1.ebuild

>>> md5 files   ;-) openldap-2.2.23.ebuild

>>> md5 files   ;-) openldap-2.2.19.ebuild

>>> md5 files   ;-) openldap-2.2.14.ebuild

>>> md5 files   ;-) openldap-2.1.30.ebuild

>>> md5 files   ;-) openldap-2.1.26.ebuild

>>> md5 files   ;-) openldap-2.1.30-r1.ebuild

>>> md5 files   ;-) openldap-2.1.27-r1.ebuild

>>> md5 files   ;-) openldap-2.2.26-r1.ebuild

>>> md5 files   ;-) files/openldap-2.2.26-tls-fix-connection-test.patch

>>> md5 files   ;-) files/gencert.sh-2.2.27

>>> md5 files   ;-) files/gencert.sh

>>> md5 files   ;-) files/openldap-2.1.30-db40.patch

>>> md5 files   ;-) files/digest-openldap-2.1.27-r1

>>> md5 files   ;-) files/digest-openldap-2.1.30-r1

>>> md5 files   ;-) files/digest-openldap-2.1.30-r2

>>> md5 files   ;-) files/digest-openldap-2.1.30-r3

>>> md5 files   ;-) files/digest-openldap-2.1.30-r4

>>> md5 files   ;-) files/digest-openldap-2.1.30-r5

>>> md5 files   ;-) files/openldap-2.1.30-tls-activedirectory-hang-fix.patch

>>> md5 files   ;-) files/openldap-2.2.14-db40.patch

>>> md5 files   ;-) files/digest-openldap-2.2.23-r1

>>> md5 files   ;-) files/digest-openldap-2.2.26-r1

>>> md5 files   ;-) files/digest-openldap-2.2.26-r2

>>> md5 files   ;-) files/digest-openldap-2.2.27-r1

>>> md5 files   ;-) files/openldap-2.2.14-perlthreadsfix.patch

>>> md5 files   ;-) files/openldap-2.1.27-perlthreadsfix.patch

>>> md5 files   ;-) files/digest-openldap-2.1.26

>>> md5 files   ;-) files/digest-openldap-2.1.27

>>> md5 files   ;-) files/digest-openldap-2.1.30

>>> md5 files   ;-) files/digest-openldap-2.2.14

>>> md5 files   ;-) files/digest-openldap-2.2.19

>>> md5 files   ;-) files/digest-openldap-2.2.23

>>> md5 files   ;-) files/digest-openldap-2.2.24

>>> md5 files   ;-) files/digest-openldap-2.2.26

>>> md5 files   ;-) files/digest-openldap-2.2.27

>>> md5 files   ;-) files/openldap-2.1.27-db40.patch

>>> md5 files   ;-) files/openldap-2.1.30-ximian_connector.patch

>>> md5 files   ;-) files/2.0/slapd

>>> md5 files   ;-) files/2.0/slapd.conf

>>> md5 files   ;-) files/2.0/slurpd

>>> md5 src_uri ;-) openldap-2.1.30.tgz

>>> Unpacking source...

>>> Unpacking openldap-2.1.30.tgz to /var/tmp/portage/openldap-2.1.30-r4/work

 * Applying openldap-2.1.30-db40.patch ...                                                                                                             [ ok ] * Applying openldap-2.1.30-tls-activedirectory-hang-fix.patch ...                                                                                     [ ok ] * Applying openldap-2.1.27-perlthreadsfix.patch ...                                                                                                   [ ok ] * Applying openldap-2.1.30-ximian_connector.patch ...                                                                                                 [ ok ]configure.in:2337: warning: AC_TRY_RUN called without default to allow cross compiling

>>> Source unpacked.

 * Using Berkeley DB for local backend

 * econf: updating openldap-2.1.30/contrib/ldapc++/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating openldap-2.1.30/contrib/ldapc++/config.sub with /usr/share/gnuconfig/config.sub

 * econf: updating openldap-2.1.30/build/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating openldap-2.1.30/build/config.sub with /usr/share/gnuconfig/config.sub

./configure --prefix=/usr --host=i386-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i386-pc-linux-gnu --enable-static --enable-shared --libexecdir=/usr/lib/openldap --enable-syslog --enable-ldap --enable-slapd --enable-slurpd --enable-crypt --enable-ipv6 --with-cyrus-sasl --enable-spasswd --with-readline --with-tls --with-lmpasswd --enable-wrappers --enable-sql --enable-perl --enable-slp --enable-ldbm --enable-bdb --with-ldbm-api=berkeley --enable-dynamic --enable-modules --enable-rewrite --enable-rlookups --enable-passwd --enable-phonetic --enable-dnssrv --enable-ldap --enable-meta --enable-monitor --enable-null --enable-shell --enable-local --enable-proctitle

Copyright 1998-2004 The OpenLDAP Foundation,  All Rights Reserved.

        Restrictions apply, see COPYRIGHT and LICENSE files.

Configuring OpenLDAP 2.1.30-Release ...

checking host system type... i386-pc-linux-gnu

checking target system type... i386-pc-linux-gnu

checking build system type... i386-pc-linux-gnu

checking for a BSD compatible install... /bin/install -c

checking whether build environment is sane... yes

checking for mawk... no

checking for gawk... gawk

checking whether make sets ${MAKE}... yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking for gnutar... no

checking for gtar... gtar

checking configure arguments... done

checking for a BSD compatible install... /bin/install -c

checking for cc... cc

checking for ar... ar

checking for Cygwin environment... no

checking for mingw32 environment... no

checking how to run the C preprocessor... cc -E

checking for gcc... (cached) cc

checking whether the C compiler (cc -Os -fno-ident -march=pentium4 -fomit-frame-pointer -momit-leaf-frame-pointer -pipe -Wl,-O1) works... yes

checking whether the C compiler (cc -Os -fno-ident -march=pentium4 -fomit-frame-pointer -momit-leaf-frame-pointer -pipe -Wl,-O1) is a cross-compiler... no

checking whether we are using GNU C... yes

checking whether cc accepts -g... yes

checking for ld used by GCC... /usr/i386-pc-linux-gnu/bin/ld

checking if the linker (/usr/i386-pc-linux-gnu/bin/ld) is GNU ld... yes

checking for /usr/i386-pc-linux-gnu/bin/ld option to reload object files... -r

checking for BSD-compatible nm... /usr/bin/nm -B

checking for a sed that does not truncate output... /bin/sed

checking whether ln -s works... yes

checking how to recognise dependent libraries... pass_all

checking for object suffix... o

checking for executable suffix... no

checking command to parse /usr/bin/nm -B output... ok

checking for dlfcn.h... yes

checking for ranlib... ranlib

checking for strip... strip

checking for objdir... .libs

checking for cc option to produce PIC... -fPIC

checking if cc PIC flag -fPIC works... yes

checking if cc static flag -static works... yes

checking if cc supports -c -o file.o... yes

checking if cc supports -c -o file.lo... yes

checking if cc supports -fno-rtti -fno-exceptions... yes

checking whether the linker (/usr/i386-pc-linux-gnu/bin/ld) supports shared libraries... yes

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking for shl_load... no

checking for shl_load in -ldld... no

checking for dlopen... no

checking for dlopen in -ldl... yes

checking whether a program can dlopen itself... yes

checking whether a statically linked program can dlopen itself... no

checking whether -lc should be explicitly linked in... no

creating libtool

checking whether ln works... yes

checking whether ln -s works... (cached) yes

checking for perl... /usr/bin/perl

checking how to run the C preprocessor... cc -E

checking for Cygwin environment... (cached) no

checking for mingw32 environment... (cached) no

checking for executable suffix... (cached) no

checking for object suffix... (cached) o

checking for be_app in -lbe... no

checking for cc option to accept ANSI C... none needed

checking for cc depend flag... -M

checking for afopen in -ls... no

checking for ltdl.h... yes

checking for lt_dlinit in -lltdl... yes

checking for EBCDIC... no

checking for ANSI C header files... yes

checking for dirent.h that defines DIR... yes

checking for opendir in -ldir... no

checking for sys/wait.h that is POSIX.1 compatible... yes

checking POSIX termios... yes

checking whether use of TIOCGWINSZ requires sys/ioctl.h... yes

checking for arpa/inet.h... yes

checking for arpa/nameser.h... yes

checking for assert.h... yes

checking for conio.h... no

checking for crypt.h... yes

checking for direct.h... no

checking for errno.h... yes

checking for fcntl.h... yes

checking for filio.h... no

checking for getopt.h... yes

checking for grp.h... yes

checking for io.h... no

checking for libutil.h... no

checking for limits.h... yes

checking for locale.h... yes

checking for netinet/tcp.h... yes

checking for malloc.h... yes

checking for memory.h... yes

checking for psap.h... no

checking for pwd.h... yes

checking for process.h... no

checking for resolv.h... yes

checking for sgtty.h... yes

checking for shadow.h... yes

checking for stddef.h... yes

checking for string.h... yes

checking for strings.h... yes

checking for sysexits.h... yes

checking for sys/file.h... yes

checking for sys/filio.h... no

checking for sys/errno.h... yes

checking for sys/ioctl.h... yes

checking for sys/param.h... yes

checking for sys/resource.h... yes

checking for sys/select.h... yes

checking for sys/socket.h... yes

checking for sys/stat.h... yes

checking for sys/syslog.h... yes

checking for sys/time.h... yes

checking for sys/types.h... yes

checking for sys/ucred.h... no

checking for sys/uio.h... yes

checking for syslog.h... yes

checking for termios.h... yes

checking for unistd.h... yes

checking for winsock.h... no

checking for winsock2.h... no

checking for dlopen... (cached) no

checking for dlopen in -ldl... (cached) yes

checking for sigset in -lV3... no

checking for winsock... no

checking for socket... yes

checking for select... yes

checking types of arguments for select()... int,fd_set *,struct timeval *

checking for regex.h... yes

checking for library containing regfree... none required

checking for compatible POSIX regex... yes

checking for sys/uuid.h... no

checking to see if -lrpcrt4 is needed for win32 UUID support... no

checking for res_query... no

checking for __res_query... no

checking for res_query in -lbind... no

checking for __res_query in -lbind... no

checking for res_query in -lresolv... yes

checking for getaddrinfo... yes

checking for getnameinfo... yes

checking for gai_strerror... yes

checking for inet_ntop... yes

checking INET6_ADDRSTRLEN... yes

checking struct sockaddr_storage... yes

checking for sys/un.h... yes

checking for openssl/ssl.h... yes

checking for ssl.h... no

checking for SSLeay_add_ssl_algorithms in -lssl... no

checking for SSL_library_init in -lssl... yes

checking for _beginthread... no

checking for pthread.h... yes

checking POSIX thread version... 10

checking for LinuxThreads pthread.h... yes

checking for GNU Pth pthread.h... no

checking for sched.h... yes

checking for pthread_create in default libraries... no

checking for pthread link with -kthread... no

checking for pthread link with -pthread... yes

checking for sched_yield... yes

checking for pthread_yield... yes

checking for thr_yield... no

checking for pthread_kill... yes

checking for pthread_rwlock_destroy... yes

checking for pthread_detach with <pthread.h>... yes

checking for pthread_setconcurrency... yes

checking for pthread_getconcurrency... yes

checking for thr_setconcurrency... no

checking for thr_getconcurrency... no

checking for pthread_kill_other_threads_np... yes

checking for LinuxThreads implementation... yes

checking for LinuxThreads consistency... yes

checking if pthread_create() works... yes

checking if select yields when using pthreads... yes

checking for thread specific errno... yes

checking for thread specific h_errno... yes

checking for ctime_r... yes

checking for gethostbyname_r... yes

checking for gethostbyaddr_r... yes

checking number of arguments of ctime_r... 2

checking number of arguments of gethostbyname_r... 6

checking number of arguments of gethostbyaddr_r... 8

checking for db.h... yes

checking for Berkeley DB link (default)... no

checking for Berkeley DB link (-ldb42)... no

checking for Berkeley DB link (-ldb-42)... no

checking for Berkeley DB link (-ldb-4.2)... yes

checking for Berkeley DB thread support... yes

checking Berkeley DB version for BDB backend... yes

checking for tcpd.h... yes

checking for TCP wrappers library... -lwrap

checking for openlog... yes

checking for sql.h... no

configure: error: could not locate SQL headers

!!! Please attach the config.log to your bug report:

!!! /var/tmp/portage/openldap-2.1.30-r4/work/openldap-2.1.30/config.log

!!! ERROR: net-nds/openldap-2.1.30-r4 failed.

!!! Function econf, Line 485, Exitcode 0

!!! econf failed

!!! If you need support, post the topmost build error, NOT this status message.
```

What do i do now?

----------

## Arno Nymous

Well I am not sure but I think, those headers "sql.h" are provided by "dev-db/unixOdbc". Emerge this and try again. unixOdbc is a dependency of openldap, so there shouldn't be a problem.

----------

## Maedhros

Moved from Installing Gentoo to Networking & Security.

----------

## rmdegennaro

 *Arno Nymous wrote:*   

> Well I am not sure but I think, those headers "sql.h" are provided by "dev-db/unixOdbc". Emerge this and try again. unixOdbc is a dependency of openldap, so there shouldn't be a problem.

 

I am very new to Gentoo, and slightly new to Linux.  So I apologize in advance for my bumbling.  I just saw this behaviour as well.  I added a few DBMS entries and LDAP to my USE list.  I did "emerge --update --deep --newuse world" and it kept getting hung up on not finding SQL headers (sql.h) for OpenLDAP.  

I then did "emerge openldap", which worked fine.  And then "emerge --update --deep --newuse world" again, and its compiling away without problem now.   

If anyone else is reading this, I would like to learn and know why.  According to the quoted item, I would have thought that unixODBC would be a dependency for OpenLDAP then.  Is that not true?  Also, why did the plain emerge work, but not the "newuse update" emerge?

Thanks,

Ralph

----------

