The update to py-m2crypot 0.27.0 fails to build with the following error message. The only reason I can think of is that SSL is set to LibreSSL from ports. [...] building 'M2Crypto._m2crypto' extension swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c /usr/local/bin/swig3.0 -python -I/usr/local/include/python2.7 -includeall -modern -builtin -outdir /usr/ports/security/py-m2crypto/work/M2Crypto-0.27.0/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i creating build/temp.freebsd-11.1-RELEASE-p1-amd64-2.7 creating build/temp.freebsd-11.1-RELEASE-p1-amd64-2.7/SWIG /usr/local/libexec/ccache/world/cc -DNDEBUG -O3 -pipe -funroll-loops -march=native -fstack-protector -fno-strict-aliasing -fPIC -I/usr/local/include/python2.7 -I/usr/ports/security/py-m2crypto/work/M2Crypto-0.27.0/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.freebsd-11.1-RELEASE-p1-amd64-2.7/SWIG/_m2crypto_wrap.o -DTHREADING SWIG/_m2crypto_wrap.c:11545:3: warning: implicit declaration of function 'pyfd_init' is invalid in C99 [-Wimplicit-function-declaration] pyfd_init(); ^ SWIG/_m2crypto_wrap.c:11545:3: warning: this function declaration is not a prototype [-Wstrict-prototypes] SWIG/_m2crypto_wrap.c:12350:19: error: incomplete definition of type 'struct pyfd_struct' if (arg1) (arg1)->fd = arg2; ~~~~~~^ [...]
Using this patch made the port build for me: --- Makefile.old 2017-10-09 21:02:18.545682000 +0200 +++ Makefile 2017-10-13 08:06:34.217182000 +0200 @@ -17,7 +17,7 @@ BUILD_DEPENDS= swig3.0:devel/swig30 MAKE_ENV= SWIG_FEATURES=-I${OPENSSLINC} -PYDISTUTILS_BUILDARGS= build_ext --openssl=${OPENSSLBASE} --swig=${LOCALBASE}/bin/swig3.0 +PYDISTUTILS_BUILDARGS= build_ext --openssl=${OPENSSLBASE} --swig=${LOCALBASE}/bin/swig3.0 --include=${LOCALBASE}/include USE_PYTHON= autoplist concurrent distutils USES= python ssl
The port builds fine with base OpenSSL. Please try the following patch (which uses OPENSSLINC rather than LOCALBASE/include): Index: Makefile =================================================================== --- Makefile (revision 451941) +++ Makefile (working copy) @@ -16,8 +16,7 @@ BUILD_DEPENDS= swig3.0:devel/swig30 -MAKE_ENV= SWIG_FEATURES=-I${OPENSSLINC} -PYDISTUTILS_BUILDARGS= build_ext --openssl=${OPENSSLBASE} --swig=${LOCALBASE}/bin/swig3.0 +PYDISTUTILS_BUILDARGS= build_ext --include=${OPENSSLINC} --openssl=${OPENSSLBASE} --swig=${LOCALBASE}/bin/swig3.0 USE_PYTHON= autoplist concurrent distutils USES= python ssl
(In reply to Po-Chuan Hsieh from comment #2) Yes, your patch works as well.
A commit references this bug: Author: sunpoet Date: Sun Oct 15 00:38:44 UTC 2017 New revision: 452122 URL: https://svnweb.freebsd.org/changeset/ports/452122 Log: Fix build with LibreSSL PR: 222912 Submitted by: Peter Putzer <freebsd@mnd.sc> Changes: head/security/py-m2crypto/Makefile
Committed. Thanks!