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

[python3] Build error on x64-linux #37984

Closed
chrismile opened this issue Apr 5, 2024 · 4 comments
Closed

[python3] Build error on x64-linux #37984

chrismile opened this issue Apr 5, 2024 · 4 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@chrismile
Copy link
Contributor

Package: python3:x64-linux@3.11.8#1

Host Environment

  • Host: x64-linux
  • Compiler: GNU 13.2.1
  • vcpkg-tool version: 2024-03-14-7d353e869753e5609a1f1a057df3db8fd356e49d
    vcpkg-scripts version: 3a0b82e 2024-04-05 (61 minutes ago)

To Reproduce

Use a vpckg.json file installing python3 port with path to the project containing the letter +. This makes the regex compilation in z_vcpkg_fixup_rpath_in_dir fail.

Failure logs

CMake Warning at ports/python3/portfile.cmake:7 (message):
  python3 currently requires the following programs from the system package
  manager:

      autoconf automake autoconf-archive

  On Debian and Ubuntu derivatives:

      sudo apt-get install autoconf automake autoconf-archive

  On recent Red Hat and Fedora derivatives:

      sudo dnf install autoconf automake autoconf-archive

  On Arch Linux and derivatives:

      sudo pacman -S autoconf automake autoconf-archive

  On Alpine:

      apk add autoconf automake autoconf-archive

  On macOS:

      brew install autoconf automake autoconf-archive

Call Stack (most recent call first):
  scripts/ports.cmake:175 (include)


-- Using cached python-cpython-v3.11.8.tar.gz.
-- Cleaning sources at /home/christoph/Programming/C++/Correrender/third_party/vcpkg/buildtrees/python3/src/v3.11.8-fe0ac5827a.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/christoph/Programming/C++/Correrender/third_party/vcpkg/downloads/python-cpython-v3.11.8.tar.gz
-- Applying patch 0001-only-build-required-projects.patch
-- Applying patch 0003-use-vcpkg-zlib.patch
-- Applying patch 0004-devendor-external-dependencies.patch
-- Applying patch 0005-dont-copy-vcruntime.patch
-- Applying patch 0008-python.pc.patch
-- Applying patch 0010-dont-skip-rpath.patch
-- Applying patch 0012-force-disable-modules.patch
-- Applying patch 0014-fix-get-python-inc-output.patch
-- Applying patch 0015-dont-use-WINDOWS-def.patch
-- Applying patch 0016-undup-ffi-symbols.patch
-- Applying patch 0018-fix-sysconfig-include.patch
-- Applying patch 0002-static-library.patch
-- Applying patch 0011-gcc-ldflags-fix.patch
-- Using source at /home/christoph/Programming/C++/Correrender/third_party/vcpkg/buildtrees/python3/src/v3.11.8-fe0ac5827a.clean
-- Found external ninja('1.11.1').
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Generating configure for x64-linux
-- Finished generating configure for x64-linux
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Installing x64-linux-dbg
-- Building x64-linux-rel
-- Installing x64-linux-rel
-- Fixing pkgconfig file: /home/christoph/Programming/C++/Correrender/third_party/vcpkg/packages/python3_x64-linux/lib/pkgconfig/python-3.11-embed.pc
-- Fixing pkgconfig file: /home/christoph/Programming/C++/Correrender/third_party/vcpkg/packages/python3_x64-linux/lib/pkgconfig/python-3.11.pc
-- Fixing pkgconfig file: /home/christoph/Programming/C++/Correrender/third_party/vcpkg/packages/python3_x64-linux/debug/lib/pkgconfig/python-3.11-embed.pc
-- Fixing pkgconfig file: /home/christoph/Programming/C++/Correrender/third_party/vcpkg/packages/python3_x64-linux/debug/lib/pkgconfig/python-3.11.pc
-- Installing: /home/christoph/Programming/C++/Correrender/third_party/vcpkg/packages/python3_x64-linux/share/python3/copyright
-- Installing cmake wrappers
CMake Error at scripts/cmake/z_vcpkg_fixup_rpath.cmake:25 (list):
  list sub-command TRANSFORM, action REPLACE: Failed to compile regex
  "/home/christoph/Programming/C++/Correrender/third_party/vcpkg/packages/python3_x64-linux/debug/lib/python3.11/lib-dynload".
Call Stack (most recent call first):
  scripts/cmake/z_vcpkg_fixup_rpath.cmake:113 (Z_vcpkg_calculate_corrected_rpath)
  scripts/ports.cmake:179 (z_vcpkg_fixup_rpath_in_dir)

RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.


Additional context

vcpkg.json
{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
  "name": "correrender",
  "version": "0.1.0",
  "dependencies": [
    "boost-core",
    "boost-algorithm",
    "boost-filesystem",
    "boost-math",
    "boost-parameter",
    {
      "name": "boost-interprocess",
      "platform": "windows"
    },
    {
      "name": "dbus",
      "default-features": false,
      "features": [],
      "platform": "linux"
    },
    {
      "name": "sdl2",
      "features": [
        "vulkan",
        "x11",
        "wayland"
      ],
      "platform": "linux"
    },
    {
      "name": "sdl2",
      "features": [
        "vulkan"
      ],
      "platform": "!linux"
    },
    "sdl2-image",
    {
      "name": "glfw3",
      "platform": "!linux"
    },
    "tinyxml2",
    {
      "name": "libarchive",
      "default-features": true,
      "features": [
        "bzip2",
        "lz4",
        "lzma",
        "zstd"
      ]
    },
    "vulkan-headers",
    "shaderc",
    "opencl",
    "glew",
    "glm",
    "tbb",
    "eigen3",
    "jsoncpp",
    "nlohmann-json",
    "python3",
    "netcdf-c",
    "blosc",
    "eigen3",
    "nlopt",
    "curl",
    "tiff"
  ],
  "features": {
    "tbb": {
      "description": "Use TBB instead of OpenMP for multi-threading",
      "dependencies": [
        "tbb"
      ]
    }
  }
}

@dg0yt
Copy link
Contributor

dg0yt commented Apr 5, 2024

Normally, the recommendation is to avoid such paths: There is more than one package which will fail to build.
But z_vcpkg_fixup_rpath.cmake is part of vcpkg, so it should be fixed. I guess the issue becomes visible now because the function is also applied in static triplets since #36056.
And coincidentally, I'm modifying the function in #37964.

@dg0yt
Copy link
Contributor

dg0yt commented Apr 5, 2024

As a first step towards a fix, I added more tests to #37964 to avoid potiental regressions when touching the failing code.
(I also have a test for this bug, but I don't want to add a failure to that PR at the moment.)

@dg0yt
Copy link
Contributor

dg0yt commented Apr 5, 2024

You can test #37964 now. (I didn't do a real test.)

@chrismile
Copy link
Contributor Author

You can test #37964 now. (I didn't do a real test.)

I can confirm that this fixes the issue.

@jimwang118 jimwang118 added the category:port-bug The issue is with a library, which is something the port should already support label Apr 7, 2024
JavierMatosD pushed a commit that referenced this issue Apr 23, 2024
Fix fixup for debug tools,
#37736 (comment).
Fix fixup for paths with regex chars,
#37984.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

3 participants