Lean is a theorem prover and programming language.
I like writing proofs, so I tried to port Lean to Haiku. Here’s the progress so far (as haikuporter package): GitHub - suhr/haikuports at lean
C++ code seems to compile. But build fails with /usr/bin/env: No such file or directory even though I replaces all occurrences of /usr/bin/env with /bin/.
“/usr/bin/env” is a tool that is often used in shellscript shebang lines to call the “right” location for a tool, when you don’t know where it is on the distro.
So for example the shebang line may be “#!/usr/bin/env bash”
Of course this isn’t really portable either, some OSes simply don’t have this tool at that location… iirc haiku is supposed to have some workaround but it does not seem to work for you here.
Anyway the solution is to just remove it entirely. If the shebang line was “#!/usr/bin/env bash” change it to “#!bash”
Quick check reveals missing package for cadical, tried building it in Terminal but not going to hunt it further down, need libnetwork but for some reason doesn’t seem to work.
The env worling in shebangs is a kind of hack, because we don’t have a /usr, as a consequence it works only in shebangs. If your project somehow tries to call “/usr/bin/env” on it’s own that will fail
My bad OK, first comment, for cadicad, add a section for the static library (should be in _devel together with the headers).
Missing TEST() case, 2 test failing/crashing, disabling them in the api/run.sh file succeeds which is pretty good. Failing tests are: parcompwrite and cfreeze.
EDIT: missing cmd:awk also in this recipe (BUILD_PREREQUIRES).
/var/shared_memory> cat test
#!/usr/bin/missing
/var/shared_memory> ./test
runtime_loader: Cannot open file /bin/missing (needed by <NULL>): No such file or directory
No such luxury when you directly call the program, as you are asking for a path that does not exist:
~/src/haikuports> /usr/bin/env
bash: /usr/bin/env: No such file or directory
And that’s what you are getting.
There’s a hint of where it comes from just after the error: