please icon indicating copy to clipboard operation
please copied to clipboard

test: hardcoded ld emulation mode doesn't work on non-darwin env

Open folliehiyuki opened this issue 2 years ago • 2 comments

https://github.com/thought-machine/please/blob/22137cc3e171d99f9a51df16761f8c8aa1c31359/test/build_defs/cc_embed_binary.build_defs#L67

The build rule hardcodes -m elf_$XARCH argument and passes it to ld.

For my environment (AlpineLinux), this seems to only work on x86_64, and the test //test/cc_rules/gcc:* is failing on AlpineLinux's aarch64 CI: https://gitlab.alpinelinux.org/FollieHiyuki/aports/-/jobs/1049123

folliehiyuki avatar Jun 15 '23 15:06 folliehiyuki

The failed log:

17:10:53.905   ERROR: //test/cc_rules/gcc:_embedded_file_1#lib failed:
Error building target //test/cc_rules/gcc:_embedded_file_1#lib: exit status 1
/usr/bin/ld: unrecognised emulation mode: elf_aarch_64
Supported emulations: aarch64linux aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi
17:10:53.905   ERROR: //test/config_rules:all failed:
None of the select() conditions matched

folliehiyuki avatar Jun 15 '23 15:06 folliehiyuki

This issue has been automatically marked as stale because it has not had any recent activity in the past 90 days. It will be closed if no further activity occurs. If you require additional support, please reply to this message. Thank you for your contributions.

stale[bot] avatar Sep 16 '23 23:09 stale[bot]