Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 864807 - dev-cpp/highway-1.0.0: Compilation failure on SandyBridge with -march=native
Summary: dev-cpp/highway-1.0.0: Compilation failure on SandyBridge with -march=native
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Novomeský
URL: https://github.com/google/highway/iss...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-08-10 15:31 UTC by Holger Hoffstätte
Modified: 2022-08-31 08:42 UTC (History)
2 users (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 Holger Hoffstätte 2022-08-10 15:31:42 UTC
See $URL for upstream report. For a quick fix we could filter-flag -march=native until upstream has figured out why this happens.


Reproducible: Always

Steps to Reproduce:
1. emerge highway-1.0.0 on a CPU without AVX2 and -march=native in CXXFLAGS
2. build failure

Actual Results:  
[ 13%] Building CXX object CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_i16a.cc.o
In file included from /tmp/highway-1.0.0/hwy/highway.h:352,
                 from /tmp/highway-1.0.0/hwy/contrib/sort/shared-inl.h:103,
                 from /tmp/highway-1.0.0/hwy/contrib/sort/traits-inl.h:27,
                 from /tmp/highway-1.0.0/hwy/contrib/sort/vqsort_i16a.cc:23,
                 from /tmp/highway-1.0.0/hwy/foreach_target.h:169,
                 from /tmp/highway-1.0.0/hwy/contrib/sort/vqsort_i16a.cc:20:
/tmp/highway-1.0.0/hwy/ops/x86_256-inl.h: In instantiation of 'size_t hwy::N_AVX2::CompressBlendedStore(hwy::N_AVX2::Vec256<T>, hwy::N_AVX2::Mask256<T>, hwy::N_AVX2::Full256<T>, T*) [with T = short int; hwy::EnableIf<(sizeof (T) == 2)>* <anonymous> = 0; size_t = long unsigned int; hwy::N_AVX2::Full256<T> = hwy::N_AVX2::Simd<short int, 16, 0>]':
/tmp/highway-1.0.0/hwy/contrib/sort/vqsort-inl.h:412:33:   required from 'size_t hwy::N_AVX2::detail::Partition(D, Traits, T*, size_t, size_t, hwy::N_AVX2::Vec<D>, T*) [with D = hwy::N_AVX2::Simd<short int, 16, 0>; Traits = hwy::N_AVX2::detail::SharedTraits<hwy::N_AVX2::detail::TraitsLane<hwy::N_AVX2::detail::OrderAscending<short int> > >; T = short int; size_t = long unsigned int; hwy::N_AVX2::Vec<D> = hwy::N_AVX2::Vec256<short int>]'
/tmp/highway-1.0.0/hwy/contrib/sort/vqsort-inl.h:634:33:   required from 'void hwy::N_AVX2::detail::Recurse(D, Traits, T*, T*, size_t, size_t, hwy::N_AVX2::Vec<D>, T*, hwy::N_AVX2::detail::Generator&, size_t) [with D = hwy::N_AVX2::Simd<short int, 16, 0>; Traits = hwy::N_AVX2::detail::SharedTraits<hwy::N_AVX2::detail::TraitsLane<hwy::N_AVX2::detail::OrderAscending<short int> > >; T = short int; size_t = long unsigned int; hwy::N_AVX2::Vec<D> = hwy::N_AVX2::Vec256<short int>]'
/tmp/highway-1.0.0/hwy/contrib/sort/vqsort-inl.h:755:18:   required from 'void hwy::N_AVX2::Sort(D, Traits, T*, size_t, T*) [with D = hwy::N_AVX2::Simd<short int, 16, 0>; Traits = hwy::N_AVX2::detail::SharedTraits<hwy::N_AVX2::detail::TraitsLane<hwy::N_AVX2::detail::OrderAscending<short int> > >; T = short int; size_t = long unsigned int]'
/tmp/highway-1.0.0/hwy/contrib/sort/vqsort_i16a.cc:34:7:   required from here
/tmp/highway-1.0.0/hwy/ops/x86_256-inl.h:5174:9: error: 'memcpy' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
 5174 |   memcpy(unaligned, buf, count * sizeof(T));
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:490,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/stdint.h:9,
                 from /tmp/highway-1.0.0/hwy/base.h:22,
                 from /tmp/highway-1.0.0/hwy/contrib/sort/vqsort.h:27,
                 from /tmp/highway-1.0.0/hwy/contrib/sort/vqsort_i16a.cc:16:
/usr/include/bits/string_fortified.h:26:1: note: 'void* memcpy(void*, const void*, size_t)' declared here, later in the translation unit
   26 | __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
      | ^~~~~
make[2]: *** [CMakeFiles/hwy_contrib.dir/build.make:160: CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_i16a.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:265: CMakeFiles/hwy_contrib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2


Expected Results:  
Clean build
Comment 1 Reva Denis 2022-08-14 09:21:06 UTC
Also on ivy bridge.
Comment 2 Holger Hoffstätte 2022-08-15 15:49:42 UTC
This has been fixed with upstream commit:
https://github.com/google/highway/commit/0d4e6311b38467f31e8c817aa7e1d1549d1e699e
Comment 3 Holger Hoffstätte 2022-08-25 10:26:24 UTC
This is fixed in 1.0.1 (https://github.com/google/highway/releases/tag/1.0.1).
Comment 4 Daniel Novomeský 2022-08-25 11:46:37 UTC
Yes, I am planning to replace 1.0.0 with the 1.0.1
Comment 5 Larry the Git Cow gentoo-dev 2022-08-31 08:42:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9914183be5c091d9cab9ef1845c54ae4885d33ed

commit 9914183be5c091d9cab9ef1845c54ae4885d33ed
Author:     Daniel Novomesky <dnovomesky@gmail.com>
AuthorDate: 2022-08-25 14:41:01 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2022-08-31 08:42:38 +0000

    dev-cpp/highway: version bump to 1.0.1
    
    Closes: https://bugs.gentoo.org/864807
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Daniel Novomesky <dnovomesky@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/27018
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 dev-cpp/highway/Manifest                                       | 2 +-
 dev-cpp/highway/{highway-1.0.0.ebuild => highway-1.0.1.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)