Unable to compile hostapd 2.4

Conrad Kostecki ck+hostap at bl4ckb0x.de
Tue Mar 17 18:28:18 EDT 2015


Hi!
I am trying to compile hostapd 2.4, but I am failing due this error:

x86_64-pc-linux-gnu-gcc -c -o ../src/crypto/milenage.o -march=atom -O3 
-mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mmovbe -msahf -pipe 
-fomit-frame-pointer -mfpmath=sse 
-I/var/tmp/portage/net-wireless/hostapd-2.4/work/hostapd-2.4/src 
-I/var/tmp/portage/net-wireless/hostapd-2.4/work/hostapd-2.4/src/utils 
-DHOSTAPD -DHOSTAPD_DUMP_STATE -DCONFIG_VLAN_NETLINK -DCONFIG_CTRL_IFACE 
-DCONFIG_CTRL_IFACE_UNIX -DCONFIG_IAPP -DCONFIG_RSN_PREAUTH 
-DCONFIG_PEERKEY -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_WNM 
-DCONFIG_IEEE80211N -DCONFIG_IEEE80211AC -DCONFIG_DRIVER_HOSTAP 
-DCONFIG_DRIVER_WIRED -DCONFIG_DRIVER_NL80211 -DCONFIG_LIBNL20 
-I/usr/include/libnl3 -DCONFIG_DRIVER_NONE -DCONFIG_LIBNL20 -DCONFIG_ERP 
-DEAP_SERVER_MD5 -DEAP_SERVER_TLS -DEAP_SERVER_PEAP -DEAP_SERVER_TTLS 
-DEAP_SERVER_MSCHAPV2 -DEAP_SERVER_GTC -DEAP_SERVER_SIM -DEAP_SERVER_AKA 
-DEAP_SERVER_AKA_PRIME -DEAP_SERVER_PAX -DEAP_SERVER_PSK 
-DEAP_SERVER_SAKE -DEAP_SERVER_GPSK -DEAP_GPSK_SHA256 -DEAP_SERVER_PWD 
-DEAP_SERVER_EKE -DEAP_SERVER_FAST -DCONFIG_WPS -DEAP_SERVER_WSC 
-DCONFIG_WPS_NFC -DCONFIG_WPS_OOB -DCONFIG_WPS_UPNP -DEAP_SERVER_IKEV2 
-DEAP_SERVER_TNC -DEAP_SERVER_IDENTITY -DEAP_SERVER -DPKCS12_FUNCS 
-DEAP_TLS_FUNCS -DCONFIG_TLSV11 -DCONFIG_TLSV12 -DCONFIG_SHA256 
-DALL_DH_GROUPS -DRADIUS_SERVER -DCONFIG_IPV6 -DCONFIG_FULL_DYNAMIC_VLAN 
-DNEED_AP_MLME -DCONFIG_HS20 -DCONFIG_INTERWORKING -DCONFIG_PROXYARP 
-DCONFIG_ACS -DCONFIG_DEBUG_FILE ../src/crypto/milenage.c
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--sort-common 
-Wl,-z,now -o hlr_auc_gw ../src/crypto/crypto_openssl.o 
../src/crypto/random.o ../src/utils/eloop.o ../src/crypto/sha1-prf.o 
../src/crypto/sha1-tprf.o ../src/crypto/sha1-tlsprf.o 
../src/crypto/md5.o hlr_auc_gw.o ../src/utils/common.o 
../src/utils/wpa_debug.o ../src/utils/os_unix.o ../src/utils/wpabuf.o 
../src/crypto/milenage.o ../src/crypto/aes-encblock.o -lrt -lcrypto
../src/crypto/md5.o: In function `hmac_md5_vector':
md5.c:(.text+0x0): multiple definition of `hmac_md5_vector'
../src/crypto/crypto_openssl.o:crypto_openssl.c:(.text+0x13d0): first 
defined here
../src/crypto/md5.o: In function `hmac_md5':
md5.c:(.text+0x2b0): multiple definition of `hmac_md5'
../src/crypto/crypto_openssl.o:crypto_openssl.c:(.text+0x1430): first 
defined here
collect2: error: ld returned 1 exit status
Makefile:997: recipe for target 'hlr_auc_gw' failed
make: *** [hlr_auc_gw] Error 1
The build log is here: http://pastebin.com/iXKpA5A6

Has anybody an idea?

When comparing 2.3 and 2.4, I can see a difference.

VERSION 2.4
# grep hmac_md5 *
crypto_openssl.c:int hmac_md5_vector(const u8 *key, size_t key_len, 
size_t num_elem,
crypto_openssl.c:int hmac_md5(const u8 *key, size_t key_len, const u8 
*data, size_t data_len,
crypto_openssl.c: return hmac_md5_vector(key, key_len, 1, &data, 
&data_len, mac);
md5.c: * hmac_md5_vector - HMAC-MD5 over data vector (RFC 2104)
md5.c:int hmac_md5_vector(const u8 *key, size_t key_len, size_t 
num_elem,
md5.c: * hmac_md5 - HMAC-MD5 over data buffer (RFC 2104)
md5.c:int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t 
data_len,
md5.c: return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac);
md5.h:int hmac_md5_vector(const u8 *key, size_t key_len, size_t 
num_elem,
md5.h:int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t 
data_len,
sha1-tlsprf.c: hmac_md5_vector(S1, L_S1, 2, &MD5_addr[1], &MD5_len[1], 
A_MD5);
sha1-tlsprf.c: hmac_md5_vector(S1, L_S1, 3, MD5_addr, MD5_len, P_MD5);
sha1-tlsprf.c: hmac_md5(S1, L_S1, A_MD5, MD5_MAC_LEN, A_MD5);

VERSION 2.3
md5.c: * hmac_md5_vector - HMAC-MD5 over data vector (RFC 2104)
md5.c:int hmac_md5_vector(const u8 *key, size_t key_len, size_t 
num_elem,
md5.c: * hmac_md5 - HMAC-MD5 over data buffer (RFC 2104)
md5.c:int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t 
data_len,
md5.c: return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac);
md5.h:int hmac_md5_vector(const u8 *key, size_t key_len, size_t 
num_elem,
md5.h:int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t 
data_len,
sha1-tlsprf.c: hmac_md5_vector(S1, L_S1, 2, &MD5_addr[1], &MD5_len[1], 
A_MD5);
sha1-tlsprf.c: hmac_md5_vector(S1, L_S1, 3, MD5_addr, MD5_len, P_MD5);
sha1-tlsprf.c: hmac_md5(S1, L_S1, A_MD5, MD5_MAC_LEN, A_MD5);

Cheers
Conrad


More information about the HostAP mailing list