Bug 261384

Summary: archivers/7-zip: Fails to build on CURRENT arm64.aarch64: error in backend: Cannot select: intrinsic %llvm.aarch64.crc32b
Product: Ports & Packages Reporter: tech-lists
Component: Individual Port(s)Assignee: Max Brazhnikov <makc>
Status: Closed DUPLICATE    
Severity: Affects Some People CC: dim, mikael, tech-lists
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (makc)
koobs: maintainer-feedback? (dim)
koobs: merge-quarterly?
Hardware: arm64   
OS: Any   
Attachments:
Description Flags
source
none
run script none

Description tech-lists 2022-01-21 17:13:55 UTC
Created attachment 231218 [details]
source

Hi,

archivers/7-zip fails to build on arm64.aarch64 [rpi4b/8GB]

context:

14.0-CURRENT #0 main-n252557-19eaa01beab: Fri Jan 21 02:10:14 GMT 2022 
# git -C /usr/ports rev-list --first-parent --count main
572068
# git -C /usr/ports --no-pager log -1 --format=%cd origin/main
Fri Jan 21 11:37:34 2022 +0100

I've attached the requested debug files as per:

fatal error: error in backend: Cannot select: intrinsic %llvm.aarch64.crc32b
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.

FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: aarch64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/7zCrc-4170fc.c
clang: note: diagnostic msg: /tmp/7zCrc-4170fc.sh

[...]

Here is the output of the build failure:

[...]

fatal error: error in backend: Cannot select: intrinsic %llvm.aarch64.crc32b
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/bin/clang -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -fcolor-diagnostics -isystem /usr/local/include -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o b/c/7zCrc.o ../../../../C/7zCrc.c
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module '../../../../C/7zCrc.c'.
4.	Running pass 'AArch64 Instruction Selection' on function '@CrcUpdateT0_32'
 #0 0x00000000037bb578 (/usr/bin/clang+0x37bb578)
 #1 0x00000000037b99bc (/usr/bin/clang+0x37b99bc)
 #2 0x000000000375dc30 (/usr/bin/clang+0x375dc30)
 #3 0x000000000375dbb8 (/usr/bin/clang+0x375dbb8)
 #4 0x00000000037b41e0 (/usr/bin/clang+0x37b41e0)
 #5 0x00000000014b59a4 (/usr/bin/clang+0x14b59a4)
 #6 0x0000000003764774 (/usr/bin/clang+0x3764774)
 #7 0x0000000003764864 (/usr/bin/clang+0x3764864)
 #8 0x0000000003a14d14 (/usr/bin/clang+0x3a14d14)
 #9 0x0000000003a143e8 (/usr/bin/clang+0x3a143e8)
#10 0x0000000003b8953c (/usr/bin/clang+0x3b8953c)
#11 0x0000000003a0e8c8 (/usr/bin/clang+0x3a0e8c8)
#12 0x0000000003a0e134 (/usr/bin/clang+0x3a0e134)
#13 0x0000000003a0d7e8 (/usr/bin/clang+0x3a0d7e8)
#14 0x0000000003a0ba74 (/usr/bin/clang+0x3a0ba74)
#15 0x0000000003140adc (/usr/bin/clang+0x3140adc)
#16 0x00000000034af09c (/usr/bin/clang+0x34af09c)
#17 0x00000000034b481c (/usr/bin/clang+0x34b481c)
#18 0x00000000034af5a8 (/usr/bin/clang+0x34af5a8)
#19 0x0000000001b58d58 (/usr/bin/clang+0x1b58d58)
#20 0x0000000001b54f5c (/usr/bin/clang+0x1b54f5c)
#21 0x0000000001da74d8 (/usr/bin/clang+0x1da74d8)
#22 0x00000000021b9484 (/usr/bin/clang+0x21b9484)
#23 0x0000000001d0d0d8 (/usr/bin/clang+0x1d0d0d8)
#24 0x0000000001cb11dc (/usr/bin/clang+0x1cb11dc)
#25 0x0000000001da2a74 (/usr/bin/clang+0x1da2a74)
#26 0x00000000014b5710 (/usr/bin/clang+0x14b5710)
#27 0x00000000014c09b8 (/usr/bin/clang+0x14c09b8)
#28 0x0000000001bb5938 (/usr/bin/clang+0x1bb5938)
#29 0x000000000375db8c (/usr/bin/clang+0x375db8c)
#30 0x0000000001bb559c (/usr/bin/clang+0x1bb559c)
#31 0x0000000001b8fa88 (/usr/bin/clang+0x1b8fa88)
#32 0x0000000001b8fe30 (/usr/bin/clang+0x1b8fe30)
#33 0x0000000001b9fc04 (/usr/bin/clang+0x1b9fc04)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: aarch64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin

[...]
Comment 1 tech-lists 2022-01-21 17:14:44 UTC
Created attachment 231219 [details]
run script
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2022-01-30 16:17:17 UTC

*** This bug has been marked as a duplicate of bug 260329 ***
Comment 3 tech-lists 2022-01-30 23:51:12 UTC
I confirm it builds successfully on rpi4 (aarch64)
Comment 4 Max Brazhnikov freebsd_committer freebsd_triage 2022-01-31 08:45:44 UTC
(In reply to tech-lists from comment #3)
Could you test the latest patch from bug 260329? You need to remove CFLAGS_aarch64 from the port Makefile first.
Comment 5 tech-lists 2022-02-01 01:30:34 UTC
(In reply to Max Brazhnikov from comment #4)

No that didn't work for me. The patch failed to apply cleanly.