Created attachment 648772 [details] config.log This is a similar issue to bug 729074 rsync fails on trying to be compiled during cross compilation attached build.log and config.log
Created attachment 648774 [details] build.log
It's 2 bugs: 1. rsync's configure.ac should provide cross-compileng arugument to AC_RUN_IFELSE() 2. gentoo's ebuild should probablya void passing --enable-simd for non-native case (as rsync's ./configure relies on successfull runtime feature detection)
Created attachment 652780 [details, diff] rsync-cross.patch rsync-cross.patch should fix rsync's configure.ac. CPU_FLAGS_X86="sse2" is a bit tricky: in cross-case we might want to override configure's autodetection.
(In reply to Sergei Trofimovich from comment #3) > Created attachment 652780 [details, diff] [details, diff] > rsync-cross.patch > > rsync-cross.patch should fix rsync's configure.ac. CPU_FLAGS_X86="sse2" is a > bit tricky: in cross-case we might want to override configure's > autodetection. So as I understand this, the current patch is not working fully. I added it to PATCHES for rsync-3.2.3 and it still fails at the same error.
For now ebuild comes with the following lines: if use elibc_glibc && [[ "${ARCH}" == "amd64" ]] ; then # SIMD is only available for x86_64 right now # and only on glibc (#728868) myeconfargs+=( $(use_enable cpu_flags_x86_sse2 simd) ) else myeconfargs+=( --disable-simd ) fi So workaround is the following: net-misc/rsync -cpu_flags_x86_sse2 -simd
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=826471502e24d5d22731fe07558260551c802d4c commit 826471502e24d5d22731fe07558260551c802d4c Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-10-22 18:43:49 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-10-22 18:46:48 +0000 net-misc/rsync: backport cross-compile fixes Closes: https://bugs.gentoo.org/732084 Closes: https://github.com/gentoo/gentoo/pull/22354 Closes: https://github.com/gentoo/gentoo/pull/22667 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-misc/rsync/files/rsync-3.2.3-cross.patch | 107 +++++++++++++++++++++++++++ net-misc/rsync/rsync-3.2.3-r4.ebuild | 52 ++++--------- net-misc/rsync/rsync-9999.ebuild | 5 -- 3 files changed, 122 insertions(+), 42 deletions(-)
Hello, bug still persist. The problem is the following: > Replace runtime SIMD check with a compile-only test in case of cross-compilation. > if test x"$host_cpu" = x"$build_cpu"; then Sorry, this check is too naive. "$host_cpu" and "$build_cpu" may equal to "x86_64" and it doesn't detect cross compiling. We should implement cross compiling detection using comparison of full toolchain name for "$host" and "$build". I am going to create a patch and pull request, thank you.
(In reply to Andrew Aladjev from comment #7) > Hello, bug still persist. The problem is the following: > > > Replace runtime SIMD check with a compile-only test in case of cross-compilation. > > if test x"$host_cpu" = x"$build_cpu"; then > > Sorry, this check is too naive. "$host_cpu" and "$build_cpu" may equal to > "x86_64" and it doesn't detect cross compiling. We should implement cross > compiling detection using comparison of full toolchain name for "$host" and > "$build". > > I am going to create a patch and pull request, thank you. Please do, thanks, although please do submit it upstream too as these were just backports.
Yes, please send any changes upstream and we can backport them from there.
Created attachment 749400 [details, diff] quick improvement of cross compilation detection I've added a pull request https://github.com/WayneD/rsync/pull/252
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a81d4c4da78b07828fa9a152d00bb20e0fe289a4 commit a81d4c4da78b07828fa9a152d00bb20e0fe289a4 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-11-08 01:18:06 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-11-08 01:18:06 +0000 net-misc/rsync: backport another cross-compile fix Bug: https://bugs.gentoo.org/732084 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-misc/rsync/files/rsync-3.2.3-cross.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)