Skip to contentSkip to conversation

test failure with LTO still present

DISCUSSION Andreas Radke 2 participants 2 messages Jan 22, 2024

lore
Share & tools
lore
#0 lore raw

When building the Arch Linux package with lto enabled we are still getting this old failure here:

PASS: unit/test-eap-sim
CC unit/test-sae.o
CCLD unit/test-sae
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o: in function `sae_choose_next_group':
/usr/src/debug/iwd/iwd-2.13/src/sae.c:153:(.text+0xb9b): undefined reference to `__wrap_l_ecc_supported_ike_groups'
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o: in function `sae_rx_authenticate':
/usr/src/debug/iwd/iwd-2.13/src/sae.c:197:(.text+0x2e21): undefined reference to `__wrap_l_ecc_supported_ike_groups'
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o: in function `handshake_state_free':
/usr/src/debug/iwd/iwd-2.13/src/handshake.c:49:(.text+0x3455): undefined reference to `__wrap_l_ecc_supported_ike_groups'
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o:/usr/src/debug/iwd/iwd-2.13/src/handshake.c:49:(.text+0x3491): undefined reference to `__wrap_l_ecc_supported_ike_groups'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2279: unit/test-sae] Error 1
make[2]: *** [Makefile:3016: check-TESTS] Error 2
make[1]: *** [Makefile:3366: check-am] Error 2
make: *** [Makefile:3368: check] Error 2

This seems to be the same error reported to the iwd list here:
https://lore.kernel.org/iwd/[email protected]/T/#mbe4525effbbcde51a291ece026da1a25ecbfcbc4

and also Debian and Gentoo seems to be affected as well:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015432
https://bugs.gentoo.org/877755

Is there any way to solve this other than to disable lto?

-Andy
Arch Linux

#1 lore raw

Hi Andreas,

Quoted 20 lines · Andreas Radke

When building the Arch Linux package with lto enabled we are still getting this old failure here:

PASS: unit/test-eap-sim
CC unit/test-sae.o
CCLD unit/test-sae
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o: in function `sae_choose_next_group':
/usr/src/debug/iwd/iwd-2.13/src/sae.c:153:(.text+0xb9b): undefined reference to `__wrap_l_ecc_supported_ike_groups'
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o: in function `sae_rx_authenticate':
/usr/src/debug/iwd/iwd-2.13/src/sae.c:197:(.text+0x2e21): undefined reference to `__wrap_l_ecc_supported_ike_groups'
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o: in function `handshake_state_free':
/usr/src/debug/iwd/iwd-2.13/src/handshake.c:49:(.text+0x3455): undefined reference to `__wrap_l_ecc_supported_ike_groups'
/usr/bin/ld: /tmp/cc7oo1S0.ltrans0.ltrans.o:/usr/src/debug/iwd/iwd-2.13/src/handshake.c:49:(.text+0x3491): undefined reference to `__wrap_l_ecc_supported_ike_groups'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2279: unit/test-sae] Error 1
make[2]: *** [Makefile:3016: check-TESTS] Error 2
make[1]: *** [Makefile:3366: check-am] Error 2
make: *** [Makefile:3368: check] Error 2

Quoted 9 lines

This seems to be the same error reported to the iwd list here:
https://lore.kernel.org/iwd/[email protected]/T/#mbe4525effbbcde51a291ece026da1a25ecbfcbc4

and also Debian and Gentoo seems to be affected as well:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015432
https://bugs.gentoo.org/877755

Is there any way to solve this other than to disable lto?

We hack into and overload ell's l_ecc_supported_ike_groups() for the purposes of this test. This solution is non-invasive to ell and works great on non-LTO builds, but doesn't work with LTO. Short of introducing private methods into ell for overriding default behavior, I'm not sure what the solution is.

[1] https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/ecc.c#n98
[2] https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/unit/test-sae.c#n41

Regards,
-Denis