Closed jonahbeckford closed 4 months ago
# Cygwin and pkg-config
$ env 'PKG_CONFIG_PATH=Y:\source\dkml\build\pkg\bump\msys64\clang64\lib\pkgconfig' pkg-config --cflags libffi
-IY:/source/dkml/build/pkg/bump/msys64/clang64/include
# MSYS2 and pkgconf
$ env 'PKG_CONFIG_PATH=Y:\source\dkml\build\pkg\bump\msys64\clang64\lib\pkgconfig' pkgconf --cflags libffi
-IY:/source/dkml/build/pkg/bump/msys64/clang64/include
Conclusion: double-quotes are not needed
# Cygwin and pkg-config
$ env 'PKG_CONFIG_PATH="Y:\source\dkml\build\pkg\bump\msys64\clang64\lib\pkgconfig"' pkg-config --cflags libffi
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'virtual:world', not found
# MSYS2 and pkgconf
$ env 'PKG_CONFIG_PATH="Y:\source\dkml\build\pkg\bump\msys64\clang64\lib\pkgconfig"' pkgconf --cflags libffi
-IZ:/msys64/clang64/bin/../include
Conclusion: adding double-quotes breaks both pkg-config and pkgconf
# Cygwin using Cygwin native /usr/bin/pkg-config
$ cygpath -aw .
Z:\cygwin64\home\beckf
$ /usr/bin/pkg-config --version
2.2.0
$ env 'PKG_CONFIG_PATH=Y:\source\dkml\build\pkg\bump\msys64\clang64\lib\pkgconfig' /usr/bin/pkg-config --cflags libffi
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi' not found
$ (cd /cygdrive/y && env 'PKG_CONFIG_PATH=Y:\source\dkml\build\pkg\bump\msys64\clang64\lib\pkgconfig' /usr/bin/pkg-config --cflags libffi)
-I/clang64/include
The regression should be addressed in #5972, but the proper fix needs some more investigation. Certainly for pkgconf, under Cygwin we'll need to translate the Windows paths - the separator there is definitely a colon. I haven't yet checked MSYS2, but as pkgconf I think it is a native tool, I expect it may be using semicolons.
This is opam
2.2~beta2
. The problem did not manifest itself in opam2.2~alpha0
.The dump from
opam option
is:Yet the environment variable available inside
opam install
(and in the opam.env
log file) is: