Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731110 - Compile fails with net-misc/rsync-3.2.0+ on uclibc-ng amd64
Summary: Compile fails with net-misc/rsync-3.2.0+ on uclibc-ng amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-06 17:37 UTC by Ed Wildgoose
Modified: 2020-07-06 20:46 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 Ed Wildgoose 2020-07-06 17:37:05 UTC
There is a new feature in latest rsync to support SIMD functions. The latest ebuild toggles this on if the architecture is detected as amd64. However, I believe that "ifunc" is not supported on libc other than glibc. So no support on uclibc-ng, (and that I know of) uclibc, musl.

This triggers a build error on uclibc-ng (and probably musl) architectures with the following:

...
./simd-checksum-x86_64.cpp: In function 'uint32_t get_checksum1_cpp(char*, int32_t)':
./simd-checksum-x86_64.cpp:88:52: error: multiversioning needs ifunc which is not supported on this target
   88 | __attribute__ ((target("default"))) MVSTATIC int32 get_checksum1_avx2_64(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2) { return i; }
      |                                                    ^~~~~~~~~~~~~~~~~~~~~
./simd-checksum-x86_64.cpp:474:1: error: use of multiversioned function without a default
  474 | }
      | ^
./simd-checksum-x86_64.cpp:89:52: error: multiversioning needs ifunc which is not supported on this target
   89 | __attribute__ ((target("default"))) MVSTATIC int32 get_checksum1_ssse3_32(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2) { return i; }
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
./simd-checksum-x86_64.cpp:474:1: error: use of multiversioned function without a default
  474 | }
      | ^
make: *** [Makefile:135: simd-checksum-x86_64.o] Error 1


I think the correct fix in this situation is to have the build tighten up it's check for "use_enable simd" and ensure it's only enabled on glibc (or equivalently exclude uclibc-ng and probably musl)

Apologies for the lack of patch, but i think this a fairly trivial one liner. Thanks

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-07-06 18:10:00 UTC
Please emerge --sync and check this change has been applied:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dd34a97435475f490756095307aeade0acf86e2

This should resolve your problem.
Comment 2 Ed Wildgoose 2020-07-06 20:46:24 UTC
Aha, yep, fair enough. That's done it.

Apologies, I was using the stable version (3.2.0) and although I unmasked that one I also modified it, so failed to notice the change. Thanks for the quick fix, recommend pushing to stable as it's possible

Thanks!