Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651314 - net-wireless/wpa_supplicant fails to compile due to "error: static declaration of "SSL_get_client_random" follows non-static declaration"
Summary: net-wireless/wpa_supplicant fails to compile due to "error: static declaratio...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libressl-2.8.0
  Show dependency tree
 
Reported: 2018-03-24 05:01 UTC by Reuben Farrelly
Modified: 2018-04-19 02:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,5.31 KB, text/plain)
2018-03-24 05:01 UTC, Reuben Farrelly
Details
Updated wpa_supplicant-2.6-libressl.patch (wpa_supplicant-2.6-libressl.patch,3.15 KB, patch)
2018-03-24 09:23 UTC, Reuben Farrelly
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Farrelly 2018-03-24 05:01:49 UTC
Created attachment 525162 [details]
emerge --info

wpa_supplicant with the following options fails to compile:

[ebuild   R    ] net-wireless/wpa_supplicant-2.6-r4::gentoo  USE="hs2-0 libressl readline ssl -ap -dbus -eap-sim -eapol_test -fasteap -gnutls -p2p -privsep (-ps3) -qt5 (-selinux) -smartcard -tdls -uncommon-eap-types (-wimax) -wps" 0 KiB

This is being compiled against dev-libs/libressl-2.7.0 which I strongly suspect may be the cause given the comments in the source code at this location.

x86_64-pc-linux-gnu-gcc -c -o ../src/crypto/tls_openssl.o -O2 -pipe -march=native -mtune=native  -I/var/tmp/portage/net-wireless/wpa_supplicant-2.6-r4/work/wpa_supplicant-2.6/src -I/var/tmp/portage/net-wireless/wpa_supplicant-2.6-r4/work/wpa_supplicant-2.6/src/utils -DCONFIG_BACKEND_FILE -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_MESH -DCONFIG_SAE -DCONFIG_PEERKEY -DCONFIG_IBSS_RSN -DCONFIG_NO_VLAN -DCONFIG_MATCH_IFACE -DCONFIG_HS20 -DCONFIG_INTERWORKING  -DCONFIG_DRIVER_WIRED -DCONFIG_DRIVER_NL80211 -DCONFIG_LIBNL20 -I/usr/include/libnl3  -DCONFIG_DRIVER_WEXT -DCONFIG_WIRELESS_EXTENSION  -DCONFIG_DRIVER_HOSTAP -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_LEAP -DEAP_PSK -DEAP_PAX -DEAP_PWD -DIEEE8021X_EAPOL -DCONFIG_AP -DCONFIG_NO_RADIUS -DCONFIG_NO_ACCOUNTING -DCONFIG_NO_VLAN -DEAP_SERVER -DEAP_SERVER_IDENTITY -DNEED_AP_MLME -DCONFIG_NO_RADIUS -DPKCS12_FUNCS -DCONFIG_SMARTCARD -DEAP_TLS_OPENSSL -DCONFIG_SHA256 -DCONFIG_ECC -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX  -DCONFIG_SME -DCONFIG_DEBUG_SYSLOG -DCONFIG_DEBUG_FILE -DCONFIG_DELAYED_MIC_ERROR_REPORT -DCONFIG_BGSCAN_SIMPLE -DCONFIG_BGSCAN_LEARN -DCONFIG_BGSCAN -DCONFIG_GAS -DCONFIG_OFFCHANNEL ../src/crypto/tls_openssl.c
../src/crypto/tls_openssl.c:70:15: error: static declaration of ‘SSL_get_client_random’ follows non-static declaration
 static size_t SSL_get_client_random(const SSL *ssl, unsigned char *out,
               ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/crypto/tls_openssl.c:19:0:
/usr/include/openssl/ssl.h:1558:8: note: previous declaration of ‘SSL_get_client_random’ was here
 size_t SSL_get_client_random(const SSL *s, unsigned char *out, size_t max_out);
        ^~~~~~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c:80:15: error: static declaration of ‘SSL_get_server_random’ follows non-static declaration
 static size_t SSL_get_server_random(const SSL *ssl, unsigned char *out,
               ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/crypto/tls_openssl.c:19:0:
/usr/include/openssl/ssl.h:1559:8: note: previous declaration of ‘SSL_get_server_random’ was here
 size_t SSL_get_server_random(const SSL *s, unsigned char *out, size_t max_out);
        ^~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:1776: ../src/crypto/tls_openssl.o] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: net-wireless/wpa_supplicant-2.6-r4::gentoo failed (compile phase):
 *   emake failed
Comment 1 Reuben Farrelly 2018-03-24 09:23:19 UTC
Created attachment 525208 [details, diff]
Updated wpa_supplicant-2.6-libressl.patch

It turns out that this problem was caused by libressl-2.7.0 afterall.
This patch file (attached) updates/replaces the existing wpa_supplicant-2.6-libressl.patch file so that the build now completes when libressl-2.7.0 is installed on the system.
Comment 2 Anthony Basile gentoo-dev 2018-03-24 11:13:09 UTC
All bug reporters, can you please test against dev-libs/libressl-2.7.1
Comment 3 Reuben Farrelly 2018-03-24 13:30:13 UTC
- Upgraded to libressl-2.7.1
- Tested by not applying the patch, attempting to recompile (fails)
- Tested again applying the patch, (compile succeeds)

=> no change in behaviour or changes to the patch with 2.7.1.
Comment 4 Anthony Basile gentoo-dev 2018-03-24 13:47:27 UTC
(In reply to Reuben Farrelly from comment #3)
> - Upgraded to libressl-2.7.1
> - Tested by not applying the patch, attempting to recompile (fails)
> - Tested again applying the patch, (compile succeeds)
> 
> => no change in behaviour or changes to the patch with 2.7.1.

Okay I'm cc-ing zerochaos to see if we can add that patch contigent on USE=libressl.
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2018-04-16 20:37:14 UTC
I don't have anything against this patch, but has this been submitted to upstream at all yet?  Could it be please?
Comment 7 Larry the Git Cow gentoo-dev 2018-04-19 02:10:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=128b2837afe310dd39d0895310116c5b40988db5

commit 128b2837afe310dd39d0895310116c5b40988db5
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2018-04-19 02:10:02 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2018-04-19 02:10:02 +0000

    net-wireless/wpa_supplicant: compatibility patch for LibreSSL
    
    This patch fixes building with dev-libs/libressl-2.7.x. Patch was
    backported from upstream commits:
    
    ba3658cfff2278bc2ba24c32773962b37648d0b2
    dee566d98e85e00b917d3eff42cd7e969de089cc
    
    Bug: https://bugs.gentoo.org/651314
    Package-Manager: Portage-2.3.29, Repoman-2.3.9

 ...wpa_supplicant-2.6-libressl-compatibility.patch | 106 +++++
 .../wpa_supplicant/wpa_supplicant-2.6-r6.ebuild    | 436 +++++++++++++++++++++
 2 files changed, 542 insertions(+)}