Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79263 - xxhash cannot be build with AVX enabled

Attached to Project: Arch Linux
Opened by entrider (entrider) - Tuesday, 01 August 2023, 02:42 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 01 August 2023, 05:55 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
`extra/xxhash` package cannot be build with AVX enabled, as a result users with relatively new CPUs are unable to rebuild it with `-march=native`, and this is unfortunate. Thankfully the problem can be solved by appending -mno-avx` to users' CFLAGS by editing PKGBUILD like this:
```
build() {
CFLAGS+=" -mno-avx"
make PREFIX=/usr DISPATCH=1 -C xxHash
}
```

* package version: 0.8.2-1

Steps to reproduce:
1. open `/etc/makepkg.conf` set CFLAGS="-march=x86-64-v3 -O3 -pipe", for example.
2. Download the latest version of `extra/xxhash` package and try to build it with `makepkg`.
3. You will get the following error:
```
xxh_x86dispatch.c:85:4: error: #error "Do not compile xxh_x86dispatch.c with AVX enabled! See the comment above."
```
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 01 August 2023, 05:55 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by entrider (entrider) - Tuesday, 01 August 2023, 02:57 GMT
I forgot to include the comment: "if xxh_x86dispatch.c is compiled with AVX enabled, the resulting binary will crash on sse2-only cpus !! If you nonetheless want to do that, please enable the XXH_X86DISPATCH_ALLOW_AVX build variable"
Comment by Toolybird (Toolybird) - Tuesday, 01 August 2023, 05:55 GMT
> as a result users with relatively new CPUs are unable to rebuild it with `-march=native`

This is of no concern to us. Arch official pkgs are built with [1]. Anything else is not supported i.e. you're on your own.

[1] https://gitlab.archlinux.org/archlinux/devtools/-/blob/v1.0.3/config/makepkg/x86_64.conf

Loading...