-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mbuffer
: cross-compiled libgcc_s.so.1 must be built with glibc headers for pthread_cleanup_push() to work
#213453
Comments
It is a bug in # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
# any program we run, because the gcc will have been placed at a new
# store path than that determined when built (as a source for the
# bootstrap-tools tarball)
# Building from a proper gcc staying in the path where it was installed,
# libgcc_s will now be at {gcc}/lib, and gcc's libgcc will be found without
# any special hack.
# TODO: remove this hack. Things that rely on this hack today:
# - dejagnu: during linux bootstrap tcl SIGSEGVs
# - clang-wrapper in cross-compilation
# Last attempt: https://github.com/NixOS/nixpkgs/pull/36948
preInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
mkdir -p $out/lib
cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
# the .so It used to be a symlink, but now it is a script
cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so
fi
''; But in cross-case |
We don't do the copying to glibc anymore, but this error still occurs as described on current nixpkgs master. |
Yup. cross-compilation never propagated |
Could you please try this PR? It should fix the problem. |
With that PR, I'm seeing this on both $ nix build .#pkgsCross.aarch64-multiplatform.mbuffer
$ echo "hello" | result/bin/mbuffer
hello
Trace/breakpoint trap (core dumped)
$ echo $?
133 Log from aarch64 machine:
Log from
|
Well it's finding
When I run it with
That line (
... so Grepping through the
This is happening because I'm afraid that's all I've got here. I've removed the closed-by from #238154 since it was only part of the problem here. |
Ah, I think I know what it is. We can compile a |
@Majiir would you please try #241208? I believe it fixes one of the two problems which caused this issue, and it includes #238154 which fixes the other one. It works for me:
BTW, this issue (cross-compile |
mbuffer
: libgcc_s.so.1 must be installed for pthread_exit to workmbuffer
: cross-compiled libgcc_s.so.1 must be built with --enable-threads for pthread_cleanup_push() to work
mbuffer
: cross-compiled libgcc_s.so.1 must be built with --enable-threads for pthread_cleanup_push() to workmbuffer
: cross-compiled libgcc_s.so.1 must be built with glibc headers for pthread_cleanup_push() to work
@amjoseph-nixpkgs Confirming #241208 fixes the issue. Tested with both |
Added this to |
Describe the bug
On
armv7l-linux
oraarch64-linux
cross-compiled fromx86_64-linux
,mbuffer
breaks:From
armv7l-linux
:Steps To Reproduce
You can either run this on another architecture using
boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]
.or
Expected behavior
mbuffer
should not crash:Additional context
This was responsible for
syncoid
failing to replicate datasets to my ARM NAS.The issue does not occur for natively compiled
aarch64-linux
builds. It appears to be a cross-compilation issue only.Notify maintainers
@tokudan @skeuchel
Metadata
The text was updated successfully, but these errors were encountered: