Skip to content
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

[glib] Build error "Host path separator (:) in path; this is unsupported." #22812

Closed
jcc10 opened this issue Jan 27, 2022 · 9 comments · Fixed by #23429
Closed

[glib] Build error "Host path separator (:) in path; this is unsupported." #22812

jcc10 opened this issue Jan 27, 2022 · 9 comments · Fixed by #23429
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@jcc10
Copy link

jcc10 commented Jan 27, 2022

Host Environment

  • OS: Pop!_OS (Ubuntu) 21.10
  • Compiler: cmake version 3.18.4 (I think this is what you need?)

To Reproduce
Steps to reproduce the behavior:
./vcpkg/vcpkg install glib

Failure logs

digitalkitsune@pop-os:~/github/Alicevision$ ./vcpkg/vcpkg install glib
Computing installation plan...
The following packages will be built and installed:
    glib[core]:x64-linux -> 2.70.1#2
Detecting compiler hash for triplet x64-linux...
Restored 0 packages from /home/digitalkitsune/.cache/vcpkg/archives in 4.776 us. Use --debug to see more details.
Starting package 1/1: glib:x64-linux
Building package glib[core]:x64-linux...
-- Using cached glib-2.70.1.tar.xz.
-- Cleaning sources at /home/digitalkitsune/github/Alicevision/vcpkg/buildtrees/glib/src/glib-2-3e22263b95.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/digitalkitsune/github/Alicevision/vcpkg/downloads/glib-2.70.1.tar.xz
-- Applying patch use-libiconv-on-windows.patch
-- Applying patch libintl.patch
-- Using source at /home/digitalkitsune/github/Alicevision/vcpkg/buildtrees/glib/src/glib-2-3e22263b95.clean
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_host_path_list.cmake:43 (message):
  Host path separator (:) in path; this is unsupported.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_host_path_list.cmake:72 (z_vcpkg_translate_to_host_path_list)
  scripts/cmake/vcpkg_configure_meson.cmake:488 (vcpkg_host_path_list)
  ports/glib/portfile.cmake:43 (vcpkg_configure_meson)
  scripts/ports.cmake:142 (include)


Error: Building package glib:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `./vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+glib
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[glib]+Build+error
including:
  package: glib[core]:x64-linux -> 2.70.1#2
    vcpkg-tool version: 2021-12-09-724cea8b33cbf06c645f5095fa29773697da9761
    vcpkg-scripts version: 7baf7bc9f 2022-01-26 (5 hours ago)

Additionally, attach any relevant sections from the log files above.

Additional context
I actually need opencv[eigen,ffmpeg,webp,contrib,nonFree,cuda] and openimageio[libraw,ffmpeg,freetype,opencv,gif,openjpeg,webp] (among other things) as a build dependency and this is just one of it's dependency's.

@autoantwort
Copy link
Contributor

Try removing the : from your PATH ;)

@jcc10
Copy link
Author

jcc10 commented Jan 27, 2022

Ok, but I'm on linux, what should I replace the separators with?

For refrence this is my path (newlines added for readability):

/home/digitalkitsune/github/meshroom/build/Linux-x86_64:
/usr/lib/cuda:/usr/lib/cuda/bin:
/home/digitalkitsune/github/emsdk:/home/digitalkitsune/github/emsdk/node/12.18.1_64bit/bin:/home/digitalkitsune/github/emsdk/upstream/emscripten:
/home/digitalkitsune/.deno/bin:
/home/digitalkitsune/.nvm/versions/node/v8.16.2/bin:
/home/digitalkitsune/.cargo/bin:
/home/digitalkitsune/.local/bin:
/home/digitalkitsune/bin:
/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:
/sbin:/bin:
/usr/games:/usr/local/games:
/snap/bin:
/home/digitalkitsune/.local/bin:
/home/digitalkitsune/.local/bin:
/home/digitalkitsune/.npm-packages/bin

@Adela0814 Adela0814 added the category:port-bug The issue is with a library, which is something the port should already support label Jan 28, 2022
@FabianRitter
Copy link

How did you solved this???

@jwpleow
Copy link

jwpleow commented Mar 1, 2022

I had the same error when installing glib as well, but I managed to solve mine by removing one of my setup lines source /opt/ros/noetic/setup.zsh (for ROS) from my .bashrc

(I'm on Ubuntu 20.04, cmake 3.21.4 for reference)
$PATH that doesnt work:

/opt/ros/noetic/bin:/usr/lib/ccache:/home/asdf/vcpkg:/home/asdf/miniconda3/condabin:/home/asdf/.local/bin:/home/asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

$PATH that worked: (only the first path /opt/ros/noetic/bin is gone)

/usr/lib/ccache:/home/asdf/vcpkg:/home/asdf/miniconda3/bin:/home/asdf/miniconda3/condabin:/home/asdf/.local/bin:/home/asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

I have no idea why it works with this change

@JackBoosY JackBoosY self-assigned this Mar 2, 2022
@JackBoosY JackBoosY added requires:discussion and removed category:port-bug The issue is with a library, which is something the port should already support labels Mar 2, 2022
@JackBoosY
Copy link
Contributor

I don't think we should prevent users from using the colon: it's used as a delimiter in UNIX paths.

cc @strega-nil-ms

@dg0yt
Copy link
Contributor

dg0yt commented Mar 7, 2022

There are linux users and contributors, but they are not able to reproduce this issue.

The function you point to tranforms a CMake list of directories (/usr/local/bin;/usr/bin;/bin) into a host path list (/usr/local/bin:/usr/bin:/bin for Linux). On you computer, the input CMake list already contains the host path separator (e.g. /usr/local/bin;/usr/bin:/bin). This indicates that this list couldn't be processed correctly in earlier functions.

Perhaps you should share the raw output of echo "$PATH". Because what you shared above also contained the host path separator in some lines. You really need to check you PATH.

@BillyONeal
Copy link
Member

The error message from vcpkg_host_path_list is saying "you tried to add a new element to the path that itself contains :, which isn't possible on *nix".

vcpkg_host_path_list(APPEND ENV{PKG_CONFIG_PATH} "${pkgconfig_installed_dir}" "${pkgconfig_share_dir}" "$ENV{PKG_CONFIG_PATH}")

I think the right fix is to change

vcpkg_host_path_list(APPEND ENV{PKG_CONFIG_PATH} "${pkgconfig_installed_dir}" "${pkgconfig_share_dir}" "$ENV{PKG_CONFIG_PATH}")

into:

vcpkg_host_path_list(APPEND ENV{PKG_CONFIG_PATH} "${pkgconfig_installed_dir}" "${pkgconfig_share_dir}")
if (NOT ENV{PKG_CONFIG_PATH} STREQUAL "")
    set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}${VCPKG_HOST_PATH_SEPARATOR}ENV{PKG_CONFIG_PATH}")
endif()

or similar? It seems $ENV{PKG_CONFIG_PATH} likely already may have path separators in it.

/cc @strega-nil

@strega-nil-ms
Copy link
Contributor

I think the correct thing is to just turn vcpkg_host_path_list(APPEND ENV{PKG_CONFIG_PATH} "${pkgconfig_installed_dir}" "${pkgconfig_share_dir}" "$ENV{PKG_CONFIG_PATH}") into vcpkg_host_path_list(APPEND ENV{PKG_CONFIG_PATH} "${pkgconfig_installed_dir}" "${pkgconfig_share_dir}"); you're already appending to ENV{PKG_CONFIG_PATH}, you don't need to do it again.

@BillyONeal
Copy link
Member

Oh megaderp I didn't see that the variable was duplicated 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
9 participants