Zulip Chat Archive
Stream: general
Topic: clang shared library `libtinfo.so.6` at compile
Quinn (Mar 11 2024 at 18:59):
if anyone has experience compiling lean artefacts with clang, lmk! I'm passing -I/path/to/lean/include
to clang and getting clang: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
Quinn (Mar 11 2024 at 19:17):
asked another way: is there any progress on baremetal runtime?
Julian Berman (Mar 11 2024 at 19:57):
I do not meet the first part of this sentence, but that error means you're missing ncurses
, and missing it on your shared library path rather than include path.
Julian Berman (Mar 11 2024 at 19:58):
(possibly sudo apt install -y libncurses-dev
or whatever it's called in Ubuntu or your OS is what you want, or else futzing with -L
/ LIBRARY_PATH
/ LD_LIBRARY_PATH
/ DYLD_LIBRARY_PATH
etc.)
Quinn (Mar 11 2024 at 21:35):
Ah interesting. I tried installing ncurses but didn't try the -L
stuff
Julian Berman (Mar 11 2024 at 21:38):
I am no C programmer but I believe the slightly more mature way to handle most of this is instead by messing with your PKG_CONFIG_PATH
-- and that if you have a reasonable package manager that it should be handling most of this for you already, but <redacted>
is what I use for package management and will not handle this so if you too are perhaps on mac<redacted>
you might be on the right path.
Quinn (Mar 11 2024 at 21:41):
I'm mixing Ubuntu and nixos for this project
Quinn (Mar 11 2024 at 21:42):
So I'll try these things for sure
Julian Berman (Mar 11 2024 at 21:45):
I would be very surprised if apt
didn't set you up correctly there. And certainly nix, though in order to get things right with nix you presumably have to follow how nix wants you to compile things, probably by writing some nixexpr rather than running commands.
Quinn (Mar 11 2024 at 21:50):
Yeah it's not an apt install clang it's a custom fork of llvm. So I've got a bit of effort cut out for me
Julian Berman (Mar 11 2024 at 21:55):
Oh then I'm way way less surprised :) -- but still shouldn't be difficult if you get the envvars right.
Last updated: May 02 2025 at 03:31 UTC