[Bug 217778] net/ntp build errors on FreeBSD11 using openssl and libressl

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Mar 14 08:17:45 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217778

            Bug ID: 217778
           Summary: net/ntp build errors on FreeBSD11 using openssl and
                    libressl
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: cy at FreeBSD.org
          Reporter: dewayne at heuristicsystems.com.au
          Assignee: cy at FreeBSD.org
             Flags: maintainer-feedback?(cy at FreeBSD.org)

Sadly, I updated my ports tree today and received these error messages on a
FreeBSD 11.0 i386 (using openssl) and an amd64 (using libressl) platform:

>From i386
...
In file included from /usr/include/openssl/evp.h:70:
/usr/include/openssl/ossl_typ.h:132:30: error: typedef redefinition with
different types
      ('struct env_md_ctx_st' vs 'MD5_CTX' (aka 'struct MD5Context'))
typedef struct env_md_ctx_st EVP_MD_CTX;
                             ^
../include/ntp_md5.h:25:21: note: previous definition is here
  typedef MD5_CTX                       EVP_MD_CTX;
                                        ^
In file included from a_md5encrypt.c:14:
In file included from ../include/libssl_compat.h:23:
/usr/include/openssl/evp.h:594:5: error: expected ')'
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
    ^
../include/ntp_md5.h:31:49: note: expanded from macro 'EVP_DigestInit_ex'
# define EVP_DigestInit_ex(c, dt, i)    (MD5Init(c), 1)

these are my enabled options
# make -C /usr/ports/net/ntp -DUSE_PRODUCTION -DUSE_C3 -DMAKE_JOBS_UNSAFE
showconfig | head -n1
===> The following configuration options are available for ntp-4.2.8p9_4:

# make -C /usr/ports/net/ntp -DUSE_PRODUCTION -DUSE_C3 -DMAKE_JOBS_UNSAFE
showconfig|grep =on
     DOCS=on: Build and/or install documentation
     EXAMPLES=on: Build and/or install examples
     IPV6=on: IPv6 protocol support
     SSL=on: SSL protocol support

Build platform is 
# uname -aKU
FreeBSD b1.hs 11.0-STABLE FreeBSD 11.0-STABLE #0 r314716M: Mon Mar  6 16:22:28
AEDT 2017     root at hathor:/110003/D/K8/hqdev-amd64-smp-vga  i386 1100509
1100509

The ONLY change to the system is an OS upgrade, no changes to any config files,
and no changes to the build environment except an svn update.  Last successful
package build for ntp is dated:
-rw-r--r--  1 root  wheel  435912 Mar  8 23:47
/d2/distribution/package/All/ntp-4.2.8p9_3.txz

Openssl versions used:
- i386 using OpenSSL 1.0.2k  26 Jan 2017
- amd64 using LibreSSL 2.4.5

On both platforms, after the failure I rebuilt openssl (i386 box) and libressl
on the amd64, with the same failed result.  so I picked something at random
that uses ssl and rebuilt that without issue. Hmm.

I then removed the patches from
https://svnweb.freebsd.org/ports?view=revision&revision=428634 but the problem
remained on both openssl & freebsd.  

So I moved /usr/include/openssl to /tmp; checked
# make -VOPENSSLINC -VOPENSSLLIB -VOPENSSLBASE
# 3 blank lines

So I set those variables in the net/ntp/Makefile
OPENSSLBASE=     /usr/local
but OPENSSLINC and OPENSSLLIB remained blank.


Workaround
----------
Setting these worked as a workaround:
OPENSSLINC=     /usr/local/include
OPENSSLLIB=     /usr/local/lib

with the result that ntp built with a couple of warnings on amd64. A lot of
warnings on the i386 and approx 25 unfamiliar messages around "texi":

../config.status --file=ntp-keygen.8+:./ntp-keygen.mdoc.in
config.status: creating ntp-keygen.8+
mv ntp-keygen.8+ ntp-keygen.8
cd . && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi
|| true )
ntp-keygen.texi:29: @menu seen before first @node
ntp-keygen.texi:29: perhaps your @top node should be wrapped in @ifnottex
rather than @ifinfo?
./invoke-ntp-keygen.texi:993: @node seen before @code closing brace
./invoke-ntp-keygen.texi:995: warning: @node should not appear in @code
./invoke-ntp-keygen.texi:1074: warning: @group should only appear at a line
beginning
...

I doubt that this is an ntp problem (?).  I couldn't see anything obvious under
/usr/ports/Mk within the last 5 days.  But at least, I have ntp packages on
both platforms.  And I hope that this sojourn provides a clue.

Aside: while I was here, I removed autogen and libedit from the Makefile. Built
and installed ntp-4.2.8p9_4.txz which is now running as a stratum 2 peer.
Interestingly even without libedit in the Makefile, ntpq still has
/usr/local/lib/libedit.so.0 as a dependency, but that for another day. :)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list