Qemu 11 build errors

While trying to build qemu 11 for the 1st time:
Code:
Extension error:
Could not import extension sphinx.builders.linkcheck (exception: No module named 'urllib3')
../docs/meson.build:39:6: ERROR: Problem encountered: Install a Python 3 version of python-sphinx and the readthedoc theme
A full log can be found at /usr/ports/emulators/qemu/work-default/qemu-11.0.0/build/meson-logs/meson-log.txt
ERROR: meson setup failed

In meson-log.txt:
Code:
stderr:
ld: error: undefined symbol: main
>>> referenced by crt1_s.S:66 (/usr/src/lib/csu/amd64/crt1_s.S:66)
>>>               /usr/lib/crt1.o:(_start)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
And more similar errors.

python311-3.11.15_2, meson 1.10.2 and py-sphinx 5.3.0 are installed.
What's urllib3?
What file is expected where and which package is it part of?
 
You have python, so if the package or port doesn't exist, you can install it with pip. (it does exist. in ports (since you're compiling from scratch), it's in net/py-urllib3)
 
I didn't notice the port name. Had to install py-urllib3 and a lot of required py-... ports after that.
I don't know how much more. Should this be done with pip? It seems like a dependency tree but only for python-based ports.
 
It's your choice. What's your system based on? Packages or ports? You can't (or rather shouldn't) mix them. Either be fully built on a repo, or all compiled locally. You want tool-chain coherency. In python it's essential, since the dependency version hell is real. It's why conda and venv exist: once you have several py-*, inevitably you'll run into version compatibility conflicts.

If your system is pkg based, and pkg update, you do "pkg install qemu", you don't compile. The freedom is yours, of course. I personally compile everything. Well, I boot-strap from pkg, then I build everything.

If you just want an easy "automatic" way to build a few things, use synth.
 
Just want to build qemu 11 to see what has changed since 9. I don't use Python direct;y, only as requirement of programs. Qemu is part of my custom FreeBSD version, included for Windows PC rescue purposes. Programming is C or shell.
 
Update your ports tree. Looks like a few minor changes to the port happened. You should have 11.0.0_1.


Dependencies should be automatically pulled in.

It builds fine for 15.0 on the build clusters.

The portstree can temporarily lose track of dependencies? That would conclude that I have to keep on updating it and wait until a moment where a 10-hour build finished without problems. That's not fair. 😫
I thought I solved it but it happens again in a clean system build. It starts with conflicting py-* build dependencies. Same files but of different port versions is a bad idea and not necessary for anything. The build of Qemu 11 has no business with already installed python ports as dependencies of other things. Just install it and overwrite any existing things. I don't care. The other packages are already created succesfully. The build output remains have no further purpose and can be ignored.

Python extensions should stop trying be be arbitrary because they don't have that position.
 
Found the problem: Had to deinstall py311-setuptools_scm7-7.1.0 because it covers files that don't comply with this qemu version. It expects a 9.* version. This was 5 build errors deep. I have no idea what the port does. It now does something different and Qemu can't handle it.

I don't want a system-wide python branch. It's only an interpreter that programs can use, optionally.
 
pkg-descr of py311-setuptools_scm7:

Handles managing your python package versions in scm metadata instead of
declaring them as the version argument or in a scm managed file

Is this some sort of python insider war?
 
Still not finding the true dependencies of Qemu 11. Current compiler error in red:
(I got here a few times but I don't know what's the problem)

Code:
  File "/usr/ports/emulators/qemu/work-default/qemu-11.0.0/build/pyvenv/lib/python3.11/site-packages/setuptools/_distutils/_modified.py", line 10, in <module>
    from jaraco.functools import splat
  File "/usr/local/lib/python3.11/site-packages/setuptools/_vendor/jaraco/functools.py", line 8, in <module>
    import setuptools.extern.more_itertools
ModuleNotFoundError: No module named 'setuptools.extern'

mkvenv did not complete successfully:
Traceback (most recent call last):
  File "/usr/ports/emulators/qemu/work-default/qemu-11.0.0/python/scripts/mkvenv.py", line 965, in main
    ensure_group(
  File "/usr/ports/emulators/qemu/work-default/qemu-11.0.0/python/scripts/mkvenv.py", line 859, in ensure_group
    result = _do_ensure(to_install, online, wheels_dir)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And which package is module "setuptools.extern" part of? I can't find anything that looks like it.
Is there any way to build and install all dependencies of 1 port and ignore version conflicts caused by already existing files with identical names, installed by something else for any reason?
 
I'm having the same issue across all three of my FreeBSD VMs trying to compile the guest-agent flavor of qemu:
Code:
[root@csrv01 /usr/ports/emulators/qemu]# make
===>  License GPLv2 accepted by the user
===>   qemu-guest-agent-11.0.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by qemu-guest-agent-11.0.1 for building
===>  Extracting for qemu-guest-agent-11.0.1
=> SHA256 Checksum OK for qemu/11.0.1/qemu-11.0.1.tar.xz.
===>  Patching for qemu-guest-agent-11.0.1
===>  Applying FreeBSD patches for qemu-guest-agent-11.0.1 from /usr/ports/emulators/qemu/files
===>   qemu-guest-agent-11.0.1 depends on executable: bash - found
===>   qemu-guest-agent-11.0.1 depends on package: py311-qemu.qmp>=0.0.5 - found
===>   qemu-guest-agent-11.0.1 depends on package: py311-wheel>=0 - found
===>   qemu-guest-agent-11.0.1 depends on package: py311-setuptools>0 - found
===>   qemu-guest-agent-11.0.1 depends on package: py311-sphinx_rtd_theme>0 - found
===>   qemu-guest-agent-11.0.1 depends on executable: sphinx-build - found
===>   qemu-guest-agent-11.0.1 depends on package: gmake>=4.4.1 - found
===>   qemu-guest-agent-11.0.1 depends on executable: ninja - found
===>   qemu-guest-agent-11.0.1 depends on package: pkgconf>=1.3.0_1 - found
===>   qemu-guest-agent-11.0.1 depends on file: /usr/local/bin/python3.11 - found
===>   qemu-guest-agent-11.0.1 depends on package: perl5>=5.42.r<5.43 - found
===>   qemu-guest-agent-11.0.1 depends on shared library: libglib-2.0.so - found (/usr/local/lib/libglib-2.0.so)
===>   qemu-guest-agent-11.0.1 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for qemu-guest-agent-11.0.1
Using './build' as the directory for build output
python determined to be '/usr/local/bin/python3.11'
python version: Python 3.11.15
mkvenv: Creating non-isolated virtual environment at 'pyvenv'
mkvenv: checking for meson>=1.5.0
mkvenv: checking for pycotap>=1.1.0
mkvenv: installing pycotap==1.3.1
mkvenv: checking for qemu.qmp>=0.0.5
mkvenv: checking for setuptools>=44.1.1
mkvenv: checking for wheel>=0.34.2
mkvenv: checking for pip>=20.3.4
mkvenv: installing setuptools>=44.1.1, pip>=20.3.4
mkvenv: installing /usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 76, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 534, in collect_root_requirements
    reqs = list(
           ^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 490, in _make_requirements_from_install_req
    cand = self._make_base_candidate_from_link(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 228, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
    super().__init__(
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 222, in _prepare
    dist = self._prepare_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 301, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 640, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 67, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/req/req_install.py", line 579, in prepare_metadata
    self.metadata_directory = generate_metadata(
                              ^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/operations/build/metadata.py", line 35, in generate_metadata
    distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 766, in prepare_metadata_for_build_wheel
    return super().prepare_metadata_for_build_wheel(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 186, in prepare_metadata_for_build_wheel
    return self._call_hook('prepare_metadata_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/setuptools/__init__.py", line 22, in <module>
    import _distutils_hack.override  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/_distutils_hack/override.py", line 1, in <module>
    __import__('_distutils_hack').do_override()
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/_distutils_hack/__init__.py", line 89, in do_override
    ensure_local_distutils()
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/_distutils_hack/__init__.py", line 75, in ensure_local_distutils
    core = importlib.import_module('distutils.core')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 16, in <module>
    from .cmd import Command
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 17, in <module>
    from . import _modified, archive_util, dir_util, file_util, util
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/lib/python3.11/site-packages/setuptools/_distutils/_modified.py", line 10, in <module>
    from jaraco.functools import splat
  File "/usr/local/lib/python3.11/site-packages/setuptools/_vendor/jaraco/functools.py", line 8, in <module>
    import setuptools.extern.more_itertools
ModuleNotFoundError: No module named 'setuptools.extern'

mkvenv did not complete successfully:
Traceback (most recent call last):
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python/scripts/mkvenv.py", line 964, in main
    ensure_group(
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python/scripts/mkvenv.py", line 858, in ensure_group
    result = _do_ensure(to_install, online, wheels_dir)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python/scripts/mkvenv.py", line 801, in _do_ensure
    pip_install(
  File "/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python/scripts/mkvenv.py", line 689, in pip_install
    subprocess.run(
  File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/build/pyvenv/bin/python3.11', '-m', 'pip', 'install', '--disable-pip-version-check', '-q', '--find-links', '/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python/wheels', '--no-build-isolation', '/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/python']' returned non-zero exit status 2.
===>  Script "configure" failed unexpectedly.
Please report the problem to bofh@FreeBSD.org [maintainer] and attach the
"/usr/ports/emulators/qemu/work-guestagent/qemu-11.0.1/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped making "/usr/ports/emulators/qemu/work-guestagent/.stage_done.qemu._usr_local" in /usr/ports/emulators/qemu
*** Error code 1

Stop.
make: stopped making "all" in /usr/ports/emulators/qemu
 
Back
Top