Skip to content
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

opam switch create dune fails on WSL: "undefined reference to `pthread_join@GLIBC_2.34'" #25203

Open
Arrow7000 opened this issue Feb 7, 2024 · 0 comments

Comments

@Arrow7000
Copy link

I'm trying to run opam switch create dune in a WSL shell but it fails.

Full logs

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["dune"]
[NOTE] Packages dune.3.13.1 don't have the 'compiler' flag set (nor any of their direct dependencies).
       You may want to use `opam switch set-invariant' to keep a stable compiler version on upgrades.

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-options-vanilla.1
⬇ retrieved ocaml-base-compiler.5.1.1  (cached)
⬇ retrieved dune.3.13.1  (https://opam.ocaml.org/cache)
[ERROR] The compilation of ocaml-base-compiler.5.1.1 failed at "make -j7".

#=== ERROR while compiling ocaml-base-compiler.5.1.1 ==========================#
# context     2.1.0 | linux/x86_64 |  | https://opam.ocaml.org#e587a943
# path        ~/.opam/dune/.opam-switch/build/ocaml-base-compiler.5.1.1
# command     /usr/bin/make -j7
# exit-code   2
# env-file    ~/.opam/log/ocaml-base-compiler-25821-6c5451.env
# output-file ~/.opam/log/ocaml-base-compiler-25821-6c5451.out
### output ###
# [...]
# /usr/bin/ld: /home/linuxbrew/.linuxbrew/opt/zstd/lib/libzstd.so: undefined reference to `pthread_join@GLIBC_2.34'
# /usr/bin/ld: /home/linuxbrew/.linuxbrew/opt/zstd/lib/libzstd.so: undefined reference to `pthread_create@GLIBC_2.34'
# collect2: error: ld returned 1 exit status
# make[2]: *** [Makefile:870: runtime/ocamlrund] Error 1
# /usr/bin/ld: /home/linuxbrew/.linuxbrew/opt/zstd/lib/libzstd.so: undefined reference to `pthread_join@GLIBC_2.34'
# /usr/bin/ld: /home/linuxbrew/.linuxbrew/opt/zstd/lib/libzstd.so: undefined reference to `pthread_create@GLIBC_2.34'
# collect2: error: ld returned 1 exit status
# make[2]: *** [Makefile:876: runtime/ocamlruni] Error 1
# make[2]: Leaving directory '/home/aron/.opam/dune/.opam-switch/build/ocaml-base-compiler.5.1.1'
# make[1]: *** [Makefile:209: coldstart] Error 2
# make[1]: Leaving directory '/home/aron/.opam/dune/.opam-switch/build/ocaml-base-compiler.5.1.1'
# make: *** [Makefile:375: world.opt] Error 2



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-base-compiler 5.1.1
└─ 
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray         base
│ ∗ install base-threads          base
│ ∗ install base-unix             base
│ ∗ install ocaml-options-vanilla 1
└─ 

<><> ocaml-base-compiler.5.1.1 troubleshooting ><><><><><><><><><><><><><><><><>
=> A failure in the middle of the build may be caused by build parallelism
      (enabled by default).
      Please file a bug report at https://github.com/ocaml/opam-repository/issues
=> You can try installing again including --jobs=1
      to force a sequential build instead.
# Run eval $(opam env --switch=dune) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n]

Screenshot of the full logs:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant