Opened 9 years ago

Closed 3 years ago

#51135 closed defect (fixed)

qt4-mac fails to build with libressl 2.3.3

Reported by: bK4gYuRo Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mkae (Marko Käning), kylesch@…
Port: qt4-mac

Description (last modified by mf2k (Frank Schima))

After upgrading libressl to 2.3.3 I cannot build qt4-mac 4.8.7 on Yosemite 10.10.5

These are the errors in the log:

:info:build /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -Xarch_x86_64 -mmacosx-version-min=10.10 -fco
nstant-cfstrings -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.10 -fvisibility=hidden -fvisib
ility-inlines-hidden -Wall -W -fPIC -DQT_SHARED -DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO
_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_
DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_H
AVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARG
EFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I.moc/release-shared -I../../include/QtNetwork -I.rcc/relea
se-shared -Ikernel -I../../include/QtCore -I../../include -F/opt/local/var/macports/build/_opt_local_v
ar_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-
opensource-src-4.8.7/Library/Frameworks -F/opt/local/var/macports/build/_opt_local_var_macports_source
s_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8
.7/lib -o .obj/release-shared/qhttpnetworkconnection.o access/qhttpnetworkconnection.cpp
:info:build /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -Xarch_x86_64 -mmacosx-version-min=10.10 -fco
nstant-cfstrings -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.10 -fvisibility=hidden -fvisib
ility-inlines-hidden -Wall -W -fPIC -DQT_SHARED -DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO
_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_
DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_H
AVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARG
EFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I.moc/release-shared -I../../include/QtNetwork -I.rcc/relea
se-shared -Ikernel -I../../include/QtCore -I../../include -F/opt/local/var/macports/build/_opt_local_v
ar_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-
opensource-src-4.8.7/Library/Frameworks -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.7/lib -o .obj/release-shared/qhttpnetworkconnectionchannel.o access/qhttpnetworkconnectionchannel.cpp
:info:build ssl/qsslsocket_openssl_symbols.cpp:231:32: error: use of undeclared identifier 'SSLv3_client_method'; did you mean 'SSLv23_client_method'?
:info:build DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
:info:build                                ^~~~~~~~~~~~~~~~~~~
:info:build                                SSLv23_client_method

Attachments (3)

main.log (1019.7 KB) - added by bK4gYuRo 9 years ago.
build log of qt4-mac
patch-src_network_ssl_qsslsocket_openssl.diff (5.2 KB) - added by kylesch@… 8 years ago.
patch allowing qt4-mac to build against libressl by wrapping SSLv3_* function calls in macro checks using '#ifndef OPENSSL_NO_SSLV3'
Portfile (38.7 KB) - added by kylesch@… 8 years ago.
Portfile that applies patchfile patch-src_network_ssl_qsslsocket_openssl.diff as patch 27 -- the last patch applied

Download all attachments as: .zip

Change History (12)

Changed 9 years ago by bK4gYuRo

Attachment: main.log added

build log of qt4-mac

comment:1 Changed 9 years ago by bK4gYuRo

Cc: macports@… added

Cc Me!

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Cc: michaelld@… macports@… removed
Keywords: libressl qt4-mac removed
Owner: changed from macports-tickets@… to michaelld@…

In the future, please use WikiFormatting. As reporter, you do not need to Cc yourself.

comment:3 Changed 9 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:4 Changed 9 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:5 Changed 9 years ago by bK4gYuRo

I wonder if patch similar to https://issues.asterisk.org/jira/browse/ASTERISK-24799 can be used?

comment:6 Changed 9 years ago by bK4gYuRo

or maybe this approach https://wiki.freebsd.org/LibreSSL/PatchingPorts

Resolution

Sometimes you will find an example for OPENSSL_NO_SSL2 in the code, do something similar for SSLv3. This tends to use #ifdef guards around the SSLv2 or SSLv3 code.

Example SSLv3_server_method code

ctx = SSL_CTX_new (server ? SSLv3_server_method() : SSLv3_client_method ());
Becomes

#ifndef OPENSSL_NO_SSL3
ctx = SSL_CTX_new (server ? SSLv3_server_method() : SSLv3_client_method ());
#else
ctx = SSL_CTX_new (server ? SSLv23_server_method() : SSLv23_client_method ());
SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1|SSL_OP_NO_SSLv2);
#endif
This retains compatibility with !OpenSSL 0.9.8, 1.0.0 and 1.0.1

You can use SSLv23 methods, these have been retained in LibreSSL but negotiate TLSv1, TLSv1.1 or TLSv1.2. What it will negotiate is controlled using the SSL_CTX_set_options. You will actually improve ports that you modify!

Changed 8 years ago by kylesch@…

patch allowing qt4-mac to build against libressl by wrapping SSLv3_* function calls in macro checks using '#ifndef OPENSSL_NO_SSLV3'

Changed 8 years ago by kylesch@…

Attachment: Portfile added

Portfile that applies patchfile patch-src_network_ssl_qsslsocket_openssl.diff as patch 27 -- the last patch applied

comment:7 Changed 8 years ago by kylesch@…

I ran into this issue as well and have attached the patch I put together along with the Portfile I used to apply the patch.

See these two attachments:

Last edited 8 years ago by kylesch@… (previous) (diff)

comment:8 Changed 8 years ago by kylesch@…

Cc: kylesch@… added

Cc Me!

comment:9 Changed 3 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.