Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2017 08:17:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 217778] net/ntp build errors on FreeBSD11 using openssl and libressl
Message-ID:  <bug-217778-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217778

            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@FreeBSD.org
          Reporter: dewayne@heuristicsystems.com.au
          Assignee: cy@FreeBSD.org
             Flags: maintainer-feedback?(cy@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
=3D=3D=3D> The following configuration options are available for ntp-4.2.8p=
9_4:

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

Build platform is=20
# uname -aKU
FreeBSD b1.hs 11.0-STABLE FreeBSD 11.0-STABLE #0 r314716M: Mon Mar  6 16:22=
:28
AEDT 2017     root@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 fi=
les,
and no changes to the build environment except an svn update.  Last success=
ful
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 libre=
ssl
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=3Drevision&revision=3D428634 but the =
problem
remained on both openssl & freebsd.=20=20

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=3D     /usr/local
but OPENSSLINC and OPENSSLLIB remained blank.


Workaround
----------
Setting these worked as a workaround:
OPENSSLINC=3D     /usr/local/include
OPENSSLLIB=3D     /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=3Dntp-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 u=
nder
/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. B=
uilt
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. :)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217778-13>