Issue 8874 - --with-fetch incorrectly links libcom_err
Summary: --with-fetch incorrectly links libcom_err
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.46
Hardware: All All
: --- normal
Target Milestone: 2.6.0
Assignee: Quanah Gibson-Mount
URL:
Keywords:
: 9724 (view as issue list)
Depends on:
Blocks:
 
Reported: 2018-07-06 20:13 UTC by Quanah Gibson-Mount
Modified: 2021-10-25 22:04 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Quanah Gibson-Mount 2018-07-06 20:13:13 UTC
Full_Name: Quanah Gibson-Mount
Version: 2.4.46
OS: FreeBSD 11
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (47.208.148.239)


When building OpenLDAP on FreeBSD where the fetch library is available, slapd
picks up a dependency on libcom_err which shouldn't exist.

This comes in from lines 934 and 944 of build/openldap.m4:
 934 LIBS="-lfetch -lcom_err $LIBS"
 944     ol_link_fetch="-lfetch -lcom_err"

These should be updated appropriately and configure regenerated
Comment 1 Howard Chu 2018-07-06 20:21:57 UTC
quanah@openldap.org wrote:
> Full_Name: Quanah Gibson-Mount
> Version: 2.4.46
> OS: FreeBSD 11
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (47.208.148.239)
> 
> 
> When building OpenLDAP on FreeBSD where the fetch library is available, slapd
> picks up a dependency on libcom_err which shouldn't exist.
> 
> This comes in from lines 934 and 944 of build/openldap.m4:
>   934 LIBS="-lfetch -lcom_err $LIBS"
>   944     ol_link_fetch="-lfetch -lcom_err"
> 
> These should be updated appropriately and configure regenerated

Careful here. There may still be releases of FreeBSD that linked libfetch 
against com_err, for whatever reason. You'd need to check that libfetch 
exists, and then check that linking against libfetch by itself succeeds or 
fails. (And if it fails, put com_err back in and try again.)

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Quanah Gibson-Mount 2020-03-23 20:30:06 UTC
Need to see if there are any supported versions of FreeBSD that still do this linking
Comment 3 Quanah Gibson-Mount 2021-06-23 23:15:55 UTC
This code was from 1999.  FreeBSD dropped linking to libcom_err in May of 2000.

https://github.com/freebsd/freebsd-src/commit/e5d7688f99046a4b3022e13701fd346f5328d6d4#diff-1f8e16bc23e21efde739b5a5352e78c8ec7d47a1622a65120ecad3ed69b059cc
Comment 5 Quanah Gibson-Mount 2021-06-24 16:31:06 UTC
Commits: 
  • 59f8d06d 
by Quanah Gibson-Mount at 2021-06-24T15:01:51+00:00 
ITS#8874 - Don't try and link in libcom_err with libfetch on FreeBSD
Comment 6 Xin Li 2021-10-24 07:24:46 UTC
*** Issue 9724 has been marked as a duplicate of this issue. ***