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

[vcpkg_fixup_pkgconfig] skip checks on paths with spaces #12703

Conversation

Neumann-A
Copy link
Contributor

@Neumann-A Neumann-A commented Aug 2, 2020

  • skip checks on paths with spaces
  • introduce VCPKG_SKIP_PKGCONFIG_CHECK to skip the pkg-config if set to true|on
  • some additional string replacements which might make spaces in paths work if a native pkg-config is used.

closes #12689

introduce VCPKG_SKIP_PKGCONFIG_CHECK to skip the pkg-config if set to true|on
@PhoebeHui PhoebeHui self-assigned this Aug 3, 2020
@PhoebeHui PhoebeHui added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Aug 3, 2020
Copy link
Contributor

@JackBoosY JackBoosY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After internal discussion, we believe that because std::filesystem::current_path is case-insensitive, the case of VCPKG_*_DIR does not match the actual path, and this is by design.
So please change the path to lowercase before replacing the absolute path with the relative path.

@PhoebeHui
Copy link
Contributor

pbc issue would be fixed via #12732

@Neumann-A
Copy link
Contributor Author

Neumann-A commented Aug 4, 2020

@JackBoosY: I don't believe the case insensitive part since the output everything is clearly uppercase:

CreateProcessW("E:\vcpkg_cache\downloads\tools\cmake-3.17.2-windows\cmake-3.17.2-win32-x86\bin\cmake.exe" -DCURRENT_PORT_DIR=E:/VCPKG/test/vcpkg/scripts/detect_compiler -DCURRENT_BUILDTREES_DIR=E:/VCPKG/test/vcpkg/buildtrees/detect_compiler -DCURRENT_PACKAGES_DIR=E:/VCPKG/test/vcpkg/packages/detect_compiler_x64-windows-static -DCMD=BUILD -DTARGET_TRIPLET=x64-windows-static "-DTARGET_TRIPLET_FILE=E:\VCPKG\test\vcpkg\triplets\x64-windows-static.cmake" -DVCPKG_PLATFORM_TOOLSET=v142 -DDOWNLOADS=E:/vcpkg_cache/downloads -DVCPKG_CONCURRENCY=9 "-DGIT=C:/Program Files/Git/cmd/git.exe" -DVCPKG_ROOT_DIR=E:/VCPKG/test/vcpkg -DPACKAGES_DIR=E:/VCPKG/test/vcpkg/packages -DBUILDTREES_DIR=E:/VCPKG/test/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=E:/VCPKG/test/vcpkg/installed -DDOWNLOADS=E:/vcpkg_cache/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "E:\VCPKG\test\vcpkg\scripts\ports.cmake")

The same is true for a WSL build.

@Neumann-A
Copy link
Contributor Author

So there is a trick to make spaces work which is basically to transform -L${libdir} etc into -L"${libdir}" and probably do the same for -I<somevar> (although that does not affect the script). The only problem I have is that the regex replace (line 147-153) removing the -L flags does not work any longer although if I print the string they should be equal. So CMake seems to hide some invisible characters which I couldn't figure out yet to correct the REGEX

@JackBoosY
Copy link
Contributor

@Neumann-A It is always difficult to use cmake to deal with delimiters and quotes.

@Neumann-A Neumann-A closed this Aug 30, 2020
@Neumann-A Neumann-A deleted the try_fixing_whitespace_pkgconfig_fixup branch April 24, 2021 18:13
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
Development

Successfully merging this pull request may close these issues.

[bzip2] build failure
3 participants