Failure to build with CONFIG_EAP_IKEV2=y

Kel Modderman kel
Tue Jan 8 23:32:30 PST 2008


Hi,

After activating CONFIG_EAP_IKEV2=y in build config [1] (which is pretty much
defconfig with most (but not all) options turned on), the following failure
was observed.

[1] http://svn.debian.org/viewsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/00_defconfig.patch?rev=970&view=markup

<snip>

cc -Wall -g -O2 -MMD -I. -I../src -I../src/crypto -I../src/utils -I../src/common -I../src/rsn_supp -I../src/drivers/driver_madwifi/ -DCONFIG_BACKEND_FILE -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_WEXT -DCONFIG_DRIVER_MADWIFI -DCONFIG_DRIVER_ATMEL -DCONFIG_DRIVER_WIRED -DCONFIG_DRIVER_TEST -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_SIM -DEAP_LEAP -DEAP_PSK -DEAP_AKA -DEAP_TLV -DEAP_PAX -DEAP_WSC -DEAP_IKEV2 -DIEEE8021X_EAPOL -DPCSC_FUNCS -I/usr/include/PCSC -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -DPKCS12_FUNCS -DCONFIG_SMARTCARD -DINTERNAL_SHA256 -DCONFIG_WIRELESS_EXTENSION -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -DDBUS_VERSION_MAJOR=1 -DDBUS_VERSION_MINOR=1 -DCONFIG_READLINE -DCONFIG_PEERKEY -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_NO_T_PRF -DCONFIG_DEBUG_FILE   -c -o ../src/eap_peer/eap_ikev2.o ../src/eap_peer/eap_ikev2.c
../src/eap_peer/eap_ikev2.c: In function 'eap_ikev2_process':
../src/eap_peer/eap_ikev2.c:372: warning: format '%d' expects type 'int', but argument 4 has type 'long int'
cc -Wall -g -O2 -MMD -I. -I../src -I../src/crypto -I../src/utils -I../src/common -I../src/rsn_supp -I../src/drivers/driver_madwifi/ -DCONFIG_BACKEND_FILE -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_WEXT -DCONFIG_DRIVER_MADWIFI -DCONFIG_DRIVER_ATMEL -DCONFIG_DRIVER_WIRED -DCONFIG_DRIVER_TEST -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_SIM -DEAP_LEAP -DEAP_PSK -DEAP_AKA -DEAP_TLV -DEAP_PAX -DEAP_WSC -DEAP_IKEV2 -DIEEE8021X_EAPOL -DPCSC_FUNCS -I/usr/include/PCSC -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -DPKCS12_FUNCS -DCONFIG_SMARTCARD -DINTERNAL_SHA256 -DCONFIG_WIRELESS_EXTENSION -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -DDBUS_VERSION_MAJOR=1 -DDBUS_VERSION_MINOR=1 -DCONFIG_READLINE -DCONFIG_PEERKEY -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_NO_T_PRF -DCONFIG_DEBUG_FILE   -c -o ../src/eap_peer/ikev2.o ../src/eap_peer/ikev2.c
../src/eap_peer/ikev2.c: In function 'ikev2_process_kei':
../src/eap_peer/ikev2.c:433: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
../src/eap_peer/ikev2.c:433: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
../src/eap_peer/ikev2.c: In function 'ikev2_process_ni':
../src/eap_peer/ikev2.c:459: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
cc -Wall -g -O2 -MMD -I. -I../src -I../src/crypto -I../src/utils -I../src/common -I../src/rsn_supp -I../src/drivers/driver_madwifi/ -DCONFIG_BACKEND_FILE -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_WEXT -DCONFIG_DRIVER_MADWIFI -DCONFIG_DRIVER_ATMEL -DCONFIG_DRIVER_WIRED -DCONFIG_DRIVER_TEST -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_SIM -DEAP_LEAP -DEAP_PSK -DEAP_AKA -DEAP_TLV -DEAP_PAX -DEAP_WSC -DEAP_IKEV2 -DIEEE8021X_EAPOL -DPCSC_FUNCS -I/usr/include/PCSC -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -DPKCS12_FUNCS -DCONFIG_SMARTCARD -DINTERNAL_SHA256 -DCONFIG_WIRELESS_EXTENSION -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -DDBUS_VERSION_MAJOR=1 -DDBUS_VERSION_MINOR=1 -DCONFIG_READLINE -DCONFIG_PEERKEY -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_NO_T_PRF -DCONFIG_DEBUG_FILE   -c -o ../src/eap_common/eap_ikev2_common.o ../src/eap_common/eap_ikev2_common.c
cc -Wall -g -O2 -MMD -I. -I../src -I../src/crypto -I../src/utils -I../src/common -I../src/rsn_supp -I../src/drivers/driver_madwifi/ -DCONFIG_BACKEND_FILE -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_WEXT -DCONFIG_DRIVER_MADWIFI -DCONFIG_DRIVER_ATMEL -DCONFIG_DRIVER_WIRED -DCONFIG_DRIVER_TEST -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_SIM -DEAP_LEAP -DEAP_PSK -DEAP_AKA -DEAP_TLV -DEAP_PAX -DEAP_WSC -DEAP_IKEV2 -DIEEE8021X_EAPOL -DPCSC_FUNCS -I/usr/include/PCSC -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -DPKCS12_FUNCS -DCONFIG_SMARTCARD -DINTERNAL_SHA256 -DCONFIG_WIRELESS_EXTENSION -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -DDBUS_VERSION_MAJOR=1 -DDBUS_VERSION_MINOR=1 -DCONFIG_READLINE -DCONFIG_PEERKEY -DCONFIG_IEEE80211W -DCONFIG_IEEE80211R -DCONFIG_NO_T_PRF -DCONFIG_DEBUG_FILE   -c -o ../src/eap_common/ikev2_common.o ../src/eap_common/ikev2_common.c
../src/eap_common/ikev2_common.c: In function 'ikev2_parse_payloads':
../src/eap_common/ikev2_common.c:330: warning: format '%d' expects type 'int', but argument 3 has type 'long int'

<snip>

cc  -o wpa_supplicant config.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/wpabuf.o ../src/crypto/md5.o ../src/crypto/rc4.o ../src/crypto/md4.o ../src/crypto/sha1.o ../src/crypto/des.o ../src/utils/os_unix.o ../src/utils/eloop.o config_file.o ../src/eap_peer/eap_tls.o ../src/eap_peer/eap_peap.o ../src/eap_peer/eap_ttls.o ../src/eap_peer/eap_md5.o ../src/eap_peer/eap_mschapv2.o ../src/eap_peer/eap_gtc.o ../src/eap_peer/eap_otp.o ../src/eap_peer/eap_sim.o ../src/eap_peer/eap_leap.o ../src/eap_peer/eap_psk.o ../src/eap_common/eap_psk_common.o ../src/eap_peer/eap_aka.o ../src/eap_common/eap_sim_common.o ../src/eap_peer/eap_tlv.o ../src/eap_peer/eap_pax.o ../src/eap_common/eap_pax_common.o ../src/eap_peer/eap_wsc.o ../src/eap_common/eap_wsc_common.o ../src/wps/wps.o ../src/eap_peer/eap_ikev2.o ../src/eap_peer/ikev2.o ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o ../src/eapol_supp/eapol_supp_sm.o ../src/eap_peer/eap.o ../src/eap_common/eap_common.o ../src/eap_peer/eap_methods.o ../src/utils/pcsc_funcs.o ../src/eap_peer/eap_tls_common.o ../src/crypto/tls_openssl.o ../src/crypto/ms_funcs.o ../src/eap_common/chap.o ../src/crypto/crypto_openssl.o ../src/crypto/sha256.o ctrl_iface.o ctrl_iface_unix.o ctrl_iface_dbus.o ctrl_iface_dbus_handlers.o dbus_dict_helpers.o ../src/rsn_supp/wpa_ft.o ../src/rsn_supp/wpa.o ../src/rsn_supp/preauth.o ../src/rsn_supp/pmksa_cache.o ../src/rsn_supp/peerkey.o ../src/rsn_supp/wpa_ie.o ../src/common/wpa_common.o ../src/crypto/aes_wrap.o ../src/crypto/aes.o ../src/crypto/dh_groups.o ../src/utils/base64.o ../src/drivers/scan_helpers.o wpa_supplicant.o events.o blacklist.o wpas_glue.o scan.o main.o ../src/drivers/driver_hostap.o ../src/drivers/driver_madwifi.o ../src/drivers/driver_atmel.o ../src/drivers/driver_wired.o ../src/drivers/driver_test.o ../src/drivers/driver_wext.o ../src/drivers/drivers.o ../src/l2_packet/l2_packet_linux.o -lpcsclite -lpthread -lssl -lcrypto -ldl -ldbus-1   
../src/eap_common/ikev2_common.o: In function `ikev2_encr_decrypt':
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:296: undefined reference to `crypto_cipher_init'
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:302: undefined reference to `crypto_cipher_decrypt'
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:307: undefined reference to `crypto_cipher_deinit'
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:304: undefined reference to `crypto_cipher_deinit'
../src/eap_common/ikev2_common.o: In function `ikev2_encr_encrypt':
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:233: undefined reference to `crypto_cipher_init'
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:239: undefined reference to `crypto_cipher_encrypt'
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:244: undefined reference to `crypto_cipher_deinit'
/tmp/buildd/wpasupplicant-0.6.2/wpa_supplicant/../src/eap_common/ikev2_common.c:241: undefined reference to `crypto_cipher_deinit'
collect2: ld returned 1 exit status

The compile warnings were due to x86_64, patch for those below.

Fix compile warnings in ikev2 source on x86_64.

Signed-off-by: Kel Modderman <kel at otaku42.de>
---
--- a/src/eap_common/ikev2_common.c
+++ b/src/eap_common/ikev2_common.c
@@ -327,7 +327,8 @@
 			   next_payload);
 		if (end - pos < (int) sizeof(*phdr)) {
 			wpa_printf(MSG_INFO, "IKEV2:   Too short message for "
-				   "payload header (left=%d)", end - pos);
+				   "payload header (left=%ld)",
+				   (long) (end - pos));
 		}
 		phdr = (const struct ikev2_payload_hdr *) pos;
 		plen = WPA_GET_BE16(phdr->payload_length);
--- a/src/eap_peer/eap_ikev2.c
+++ b/src/eap_peer/eap_ikev2.c
@@ -368,8 +368,8 @@
 
 		if (message_length < (u32) (end - pos)) {
 			wpa_printf(MSG_DEBUG, "EAP-IKEV2: Invalid Message "
-				   "Length (%d; %d remaining in this msg)",
-				   message_length, end - pos);
+				   "Length (%d; %ld remaining in this msg)",
+				   message_length, (long) (end - pos));
 			ret->ignore = TRUE;
 			return NULL;
 		}
--- a/src/eap_peer/ikev2.c
+++ b/src/eap_peer/ikev2.c
@@ -429,8 +429,8 @@
 	 */
 	if (kei_len - 4 != data->dh->prime_len) {
 		wpa_printf(MSG_INFO, "IKEV2: Invalid DH public value length "
-			   "%d (expected %d)",
-			   kei_len - 4, data->dh->prime_len);
+			   "%ld (expected %ld)",
+			   (long) (kei_len - 4), (long) data->dh->prime_len);
 		return -1;
 	}
 
@@ -456,7 +456,8 @@
 	}
 
 	if (ni_len < IKEV2_NONCE_MIN_LEN || ni_len > IKEV2_NONCE_MAX_LEN) {
-		wpa_printf(MSG_INFO, "IKEV2: Invalid Ni length %d", ni_len);
+		wpa_printf(MSG_INFO, "IKEV2: Invalid Ni length %ld",
+		           (long) ni_len);
 		return -1;
 	}
 
---



More information about the Hostap mailing list