Skip to content

[LINUX][SYNOLOGY] **pip install pacparser** doesn't work #263

Closed

Description

@miaLDN

I was on Python3.12 and [email protected] for ages and happy. I added alert to the wpad.dat and needed to upgrade pacparser (i saw in the release notes that it had been added 🎉).

Tried a few versions of Python.
The lookup on GitHub doesn't exist.

$ python3.14 -m pip install --prefer-binary pacparser
Defaulting to user installation because normal site-packages is not writeable
Collecting pacparser
  Using cached pacparser-1.5.2.tar.gz (537 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pacparser
  Building wheel for pacparser (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pacparser (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [58 lines of output]
      Traceback (most recent call last):
        File "/var/services/homes/user/.local/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "/var/services/homes/user/.local/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/var/services/homes/user/.local/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
              wheel_directory, config_settings, metadata_directory
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/tmp/pip-build-env-q3ihhq2x/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 441, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
        File "/tmp/pip-build-env-q3ihhq2x/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 429, in _build
          return self._build_with_temp_dir(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~^
              cmd,
              ^^^^
          ...<3 lines>...
              self._arbitrary_args(config_settings),
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/tmp/pip-build-env-q3ihhq2x/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 410, in _build_with_temp_dir
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-q3ihhq2x/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 520, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-q3ihhq2x/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())  # noqa: S102 # exec is intentional here
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 282, in <module>
        File "/var/packages/python314/target/lib/python3.14/unittest/mock.py", line 1439, in patched
          return func(*newargs, **newkeywargs)
        File "<string>", line 234, in main
        File "<string>", line 190, in build_c_objects
        File "/var/packages/python314/target/lib/python3.14/subprocess.py", line 415, in check_call
          retcode = call(*popenargs, **kwargs)
        File "/var/packages/python314/target/lib/python3.14/subprocess.py", line 396, in call
          with Popen(*popenargs, **kwargs) as p:
               ~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "/var/packages/python314/target/lib/python3.14/subprocess.py", line 1039, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                              pass_fds, cwd, env,
                              ^^^^^^^^^^^^^^^^^^^
          ...<5 lines>...
                              gid, gids, uid, umask,
                              ^^^^^^^^^^^^^^^^^^^^^^
                              start_new_session, process_group)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/var/packages/python314/target/lib/python3.14/subprocess.py", line 1990, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: '/github/workspace/toolchain/syno-x64-7.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pacparser
Failed to build pacparser
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> pacparser

Tried many many variations of PIP:

python3.14 -m pip install --platform linux_x86_64 --no-deps --target ~/.local/lib/python3.14/site-packages/pacparser  --only-binary=:all: pacparser
ERROR: Could not find a version that satisfies the requirement pacparser (from versions: none)
ERROR: No matching distribution found for pacparser

Activity

  1. manugarg commented on Oct 3, 2026

    @manugarg
    Owner

    Thanks for the report. Two things are combining here:

    1. There's no Linux wheel for Python 3.14 on PyPI. 1.5.2 has Linux x86_64 wheels only for CPython 3.9–3.12; the 3.13 and 3.14 Linux wheels are missing (macOS and Windows have them). So pip falls back to building from the sdist, which needs a C compiler.

    2. The compiler your Python points to doesn't exist on your machine. The failing path:

    /github/workspace/toolchain/syno-x64-7.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-gcc
    

    is not something pacparser looks up on GitHub. It's the cross-compiler that was used to build your Synology python314 package (in GitHub Actions), and it's recorded in that Python's sysconfig as CC. Our setup.py reads the compiler from sysconfig and runs it directly, so it fails when that path isn't present on the NAS.

    Workarounds for now

    • Use Python 3.10, 3.11 or 3.12, where a prebuilt Linux x86_64 wheel exists, so nothing needs compiling: python3.12 -m pip install --only-binary=:all: pacparser. I haven't tested these wheels on DSM, so let me know if that fails too.
    • Building from source on the NAS isn't currently possible even with a gcc installed, because setup.py doesn't honour the CC/AR environment variables.

    On the pacparser side

    • setup.py should honour CC/AR from the environment and give a clear "no C compiler found" error instead of a traceback.
    • The Linux wheels for 3.13 and 3.14 need to be published.

    Could you share the output of the 3.12 attempt if it doesn't work?

  2. miaLDN commented on Oct 3, 2026

    @miaLDN
    Author

    I was on python3.12 and it failed, so moved to 3.14 to also test.

    Forcing platform and binary populated the pip cache, and now the python3.12 -m pip install pacparser works!

    I'm reluctant to investigate by breaking it; as it's part of a production check of complex PAC files served..

  3. miaLDN commented on Oct 3, 2026

    @miaLDN
    Author

    @manugarg thank you so much for such rapid response and detailed information!

    I'd spent a while here checking things locally; before posting :)

    If you launched the builds, then that explains why the pip install now works :)

    I'd better get the router and firewalls back up here before everyone starts complaining to me!

  4. changed the title [-]**pip install pacparser** doesn't work[/-] [+][LINUX][SYNOLOGY] **pip install pacparser** doesn't work[/+] on Oct 3, 2026
  5. miaLDN commented on Oct 3, 2026

    @miaLDN
    Author

    BTW I didn't intend to cause you lots of work 😊

    I am super happy that you did all that work though :)

  6. miaLDN commented on Oct 3, 2026

    @miaLDN
    Author
    $ python3.14 -m pip install -U --force-reinstall --no-cache-dir pacparser
    Defaulting to user installation because normal site-packages is not writeable
    Collecting pacparser
      Downloading pacparser-1.5.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (362 bytes)
    Downloading pacparser-1.5.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (448 kB)
    Installing collected packages: pacparser
      Attempting uninstall: pacparser
        Found existing installation: pacparser 1.5.3
        Uninstalling pacparser-1.5.3:
          Successfully uninstalled pacparser-1.5.3
    Successfully installed pacparser-1.5.3
  7. manugarg commented on Oct 3, 2026

    @manugarg
    Owner

    @miaLDN That's okay. Appreciate you opening this issue, it made me find an issue with Linux wheel build after 3.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions