Bug 207687 - [patch] sysutils/am-utils LDAP + gdbm_compat
Summary: [patch] sysutils/am-utils LDAP + gdbm_compat
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
Keywords: patch
Depends on:
Reported: 2016-03-04 00:01 UTC by Lawrence Chen
Modified: 2018-01-13 07:18 UTC (History)
2 users (show)

See Also:

patch (2.62 KB, patch)
2016-03-04 00:01 UTC, Lawrence Chen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lawrence Chen 2016-03-04 00:01:20 UTC
Created attachment 167699 [details]

I ran into the same problem that was encountered in bug #201140.  Kind of disappointing that it was just closed without a fix...

The original submitter started the change by switching to using "OPENLDAP_CONFIGURE_WITH", but didn't know how to complete the conversion of the other options.

My patch starts by completing this work.  After which I delved into why it was a problem.

The issue comes from having installed 'databases/gdbm' with COMPAT (not default) option set.  Where setting ldflags and cppflags so that configure can find the openldap-client port, causes its ndbm check to stumble if gdbm/ndbm is installed.  It doesn't correctly handle where it finds 'ndbm.h', in /usr/local/include from gdbm, and the dbm_open function is in libc.  It has a check to look for dbm_pagfno to see if ndbm.h came from gdbm, but this section doesn't reference -lgdbm_compat.  And, its testing if the library is -lndbm.  But, when its checking if 'dbm_open' is in 'libc', it doesn't check if gdbm/ndbm is in play.

I added a patch to configure.ac to address this.

While the section in 'configure' that does check for '-lgdbm_compat' is based on Debian and the header file being named 'gdbm-ndbm.h'.

Of course, the port builds fine in poudriere, because the build jail won't have gdbm installed.  And, poudriere is how I would build the port if I had decided to deploy it.

As it is, I'm not going to use this, since it doesn't do NFSv4 on FreeBSD (it only does Linux, and after a couple of days I had enough of trying to figure things out...I've decided I didn't need it anyways.  (only doing NFSv4 from FreeBSD to OSX, can stay with NFSv3 for Linux to FreeBSD.   OSX runs its own Dropbox, only FreeBSD needs to mount the share from Linux.)
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-13 04:34:37 UTC
Maintainer feedback? (Or is it still relevant?).
Comment 2 commit-hook freebsd_committer 2018-01-13 07:18:45 UTC
A commit references this bug:

Author: cy
Date: Sat Jan 13 07:18:02 UTC 2018
New revision: 458892
URL: https://svnweb.freebsd.org/changeset/ports/458892

  Fix build with OPENLDAP and gdbm-compatibility.

  PR:		204140, 207687
  Submitted by:	Lawrence Chen <beastie@tardisi.com>