Emerging bareos fails with this error: work/bareos-Release-23.0.2/third-party/xxHash/xxh_x86dispatch.c /var/tmp/portage/app-backup/bareos-23.0.2/work/bareos-Release-23.0.2/third-party/xxHash/xxh_x86dispatch.c:85:4: Fehler: #error "Do not compile xxh_x86dispatch.c with AVX enabled! See the comment above." 85 | # error "Do not compile xxh_x86dispatch.c with AVX enabled! See the comment above." | ^~~~~ [2/375] /usr/bin/x86_64-pc-linux-gnu-g++ -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc -I/var/tmp/portage/app-backup/bareos-23.0.2/work/bareos-Release-23.0.2/core/src Problem is it is disabled: [ebuild U ~] app-backup/bareos-23.0.2::gentoo [22.1.2-r1::gentoo] USE="acl director ipv6 readline (split-usr) storage-daemon xattr -X -ceph -clientonly -glusterfs -lmdb -logwatch -ndmp -scsi-crypto -static -systemd -tcpd -test -vim-syntax -vmware" CPU_FLAGS_X86="-avx%" 0 KiB Most probably the ebuild fails to honor "-avx" although it is enforced
Please include the full build.log and emerge --info.
Created attachment 887268 [details] emerge info
Created attachment 887269 [details] build log
I've attached the files
With -march=native I have just the same error. It seems that disabling AVX cpu flag is not enough. See comment in according file: * @file xxh_x86dispatch.c * * Automatic dispatcher code for the @ref xxh3_family on x86-based targets. * * Optional add-on. * * **Compile this file with the default flags for your target.** Do not compile * with flags like `-mavx*`, `-march=native`, or `/arch:AVX*`, there will be * an error. See @ref XXH_X86DISPATCH_ALLOW_AVX for details. As workaround, I set CFLAGS and others in /etc/portage/env/bareos.conf and /etc/portage/package.env
@ALex Can you explain in more detail your workaround? I'm affected by this problem too and can't get the ebuild working.
Is this still an issue with the current 23.1.0 version?
this problem is still actual for app-backup/bareos-23.1.1 ~ # emerge -avt app-backup/bareos [...skip some lines...] [ebuild N ~] app-backup/bareos-23.1.1::gentoo USE="acl clientonly ipv6 readline (split-usr) xattr -X -ceph -director -glusterfs -lmdb -logwatch -ndmp -scsi-crypto -static -storage-daemon -systemd -tcpd -test -vim-syntax -vmware" CPU_FLAGS_X86="-avx" 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] [6/234] /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fomit-frame-pointer -mno-tls-direct-seg-refs -fPIC -O3 -MD -MT third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o -MF third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o.d -o third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o -c /var/tmp/portage/app-backup/bareos-23.1.1/work/bareos-Release-23.1.1/third-party/xxHash/xxh_x86dispatch.c FAILED: third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fomit-frame-pointer -mno-tls-direct-seg-refs -fPIC -O3 -MD -MT third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o -MF third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o.d -o third-party/CMakeFiles/xxhash.dir/xxHash/xxh_x86dispatch.c.o -c /var/tmp/portage/app-backup/bareos-23.1.1/work/bareos-Release-23.1.1/third-party/xxHash/xxh_x86dispatch.c /var/tmp/portage/app-backup/bareos-23.1.1/work/bareos-Release-23.1.1/third-party/xxHash/xxh_x86dispatch.c:85:4: error: #error "Do not compile xxh_x86dispatch.c with AVX enabled! See the comment above." 85 | # error "Do not compile xxh_x86dispatch.c with AVX enabled! See the comment above." | ^~~~~
I apologize, I made a terrible mistake. COMMON_FLAGS had "-march=native" which is not allowed. This is clearly stated in the source.