Bug 210053 - devel/qca: doesn't compile with libressl
Summary: devel/qca: doesn't compile with libressl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2016-06-05 13:59 UTC by Loïc Bartoletti
Modified: 2016-08-22 10:28 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments
Successful build log with poudriere (151.66 KB, text/plain)
2016-06-08 23:05 UTC, VK
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer freebsd_triage 2016-06-05 13:59:19 UTC
Seems to be a classical problem with LibreSSL security:

My conf:
WITH_OPENSSL_PORT=yes
OPENSSL_PORT=security/libressl

The error:
[ 95%] Building CXX object plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o
cd /wrkdirs/usr/ports/devel/qca/work/.build/plugins/qca-ossl && /usr/local/libexec/ccache/c++   -DHAVE_OPENSSL_AES_CTR -DQCA_SYSTEMSTORE_PATH=\"/usr/local/share/certs/ca-root-nss.crt\" -DQT_CORE_LIB -DQT_NO_DEBUG -Dqca_ossl_EXPORTS -I/wrkdirs/usr/ports/devel/qca/work/.build/plugins/qca-ossl -I/wrkdirs/usr/ports/devel/qca/work/qca-2.1.1/plugins/qca-ossl -I/wrkdirs/usr/ports/devel/qca/work/qca-2.1.1/include/QtCrypto -I/wrkdirs/usr/ports/devel/qca/work/.build -isystem /usr/local/include/qt4 -isystem /usr/local/include/qt4/QtCore -I/usr/local/include -isystem /usr/local/share/qt4/mkspecs/default -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -o CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o -c /wrkdirs/usr/ports/devel/qca/work/qca-2.1.1/plugins/qca-ossl/qca-ossl.cpp
/wrkdirs/usr/ports/devel/qca/work/qca-2.1.1/plugins/qca-ossl/qca-ossl.cpp:5407:22: error: use of undeclared identifier 'SSLv3_client_method'; did you mean 'SSLv23_client_method'?
                        ctx = SSL_CTX_new(SSLv3_client_method());
                                          ^~~~~~~~~~~~~~~~~~~
                                          SSLv23_client_method
/usr/local/include/openssl/ssl.h:1678:19: note: 'SSLv23_client_method' declared here
const SSL_METHOD *SSLv23_client_method(void);   /* SSLv3 or TLSv1.* */
                  ^
/wrkdirs/usr/ports/devel/qca/work/qca-2.1.1/plugins/qca-ossl/qca-ossl.cpp:7141:35: error: use of undeclared identifier 'EVP_sha'; did you mean 'EVP_sha1'?
                        return new opensslHashContext( EVP_sha(), this, type);
                                                       ^~~~~~~
                                                       EVP_sha1
/usr/local/include/openssl/evp.h:658:15: note: 'EVP_sha1' declared here
const EVP_MD *EVP_sha1(void);

Thanks!
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2016-06-08 20:41:44 UTC
Can you pls check if that patch solves the issue and report that in this PR?
Comment 3 VK freebsd_triage 2016-06-08 23:05:28 UTC
Created attachment 171219 [details]
Successful build log with poudriere

I can't reproduce this with poudriere, default options, built with LibreSSL 2.3.5.
Comment 4 Andris Raugulis 2016-06-29 14:33:14 UTC
Any progress on this? 

This patch also works for me with LibreSSL as default ssl in ports.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-07-03 12:11:09 UTC
A commit references this bug:

Author: brnrd
Date: Sun Jul  3 12:10:19 UTC 2016
New revision: 417968
URL: https://svnweb.freebsd.org/changeset/ports/417968

Log:
  devel/qca: Fix building without SSLv3 and SHA-0

    - Add 2 patches from upstream project
      - Fix building when libssl does not have SSLv3
      - Fix building when libcrypto does not have SHA-0
    - Replace USE_OPENSSL with USES= ssl
    - Rework files/patch-libressl with `make makepatch`

  Tested with devel/qca and devel/qca-qt5

  PR:		210053
  Approved by:	Maintainer time-out
  Obtained from:	KDE
  Differential Revision:	D6885

Changes:
  head/devel/qca/Makefile
  head/devel/qca/files/patch-libressl
  head/devel/qca/files/patch-plugins_qca-ossl_CMakeLists.txt
  head/devel/qca/files/patch-plugins_qca-ossl_qca-ossl.cpp
Comment 6 Antoine Brodin freebsd_committer freebsd_triage 2016-07-04 16:00:38 UTC
The port is now broken on freebsd 9.3 :

http://package20.nyi.freebsd.org/data/93amd64-default-baseline/418004/logs/errors/qca-2.1.1.log

Please test your changes!
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-07-04 18:15:16 UTC
A commit references this bug:

Author: brnrd
Date: Mon Jul  4 18:14:18 UTC 2016
New revision: 418048
URL: https://svnweb.freebsd.org/changeset/ports/418048

Log:
  devel/qca: Fix build failure on 9.3 / OpenSSL 0.9.7

    - Re-add patch for compression to satisfy 0.9.7

  PR:		210053

Changes:
  head/devel/qca/files/patch-plugins_qca-ossl_qca-ossl.cpp
Comment 8 Bernard Spil freebsd_committer freebsd_triage 2016-07-04 18:17:02 UTC
Re-added compression patch.

https://brnrd.eu/poudriere/data/93amd64-svn/2016-07-04_20h06m39s/logs/qca-2.1.1.log
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-08-22 10:28:00 UTC
A commit references this bug:

Author: rakuco
Date: Mon Aug 22 10:27:01 UTC 2016
New revision: 420596
URL: https://svnweb.freebsd.org/changeset/ports/420596

Log:
  MFH: r417968 r418048 r420303

  devel/qca: Fix building without SSLv3 and SHA-0

    - Add 2 patches from upstream project
      - Fix building when libssl does not have SSLv3
      - Fix building when libcrypto does not have SHA-0
    - Replace USE_OPENSSL with USES= ssl
    - Rework files/patch-libressl with `make makepatch`

  Tested with devel/qca and devel/qca-qt5

  PR:		210053
  Approved by:	Maintainer time-out
  Obtained from:	KDE
  Differential Revision:	D6885

  devel/qca: Fix build failure on 9.3 / OpenSSL 0.9.7

    - Re-add patch for compression to satisfy 0.9.7

  PR:		210053

  Adjust the SHA0 removal patch.

  The upstream fix was still returning "sha0" in all_hash_types() even when SHA0
  support is not present. The fix has also been submitted upstream.

  PR:		211833
  Submitted by:	matthew@reztek.cz

  Approved by:	ports-secteam (junovitch)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/devel/qca/Makefile
  branches/2016Q3/devel/qca/files/patch-libressl
  branches/2016Q3/devel/qca/files/patch-plugins_qca-ossl_CMakeLists.txt
  branches/2016Q3/devel/qca/files/patch-plugins_qca-ossl_qca-ossl.cpp
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-08-22 10:28:02 UTC
A commit references this bug:

Author: rakuco
Date: Mon Aug 22 10:27:01 UTC 2016
New revision: 420596
URL: https://svnweb.freebsd.org/changeset/ports/420596

Log:
  MFH: r417968 r418048 r420303

  devel/qca: Fix building without SSLv3 and SHA-0

    - Add 2 patches from upstream project
      - Fix building when libssl does not have SSLv3
      - Fix building when libcrypto does not have SHA-0
    - Replace USE_OPENSSL with USES= ssl
    - Rework files/patch-libressl with `make makepatch`

  Tested with devel/qca and devel/qca-qt5

  PR:		210053
  Approved by:	Maintainer time-out
  Obtained from:	KDE
  Differential Revision:	D6885

  devel/qca: Fix build failure on 9.3 / OpenSSL 0.9.7

    - Re-add patch for compression to satisfy 0.9.7

  PR:		210053

  Adjust the SHA0 removal patch.

  The upstream fix was still returning "sha0" in all_hash_types() even when SHA0
  support is not present. The fix has also been submitted upstream.

  PR:		211833
  Submitted by:	matthew@reztek.cz

  Approved by:	ports-secteam (junovitch)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/devel/qca/Makefile
  branches/2016Q3/devel/qca/files/patch-libressl
  branches/2016Q3/devel/qca/files/patch-plugins_qca-ossl_CMakeLists.txt
  branches/2016Q3/devel/qca/files/patch-plugins_qca-ossl_qca-ossl.cpp