Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757852 - app-crypt/veracrypt-1.24_p7 fails to compile on arm64 due to typo in the ebuild
Summary: app-crypt/veracrypt-1.24_p7 fails to compile on arm64 due to typo in the ebuild
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Göktürk Yüksek
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-01 11:29 UTC by Roy Bamford
Modified: 2021-07-25 21:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Bamford gentoo-dev 2020-12-01 11:29:58 UTC
The ebuild contains
                $(usex cpu_flags_x86_sse2 "" "NOSSE2=1")
                $(usex cpu_flags_x86_sse4_1 "SSE41=1" "")
                $(usex cpu_flags_x86_ssse3 "SSSE3=1" "")
which passes -mno-sse2 to the compiler. That makes gcc unhappy
aarch64-unknown-linux-gnu-g++: error: unrecognized command-line option ‘-mno-sse2’

The statement   $(usex cpu_flags_x86_sse2 "" "NOSSE2=1") 
has the parameters in the wrong order.

Please fix the typo and add the ~arm64 keyword.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-01 15:19:17 UTC
I don't think it's a typo. If we *don't* have SSE2, we pass NOSSE=1 (notice the NO) to the build system.

The problem is that apparently -mno-sse2 isn't valid on non x86{,-64}.
Comment 2 Göktürk Yüksek archtester gentoo-dev 2020-12-09 00:06:20 UTC
https://github.com/veracrypt/VeraCrypt/blob/master/src/Makefile#L157
```
ifeq "$(CPU_ARCH)" "x86"
	PLATFORM_ARCH := i386
	SIMD_SUPPORTED := 1
	C_CXX_FLAGS += -D TC_ARCH_X86
else ifeq "$(CPU_ARCH)" "x64"
	PLATFORM_ARCH := amd64
	SIMD_SUPPORTED := 1
	C_CXX_FLAGS += -D TC_ARCH_X64
endif
```

Doesn't look like the upstream cares about other architectures. This will have to be fixed upstream because the build system explicitly adds '-msse2' or '-mno-sse2'  depending on the flag.
Comment 3 Göktürk Yüksek archtester gentoo-dev 2021-07-25 21:13:26 UTC
No progress in 6+ months. Closing with UPSTREAM. @neddy, feel free to reopen if you ask the upstream to add arm support, though this bug probably won't be needed then.