Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Null entry in the PATH #2

Open
F-Loyer opened this issue Sep 14, 2024 · 3 comments
Open

Null entry in the PATH #2

F-Loyer opened this issue Sep 14, 2024 · 3 comments

Comments

@F-Loyer
Copy link

F-Loyer commented Sep 14, 2024

The opam file contains:

setenv: [
  [PATH += "%{_:runtime-x86_64}%"]
  [PATH += "%{_:runtime-i686}%"]
]

On my system the i686 tools set is absent, then these lines are transcribed by opam in its variable.sh as:

# Updated by package mingw-w64-shims
PATH='C:\Cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\bin':"$PATH"; export PATH;
# Updated by package mingw-w64-shims
PATH='':"$PATH"; export PATH;

Then a null entry is inserted in the PATH. This can break some package (ocamlfind has an INSTALL file which is used instead of /usr/bin/install).

I am using opam 2.2.1.

@dra27
Copy link
Owner

dra27 commented Sep 16, 2024

That's very strange - ocaml/opam#5350 should be making that impossible!

@F-Loyer
Copy link
Author

F-Loyer commented Sep 16, 2024

src/format/opamLineLexer.mll has changed since this PR.

the escape_spaces function and its substitution of "" to "@" have disappeared.

See https://github.com/ocaml/opam/blob/2.2.1/src/format/opamLineLexer.mll

This may explain it.

@tahina-pro
Copy link

I encounter this error when instructing opam init to modify the configuration files, but when I do not, and when I run eval $(opam env) manually, I don't have this error and things work well for me.

tahina-pro added a commit to project-everest/everest that referenced this issue Dec 6, 2024
opam auto setup on Windows breaks, but `eval $(opam env)` works
See dra27/mingw-w64-shims#2 (comment)
tahina-pro added a commit to project-everest/everest that referenced this issue Dec 9, 2024
opam auto setup on Windows breaks, but `eval $(opam env)` works
See dra27/mingw-w64-shims#2 (comment)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants