ldap.h not found

Hello,
I'm trying to build some packages dependent on openldap, they are failed all. Building of openldap server and openldap client are failed too. I'm at FreeBSD 8.1, updated, ports collection is updated too.

The error message for every build is:
Code:
checking ldap.h presence... no
checking for ldap.h... no
===>  Script "configure" failed unexpectedly.
If I search for the file:
Code:
[root@freebsd-3070 ~]# find /usr/ports -name ldap.h
/usr/ports/net/openldap24-client/work/openldap-2.4.23/include/ldap.h
/usr/ports/net/openldap24-server/work/openldap-2.4.23/include/ldap.h
Please, help.
 
Specifics would be helpful. Which openldap server and client? There are several versions in ports.

I tried both -client23 and -client24, and not only did it not have errors, "ldap.h" was not in the configure output.

So did you see the 20101208 entry in /usr/ports/UPDATING?
 
I'm trying openldap24-client. In general, I wanted to build Apache with OpenLDAP auth module, so I did not search for any special version of OpenLDAP client. When it failed to build, I tried to build directly the OpenLDAP client mentioned in the Apahce build logs.

There is a section 20101208 in /usr/ports/UPDATING

Code:
20101208:
  AFFECTS: autotools
  AUTHOR: [email]autotools@FreeBSD.org[/email]

  Another stage in the autotools cleanup that reduces tree churn whilst
  updating components, a number of ports have now moved to non-versioned
  locations since there is now only the concept of legacy and current
  versions.

  # portmaster -o devel/autoconf devel/autoconf268
  # portmaster -o devel/automake devel/automake111
  # portmaster -o devel/libtool devel/libtool22
  # portmaster -o devel/libltdl devel/libltdl22

  substitute 'portupgrade' for 'portmaster' accordingly if that's your
  your upgrade tool of choice.

The build log for OpenLDAP client:

Code:
===>   openldap-sasl-client-2.4.23 depends on package: libtool>=2.2 - found
===>   openldap-sasl-client-2.4.23 depends on shared library: sasl2.2 - not found
===>    Verifying install for sasl2.2 in /usr/ports/security/cyrus-sasl2
===>   cyrus-sasl-2.1.23_1 depends on package: libtool>=2.2 - found
===>   cyrus-sasl-2.1.23_1 depends on shared library: mysqlclient.16 - found
===>   cyrus-sasl-2.1.23_1 depends on shared library: pq.5 - not found
===>    Verifying install for pq.5 in /usr/ports/databases/postgresql82-client
===>   postgresql-client-8.2.18_1 depends on executable: gmake - found
===>   postgresql-client-8.2.18_1 depends on shared library: intl - found
===>  Configuring for postgresql-client-8.2.18_1
checking build system type... i386-portbld-freebsd8.1
checking host system type... i386-portbld-freebsd8.1
checking which template to use... freebsd
checking whether to build with 64-bit integer date/time support... no
checking whether NLS is wanted... yes
checking for default port number... 5432
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking if cc supports -Wdeclaration-after-statement... yes
checking if cc supports -Wendif-labels... yes
checking if cc supports -fno-strict-aliasing... yes
checking if cc supports -fwrapv... yes
configure: using CFLAGS=-O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -
Wendif-labels -fno-strict-aliasing -fwrapv
checking whether the C compiler still works... yes
checking how to run the C preprocessor... cpp
checking allow thread-safe client libraries... yes
checking whether to build with Tcl... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build with Kerberos 5 support... no
checking whether to build with PAM support... no
checking whether to build with LDAP support... yes
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... yes
checking for egrep... grep -E
configure: using CPPFLAGS= -I/usr/local/include -I/usr/local/lib
configure: using LDFLAGS= -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib  -L/usr/local/lib
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for flex... /usr/bin/flex
checking whether ln -s works... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for tar... /usr/bin/tar
checking for strip... strip
checking whether it is possible to strip libraries... yes
checking for bison... bison -y
checking for perl... /usr/bin/perl
checking for main in -lm... yes
checking for library containing setproctitle... none required
checking for library containing dlopen... none required
checking for library containing socket... none required
checking for library containing shl_load... no
checking for library containing getopt_long... none required
checking for library containing crypt... -lcrypt
checking for library containing fdatasync... no
checking for library containing shmget... none required
checking for -lreadline... yes (-lreadline)
checking for inflate in -lz... yes
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking kernel/OS.h usability... no
checking kernel/OS.h presence... no
checking for kernel/OS.h... no
checking kernel/image.h usability... no
checking kernel/image.h presence... no
checking for kernel/image.h... no
checking SupportDefs.h usability... no
checking SupportDefs.h presence... no
checking for SupportDefs.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking ldap.h usability... no
checking ldap.h presence... no
checking for ldap.h... no
===>  Script "configure" failed unexpectedly.
Please report the problem to [email]girgen@FreeBSD.org[/email] [maintainer] and attach the
"/usr/ports/databases/postgresql82-client/work/postgresql-8.2.18/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. an `ls /var/db/pkg`).
*** Error code 1

Stop in /usr/ports/databases/postgresql82-client.
*** Error code 1

Stop in /usr/ports/databases/postgresql82-client.
*** Error code 1

Stop in /usr/ports/security/cyrus-sasl2.
*** Error code 1

Stop in /usr/ports/security/cyrus-sasl2.
*** Error code 1

Stop in /usr/ports/net/openldap24-client.
*** Error code 1

Stop in /usr/ports/net/openldap24-client.
 
Here's a good example of where being specific is important. First, you're trying net/openldap24-sasl-client (note the "sasl"). But that's not the problem. The error happens in databases/postgresql82-client, which is being installed as a dependency.

With the LDAP option set in the postgresql82-client options screen, the same error happens here. Some quick searching didn't find anything relevant, so I'd recommend either contacting the maintainer or filing a PR.

(PS: about that UPDATING entry: if you've already done that, disregard. The autotools setup has changed lately and those who don't follow UPDATING can experience broken builds. Appears now that it can't be blamed for this specific problem, but that won't stop me from blaming it for others!)
 
Thank you, I'll do some additional checks and contact the maintainer.

About that UPDATING entry - how can I choose if I should use portmaster or portupgrade?
 
Peter2121 said:
how can I choose if I should use portmaster or portupgrade?
Personal preference. Use one or the other and try not to use both. Portupgrade doesn't like it when other tools update ports.
 
SirDice said:
Personal preference. Use one or the other and try not to use both. Portupgrade doesn't like it when other tools update ports.

Well, portupgrade notices something has changed and has to rebuild the portsdb. I still prefer and use portupgrade-devel, but occasionally use portmaster. Can't say there have been any problems as a result of either.
 
Portmaster Portupgrade probably does it job a little better, but it uses its own database, which it creates and maintains. It also uses an additional language (ruby).
Portmaster works very well, using the files and information that the ports system maintains and uses. It also runs in sh, so there are no additional dependencies.
Make your choice!
 
robbak said:
Portmaster probably does it job a little better, but it uses it's own database, which it creates and maintains. It also uses an additional language (ruby).
That would be portupgrade ;)

More on-topic. I've been building and rebuilding several ports that depend on openldap. None of them seem to have this problem.
 
Back
Top