Bug 270465 - net/nss_ldap: fatal error: 'profile.h' file not found
Summary: net/nss_ldap: fatal error: 'profile.h' file not found
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alan Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-26 14:59 UTC by O. Hartmann
Modified: 2023-12-27 22:43 UTC (History)
9 users (show)

See Also:
bugzilla: maintainer-feedback? (des)


Attachments
Fix the build on all supported FreeBSD releases (2.39 KB, patch)
2023-11-21 17:33 UTC, Alan Somers
asomers: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2023-03-26 14:59:27 UTC
In poudriere environment, compilation of the port

net/nss_ldap

fails with the error:

[...]
ldap-init-krb5-cache.c:102:10: fatal error: 'profile.h' file not found
#include <profile.h>
         ^~~~~~~~~~~
1 error generated.
[...]

Environemnt:

[...]

=>> Building net/nss_ldap
build started at Sun Mar 26 14:53:49 UTC 2023
port directory: /usr/ports/net/nss_ldap
package name: nss_ldap-1.265_14
building for: FreeBSD poudriere.gdr 14.0-CURRENT FreeBSD 14.0-CURRENT 1400083 amd64
maintained by: des@FreeBSD.org
Makefile datestamp: -rw-r--r--  1 root  wheel  2145 Feb 12 18:37 /usr/ports/net/nss_ldap/Makefile
Ports top last git commit: 8d02989b9630
Ports top unclean checkout: no
Port dir last git commit: 6e1233be2292
Port dir unclean checkout: no
Poudriere version: poudriere-git-3.3.99.20220831
Host OSVERSION: 1400082
Jail OSVERSION: 1400083
Job Id: 01




!!! Jail is newer than host. (Jail: 1400083, Host: 1400082) !!!
!!! This is not supported. !!!
!!! Host kernel must be same or newer than jail. !!!
!!! Expect build failures. !!!



---Begin Environment---
SHELL=/bin/sh
OSVERSION=1400083
UNAME_v=FreeBSD 14.0-CURRENT 1400083
UNAME_r=14.0-CURRENT
BLOCKSIZE=K
MAIL=/var/mail/root
MM_CHARSET=UTF-8
LANG=C.UTF-8
STATUS=1
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
LOCALBASE=/usr/local
USER=root
POUDRIERE_NAME=poudriere-git
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.99.20220831
MAKEOBJDIRPREFIX=/pool/sources/CURRENT/obj/
MASTERMNT=/pool/poudriere/data/.m/head-amd64-head-default/ref
LC_COLLATE=C
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=screen
OUTPUT_REDIRECTED_STDERR=4
OUTPUT_REDIRECTED=1
PWD=/pool/poudriere/data/.m/head-amd64-head-default/01/.p
OUTPUT_REDIRECTED_STDOUT=3
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=head-amd64-head-default
SCRIPTPREFIX=/usr/local/share/poudriere
SCRIPTNAME=bulk.sh
OLDPWD=/pool/poudriere/data/.m/head-amd64-head-default/ref/.p/pool
POUDRIERE_PKGNAME=poudriere-git-3.3.99.20220831
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
POUDRIEREPATH=/usr/local/bin/poudriere
---End Environment---

---Begin Poudriere Port Flags/Env---
PORT_FLAGS=
PKGENV=
FLAVOR=
DEPENDS_ARGS=
MAKE_ARGS=
---End Poudriere Port Flags/Env---

---Begin OPTIONS List---
===> The following configuration options are available for nss_ldap-1.265_14:
     KERBEROS=on: Kerberos support
     LCLASS=on: Enable login classes via the loginClass attribute
===> Use 'make config' to modify these settings
---End OPTIONS List---
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2023-06-13 13:33:57 UTC
(In reply to O. Hartmann from comment #0)

In nss_ldap-265/ldap-init-krb5-cache.c:

#ifndef HEIMDAL
#include <profile.h>
#endif

but surely, if KERBEROS is "on" and security/krb5 is not installed, we have HEIMDAL in base? something is fishy with the heimdal discovery.
Comment 2 DutchBSD 2023-06-15 20:35:01 UTC
(In reply to Palle Girgensohn from comment #1)

i can confirm this same bug on freebsd 13.2
Comment 3 DutchBSD 2023-06-15 20:52:00 UTC
i local did undo patch:


-+	    [const char hv = heimdal_version;],
++	    [char hv = heimdal_version;],
++	    [hv = hv;],

https://cgit.freebsd.org/ports/commit/net/nss_ldap?id=515552b2d2664dc02c2385519a7fedb855f46632

now the port can build
Comment 4 Einar Bjarni Halldórsson 2023-06-30 14:27:48 UTC
I'm seeing the as well, but only on my 13.2-RELEASE builder.
My 13.1-RELEASE builder builds it normally without errors
Comment 5 Einar Bjarni Halldórsson 2023-06-30 14:36:12 UTC
(In reply to Palle Girgensohn from comment #1)
Setting HEIMDALL=off allows me to build on 13.2
Comment 6 rainer 2023-07-13 08:06:08 UTC
I assume HEIMDAL=OFF is supposed to be a global option? It doesn't seem to exist as a port-option?
Comment 7 Einar Bjarni Halldórsson 2023-07-13 09:25:30 UTC
(In reply to rainer from comment #6)

HEIMDALL, two L's.
Comment 8 Alan Somers freebsd_committer freebsd_triage 2023-08-07 21:58:00 UTC
Reverting 515552b2d2664dc02c2385519a7fedb855f46632 , as Dutchman01 suggests, works for me.
Comment 9 Palle Girgensohn freebsd_committer freebsd_triage 2023-08-08 09:30:38 UTC
(In reply to Einar Bjarni Halldórsson from comment #7)
Not in Swedish, it's Heimdal here... :-)
Comment 10 Anna P 2023-08-13 19:21:05 UTC
(In reply to Einar Bjarni Halldórsson from comment #5)
Hi, I'm a CS student building FreeBSD13.2 on VMWARE. I have this bug as well. I am still learning, and I need help. How do I go about turning off HEIMDAL? Thank you.
Comment 11 Alan Somers freebsd_committer freebsd_triage 2023-11-21 17:33:04 UTC
Created attachment 246470 [details]
Fix the build on all supported FreeBSD releases

@des could you please review the attached patch?
Comment 12 Cy Schubert freebsd_committer freebsd_triage 2023-11-21 18:38:01 UTC
This certainly does fix the build error.
Comment 13 Mikael Urankar freebsd_committer freebsd_triage 2023-12-07 17:40:24 UTC
Approved by: mikael
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-12-07 17:44:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=512a940c48dfe70cf7fee96af994bad46e44eae9

commit 512a940c48dfe70cf7fee96af994bad46e44eae9
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2023-11-21 17:03:38 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2023-12-07 17:43:45 +0000

    net/nss_ldap: fix the build on both 13.2 and 14.0+

    The original configure script attempted to detect the presence of
    Heimdal, but it failed with LLVM 15+ due to a type casting bug.
    commit 515552b2d2664dc02c2385519a7fedb855f46632 fixed the bug with
    LLVM 15+, but inadvertently broke the build for earlier versions.

    This commit corrects the configure syntax, fixing the build on 12.4 and
    13.2.

    PR:             270465
    Approved by:    mikael (ports)
    Sponsored by:   Axcient
    MFH:            2023Q4

 net/nss_ldap/files/patch-configure.in | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2023-12-27 22:42:28 UTC
A commit in branch 2023Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=21ef50a5d82decbe80c5f5ffc0b0505a8316a449

commit 21ef50a5d82decbe80c5f5ffc0b0505a8316a449
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2023-11-21 17:03:38 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2023-12-27 22:42:10 +0000

    net/nss_ldap: fix the build on both 13.2 and 14.0+

    The original configure script attempted to detect the presence of
    Heimdal, but it failed with LLVM 15+ due to a type casting bug.
    commit 515552b2d2664dc02c2385519a7fedb855f46632 fixed the bug with
    LLVM 15+, but inadvertently broke the build for earlier versions.

    This commit corrects the configure syntax, fixing the build on 12.4 and
    13.2.

    PR:             270465
    Approved by:    mikael (ports)
    Sponsored by:   Axcient
    MFH:            2023Q4

    (cherry picked from commit 512a940c48dfe70cf7fee96af994bad46e44eae9)

 net/nss_ldap/files/patch-configure.in | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)