You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built on the PR that came out of the linked thread with what I believed to be the necessary changes. Here's a branch you can check out. For brevity, it includes these changes beyond the PR which adds emscripten_3_1_49:
diff --git a/pkgs/development/compilers/emscripten/3.1.49.nix b/pkgs/development/compilers/emscripten/3.1.49.nix
index 83a8232e734a..cdf468d11050 100644
--- a/pkgs/development/compilers/emscripten/3.1.49.nix+++ b/pkgs/development/compilers/emscripten/3.1.49.nix@@ -3,7 +3,7 @@
, llvmPackages
, symlinkJoin, makeWrapper, substituteAll
, buildNpmPackage
-, emscripten+, emscripten_3_1_49
}:
stdenv.mkDerivation rec {
@@ -128,7 +128,7 @@ stdenv.mkDerivation rec {
# HACK: Make emscripten look more like a cc-wrapper to GHC
# when building the javascript backend.
targetPrefix = "em";
- bintools = emscripten;+ bintools = emscripten_3_1_49;
};
meta = with lib; {
and
diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix
index f4d2a279a678..24ed2d0ea4fe 100644
--- a/pkgs/development/compilers/ghc/common-hadrian.nix+++ b/pkgs/development/compilers/ghc/common-hadrian.nix@@ -211,7 +211,7 @@ let
# GHC doesn't seem to have {LLC,OPT}_HOST
toolsForTarget = [
(if targetPlatform.isGhcjs
- then pkgsBuildTarget.emscripten+ then pkgsBuildTarget.emscripten_3_1_49
else pkgsBuildTarget.targetPackages.stdenv.cc)
] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm;
There is no other mention of emscripten in the ghc folder
Sadly, this returns us to the original problem of configure: error: sub-word-sized atomic operations are not available., which as far as I can see is the misreported emscripten cache directory issue.
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libstubs.a... (this will be cached in "/build/ghc-9.8.1/emcache.p7GU4z5VJu/sysroot/lib/wasm32-emscripten/libstubs.a" for subsequent builds)
Traceback (most recent call last):
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 4579, in <module>
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 4572, in main
ret = run(args)
^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 1341, in run
linker_inputs = phase_compile_inputs(options, state, newargs, input_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 3062, in phase_compile_inputs
system_libs.ensure_sysroot()
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
Traceback (most recent call last):
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 4579, in <module>
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/system_libs.py", line 2382, in ensure_sysroot
cache.get('sysroot_install.stamp', install_system_headers, what='system headers')
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/cache.py", line 157, in get
with lock(shortname):
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/cache.py", line 61, in lock
acquire_cache_lock(reason)
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/cache.py", line 35, in acquire_cache_lock
assert 'EM_CACHE_IS_LOCKED' not in os.environ, f'attempt to lock the cache while a parent process is holding the lock ({reason})'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: attempt to lock the cache while a parent process is holding the lock (sysroot_install.stamp)
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 4572, in main
ret = run(args)
^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 1341, in run
linker_inputs = phase_compile_inputs(options, state, newargs, input_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/emcc.py", line 3062, in phase_compile_inputs
system_libs.ensure_sysroot()
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/system_libs.py", line 2382, in ensure_sysroot
cache.get('sysroot_install.stamp', install_system_headers, what='system headers')
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/cache.py", line 157, in get
with lock(shortname):
File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/cache.py", line 61, in lock
acquire_cache_lock(reason)
File "/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/tools/cache.py", line 35, in acquire_cache_lock
assert 'EM_CACHE_IS_LOCKED' not in os.environ, f'attempt to lock the cache while a parent process is holding the lock ({reason})'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: attempt to lock the cache while a parent process is holding the lock (sysroot_install.stamp)
emcc: error: Subprocess 1/2 failed (returned 1)! (cmdline: /nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/bin/emcc -c -O2 -Wall -fno-unroll-loops -g -sSTRICT -Werror -I/nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/system/lib/libc/musl/src/include -DNDEBUG ../../../../../nix/store/yvjcq2yrkn6c6qp3rnq1n9vabpvqawdk-emscripten-3.1.49/share/emscripten/system/lib/libc/emscripten_syscall_stubs.c)
Since the cache directory is in /build, I assume that this is not the issue, so in my understanding, either we are running nested emccs or the environment variables aren't handled properly.
wegank
changed the title
Build failure: pgksCross.ghcjs.buildPackages.haskell.compiler.ghc{98,HEAD}
Build failure: pkgsCross.ghcjs.buildPackages.haskell.compiler.ghc{98,HEAD}
Feb 5, 2024
This is a continuation of #269904 (comment)
Steps To Reproduce
Steps to reproduce the behavior:
Build log
nix build nixpkgs#pkgsCross.ghcjs.buildPackages.haskell.compiler.ghc98
: https://gist.github.com/voidus/8efb39b40ef7722979610bcaa7f902daAdditional context
I built on the PR that came out of the linked thread with what I believed to be the necessary changes. Here's a branch you can check out. For brevity, it includes these changes beyond the PR which adds emscripten_3_1_49:
and
There is no other mention of emscripten in the ghc folder
Sadly, this returns us to the original problem of
configure: error: sub-word-sized atomic operations are not available.
, which as far as I can see is the misreported emscripten cache directory issue.nix build github:voidus/nixpkgs/ghcjs-build-failure#pkgsCross.ghcjs.buildPackages.haskell.compiler.ghc98
:Notable excerpt from
config.log
:Since the cache directory is in
/build
, I assume that this is not the issue, so in my understanding, either we are running nestedemcc
s or the environment variables aren't handled properly.Notify maintainers
@guibou @cdepillabout @expipiplus1 @maralorn @ncfavier @sternenseemann
(Sorry if this is excessive, please let me know)
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: