Bug 223568

Summary: mail/opendkim: Fails to build with OpenSSL 1.1
Product: Ports & Packages Reporter: Kurt Jaeger <pi>
Component: Individual Port(s)Assignee: Matthias Fechner <mfechner>
Status: Closed FIXED    
Severity: Affects Many People CC: brnrd, freebsd-ports, mam, mfechner, pi, ports-secteam, rootservice
Priority: --- Flags: koobs: merge-quarterly-
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 228865, 231931, 234278    
Description Flags
fix builds with openssl 1.1
freebsd-ports: maintainer-approval+
http://beefy2.nyi.freebsd.org/data/120amd64-quarterly/487556/logs/errors/opendkim-2.10.3_9.log none

Description Kurt Jaeger freebsd_committer 2017-11-09 17:32:12 UTC
Created attachment 187883 [details]

For the report see


It refers to


Testbuilds are fine, run-tests are needed.
Comment 1 Bernard Spil freebsd_committer 2018-06-15 09:37:34 UTC
> checking for library containing SSL_library_init... no

During BSDCan 2018 the intention to update OpenSSL in base to 1.1.x branch was documented.

Intention is to update 12-STABLE to current 1.1.0 and subsequently update it to 1.1.1 when that is released. The intent to update OpenSSL to 1.1 in 12 has now officially been documented in Bug #228912 

Poudriere log: https://keg.brnrd.eu/data/111amd64-default-openssl110/2018-06-11_10h42m37s/logs/errors/opendkim-2.10.3_7.log
Comment 2 Bernard Spil freebsd_committer 2018-06-15 09:37:44 UTC
*** Bug 229028 has been marked as a duplicate of this bug. ***
Comment 3 Kurt Jaeger freebsd_committer 2018-06-15 09:43:00 UTC
re-running testbuild on 12a.
Comment 4 Matthias Fechner freebsd_committer 2018-10-05 13:56:49 UTC
I tested the patch, but I see now a linker error:
Making all in miltertest
cc -DHAVE_CONFIG_H -I. -I..  -I./../libopendkim -I/usr/include -I/usr/local/include/lua52 -DCONFIG_BASE=\"/usr/local/etc\"  -O2 -pipe  -fstack-protector -fno-strict-aliasing -MT miltertest-miltertest.o -MD -MP -MF .deps/miltertest-miltertest.Tpo -c -o miltertest-miltertest.o `test -f 'miltertest.c' || echo './'`miltertest.c
mv -f .deps/miltertest-miltertest.Tpo .deps/miltertest-miltertest.Po
/bin/sh ../libtool  --tag=CC    --mode=link cc  -O2 -pipe  -fstack-protector -fno-strict-aliasing  ../libopendkim/libopendkim.la -L/usr/local/lib/lua52 -Wl,-rpath,/usr/local/lib -fstack-protector -o miltertest miltertest-miltertest.o -llua -lm  
libtool: link: cc -O2 -pipe -fstack-protector -fno-strict-aliasing -Wl,-rpath -Wl,/usr/local/lib -fstack-protector -o .libs/miltertest miltertest-miltertest.o  ../libopendkim/.libs/libopendkim.so -L/usr/local/lib -L/usr/local/lib/lua52 -llua -lm -lssl -lcrypto -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: cannot find -llua
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

make[3]: stopped in /wrkdirs/usr/ports/mail/opendkim/work/opendkim-2.10.3/miltertest
*** Error code 1

Full log is here:
Comment 5 Daniel Austin 2018-10-12 17:24:55 UTC
Created attachment 198070 [details]
fix builds with openssl 1.1

A modification of Kurt's patch, which fixes building.
(thanks for the help)

As we now re-build configure, the pre-configure Makefile section had to be modified to patch the .ac file instead of configure.

Poudriere testport logs for 10.4/11.2 i386/amd64 (and an 11.2 amd64 w/openssl 1.1) are at:


Patch builds on existing and -devel openssl.
Comment 6 Matthias Fechner freebsd_committer 2018-10-16 16:14:56 UTC
I tested the patch and it works fine for me.
Kurt will you commit it?
(I'm only allowed to commit gitlab specific changes)
Comment 7 commit-hook freebsd_committer 2018-10-20 10:19:53 UTC
A commit references this bug:

Author: mfechner
Date: Sat Oct 20 10:19:30 UTC 2018
New revision: 482481
URL: https://svnweb.freebsd.org/changeset/ports/482481

  Fixed problems with OpenSSL 1.1.1 and an error message regarding lua.

  PR:		223568
  Submitted by:	freebsd-ports@dan.me.uk
  Reported by:	pi@FreeBSD.org
  Reviewed by:	mfechner@FreeBSD.org
  Approved by:	mentors (implicit)

Comment 8 Matthias Fechner freebsd_committer 2018-10-20 10:20:26 UTC
Thanks for the fix!
Comment 9 Daniel Austin 2018-10-20 10:24:21 UTC
Hi Matthias,

You missed out a couple of new files in the commit:



Comment 10 Matthias Fechner freebsd_committer 2018-10-20 10:52:00 UTC
Dear Daniel,

sry for this, added in 482484.
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2018-10-20 11:08:15 UTC
ports r482484
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 02:19:45 UTC
opendkim fails to configure in 12.0 quarterly due to this issue (as head did). ports r482481 fixed it in head, but it was not merged.

Re-open to get this change merged.
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 02:50:11 UTC
(In reply to Kubilay Kocak from comment #12)

via https://twitter.com/bensyverson/status/1074437101410758657
Comment 15 Matthias Fechner freebsd_committer 2019-01-07 11:59:31 UTC
I think this problem with fixed with branch 2019Q1:
Comment 16 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-07 12:01:04 UTC
Missed merge window, ports r482481 is now in 2019Q1