ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
511 stars 1.1k forks source link

libtsan not found #25915

Open kit-ty-kate opened 1 month ago

kit-ty-kate commented 1 month ago
#=== ERROR while compiling ocaml-variants.5.2.0+options =======================#
# context     2.2.0~beta2 | linux/arm64 |  | https://opam.ocaml.org#97de3378
# path        ~/.opam/tsan/.opam-switch/build/ocaml-variants.5.2.0+options
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix=/home/kit_ty_kate/.opam/tsan --docdir=/home/kit_ty_kate/.opam/tsan/doc/ocaml -C --enable-tsan --disable-warn-error
# exit-code   1
# env-file    ~/.opam/log/ocaml-variants-43483-77a044.env
# output-file ~/.opam/log/ocaml-variants-43483-77a044.out
### output ###
# [...]
# checking whether fma works... yes
# checking for gcc options needed to detect all undeclared functions... none needed
# checking for unistd.h... (cached) yes
# checking whether getentropy is declared... yes
# checking for getrusage... yes
# checking for times... yes
# checking for secure_getenv... yes
# checking for issetugid... no
# checking for library containing clock_gettime... none required
# configure: using thread sanitizer with vendor=gcc-14-1
# configure: error: libtsan is necessary for TSan but cannot be found.
#                    Try installing it on your system.

cc @OlivierNicole is there no way to detect that and autoinstall it like it's done in conf-unwind?

OlivierNicole commented 1 month ago

Huh. That’s new to me. libtsan is supposed to come bundled with GCC. Unless it changed in GCC 14?

kit-ty-kate commented 1 month ago

If that matters, I'm using Fedora 40

OlivierNicole commented 1 month ago

(cc @fabbing)

OlivierNicole commented 1 month ago

Given your other reports it looks like you’ve been able to work your way around this to install TSan. Did you downgrade your GCC?

kit-ty-kate commented 1 month ago

no I simply installed the libtsan package using dnf manually. But i think there should be a conf package that does it.

OlivierNicole commented 1 month ago

Thanks for the report. I hadn’t heard of a libtsan package having to be installed before, this seems Fedora-specific. I’ll try to look into conf packages when I find some time.