-
Notifications
You must be signed in to change notification settings - Fork 30
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
ocamlfind will not build on OSX Catalina if CLICOLOR=1 and/or CLICOLOR_FORCE=1 #40
Comments
Here |
Nice @dbuenzli , that'll take care of the colorization issue. However it still fails to build. Gist of:
https://gist.github.com/philCryoport/1486159bcaed6c245dbab65a8e945787 |
Ok if I:
...then
However, it's still failing to
|
Btw. I'm not exactly sure what is happening here. I do have:
and everything's working right. Besides I really don't get what is going on with that loop (but with shell scripting I usually prefer not to know). Do you maybe have a
[...]
These things are generated by |
I also don't get what is happening here. Normally,
and you'll see that there are no colors, and everything is in one column. The same happens when capturing the output, like
(I tested this on MacOS Monterey.) Are you setting |
Yeah it looks like it needs
|
(Forget about that
I think you should really sort that out. If
That's ok I have that here too by default (i.e. I'm starting to think we need to fix your system rather than |
Ok I figured out what was tripping up my system: these lines in my
If I comment out those three lines and then open a fresh terminal, then That was ANNOYING. I have yet to see anything else tripped by this on my system:
Therefore -- since |
Check this out from GNU's
|
@dbuenzli looks like you dealt with a similar issue previously: ocaml/opam-repository#10737 (comment) |
The |
Indeed though that was a That being said I'm still unclear why one would want Not everything is Unless you are in to debug obscure fail paths (as you have now witnessed :–) I would highly suggest to remove that line from your At that point I must still quote:
and wish you happy OCaml hacking ! |
(oh and so that you don't run into other obscurities since you are on catalina please do |
Did you mean |
Yes sorry. Btw. is this ohmyzsh thing doing this In the first case it might be worth opening an issue there, in the second case it might be worth mentioning that |
I'll ping the oh-my-zsh people to find out what's going on. |
Blimey, so much for POSIX 🙂 Two thoughts:
|
I actually played with that yesterday the problem it's brittle in the face of nothing to glob:
Ruins. There's also:
|
Indeed, but there's never going to be nothing in It'll certainly be good to set a better future with OCaml installing the |
tl;dr:
When building
ocamlfind
on OSX:ls site-lib-src
outputs colorized text.gls
(gnu-ls) is installed.gls
is installed, keep goinggls
is not installed, tell the user they need to install Gnu'sls
, for instance, viabrew install coreutils
ocamlfind/Makefile
Line 99 in 6c8438c
site-lib-src
STORY:
I come here after much messing around trying to get
opam install csvtool
to work on OSX Catalina on an Intel Mac.It was failing on
ocaml install topkg
. Working with @kit-ty-kate and @dbuenzli starting at dbuenzli/topkg#119 (comment) we took a look atocamlfind
This line in the Makefile appears to have an issue:
ocamlfind/Makefile
Line 99 in 6c8438c
If I'm understanding of that line correctly, the goal is:
site-lib-src
directories; call the current iterated valuex
site-lib-src/x/META
IS a regular file, return exit code1
; else return exit code0
x
intoMakefile.packages.in
-- else go to next entry from the site-lib-src directoryAfter doing
I find there are 3 files that qualify for that META:
And if I run
test ! -f "site-lib-src/bytes/META" || echo "bytes" >> Makefile.packages.in
, indeed I do get:The problem? As soon as one puts that
test ! -f "site-lib-src/$$x/META" || echo $$x >> Makefile.packages.in
line inside afor
loop, OSX always considers the referenced META file returns0
.Every. Single. Time.
...which means that the
Makefile.packages.in
file is never created...and theMakefile.packages
file ends up just being:You would think the easy answer would be to -- within the for loop:
test
command by itself, sending the output to/dev/null
$?
to a variableIt gets even more complicated:
In OSX, if one is using a fancy-schmancy terminal program -- like iterm2 -- with a nice shell and prompt -- like oh-my-zsh with the spaceship-prompt -- then
ls
is colorized due to a forced alias ofls -G
......and the
ls site-lib-src
output can't be properly understood by thetest
command because the characters are in blue....which means on OSX we need to de-colorize the
ls site-lib-src
output before using it."Oh", you think, "let's just use
ls --color=never
", right?Doesn't work.
How about
\ls
?Nope -- nor
"ls"
nor'ls'
So far the only way I've found to do that do that is to
brew install coreutils
-- which then providesgls
-- which then offers a non-colorized output ofsite-lib-src
.Unrolled bash script: https://gist.github.com/philCryoport/5565b8fae4b58b5a26823860f28691ad
Resulting Makefile.packages.in:
Please do fix when you get a moment?
Thanks.
The text was updated successfully, but these errors were encountered: