Is there an existing issue for this?
Current Behavior
I have not checked which version it changed in but as of 7.2.7 unrars makefile does not contain -march=native, the line is:
CXXFLAGS=-O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
Therefore these all silently fail.
|
sed -i 's|CXXFLAGS=-march=native |CXXFLAGS=|' makefile && \ |
|
sed -i 's|CXXFLAGS=-march=native|CXXFLAGS=-march=armv8-a+crypto+crc|' makefile && \ |
|
sed -i 's|CXXFLAGS=-march=native |CXXFLAGS=|' makefile && \ |
X86_64 and RISV are no-ops because they just wanted to remove native, so they are not needed any more. However, aarch64 results in a build with no crypto or crc instructions because it's not passing -march=armv8-a+crypto+crc
However, I'm not sure what level of compatibility you actually want, I'm not familiar with the hardware but I know older RPi models wont have crypto but that's maybe too large a sacrifice for some old hardware.
edit: +crc+crypto is safe, unrar checks at runtime CRC_Neon (crc.cpp:44) and AES_Neon (rijndael.cpp:125) test getauxval(AT_HWCAP)
It could instead just match the lines starting LDFLAGS= or CXXFLAGS=, or grep -q to check the match exists and avoid such silent failures in the future.
Expected Behavior
No response
Steps To Reproduce
objdump -d unrar-alpine | grep -Ei 'aes|crc32'
Environment
- OS:
- How docker service was installed:
Docker creation
Container logs
Is there an existing issue for this?
Current Behavior
I have not checked which version it changed in but as of 7.2.7 unrars makefile does not contain
-march=native, the line is:Therefore these all silently fail.
docker-unrar/Dockerfile
Line 26 in cf6410b
docker-unrar/Dockerfile.aarch64
Line 27 in cf6410b
docker-unrar/Dockerfile.riscv64
Line 27 in cf6410b
X86_64 and RISV are no-ops because they just wanted to remove native, so they are not needed any more. However, aarch64 results in a build with no crypto or crc instructions because it's not passing
-march=armv8-a+crypto+crcHowever, I'm not sure what level of compatibility you actually want, I'm not familiar with the hardware but I know older RPi models wont have crypto but that's maybe too large a sacrifice for some old hardware.edit:
+crc+cryptois safe, unrar checks at runtimeCRC_Neon(crc.cpp:44) andAES_Neon(rijndael.cpp:125) testgetauxval(AT_HWCAP)It could instead just match the lines starting
LDFLAGS=orCXXFLAGS=, orgrep -qto check the match exists and avoid such silent failures in the future.Expected Behavior
No response
Steps To Reproduce
objdump -d unrar-alpine | grep -Ei 'aes|crc32'Environment
Docker creation
Container logs