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

Build failure: qgis build is failing during sip-build #281100

Closed
imincik opened this issue Jan 15, 2024 · 7 comments · Fixed by #281180
Closed

Build failure: qgis build is failing during sip-build #281100

imincik opened this issue Jan 15, 2024 · 7 comments · Fixed by #281180
Assignees

Comments

@imincik
Copy link
Contributor

imincik commented Jan 15, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. with latest master do nix-build -A qgis

Build log

pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
Querying qmake about your Qt installation...
These bindings will be built: gui.
Generating the gui bindings...
Generating the _gui .api file...
Generating the _gui .pyi file...
sip-build: An internal error occurred...
Traceback (most recent call last):
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/bin/.sip-build-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/tools/build.py", line 37, in main
    handle_exception(e)
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/exceptions.py", line 83, in handle_exception
    raise e
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/tools/build.py", line 34, in main
    project.build()
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/project.py", line 245, in build
    self.builder.build()
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/builder.py", line 46, in build
    self._generate_bindings()
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/builder.py", line 273, in _generate_bindings
    buildable = bindings.generate()
                ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/bindings.py", line 220, in generate
    output_code(spec, self, project, buildable)
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/generator/outputs/code.py", line 60, in output_code
    _module_code(spec, bindings, project, py_debug, buildable)
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/generator/outputs/code.py", line 512, in _module_code
    _virtual_handler(sf, spec, handler)
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/generator/outputs/code.py", line 4530, in _virtual_handler
    sipres_value = _call_default_ctor(spec, ctor)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/generator/outputs/code.py", line 4254, in _call_default_ctor
    class_type = fmt_argument_as_cpp_type(spec, arg.definition)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/kaf0lwx9czgl3xcl3bxicl3apx8gzvj0-python3.11-sip-6.8.0/lib/python3.11/site-packages/sipbuild/generator/outputs/formatters/argument.py", line 46, in fmt_argument_as_cpp_type
    original_typedef = arg.original_typedef
                       ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'WrappedClass' object has no attribute 'original_typedef'
ninja: build stopped: subcommand failed

Additional context

Hydra job: https://hydra.nixos.org/build/246593929

Notify maintainers

Notify @NixOS/geospatial


Add a 👍 reaction to issues you find important.

@imincik
Copy link
Contributor Author

imincik commented Jan 15, 2024

sip 6.8.0 is causing this build failure (see: qgis/QGIS#55481). sip version was bumped in #271586 .

@imincik
Copy link
Contributor Author

imincik commented Jan 15, 2024

QGIS is building successfully with #281180

@imincik imincik changed the title Build failure: qgis build failing during sip-build Build failure: qgis build is failing during sip-build Jan 16, 2024
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/week-in-geospatial-team/37035/3

@dotlambda
Copy link
Member

Should we add qgis to sip's passthru.tests as well?

@imincik
Copy link
Contributor Author

imincik commented Jan 24, 2024

Should we add qgis to sip's passthru.tests as well?

I would love to have some kind of test to make sure that QGIS is building with sip and is running correctly. But is it acceptable to do it this way ? And is it a good design ?

@nh2
Copy link
Contributor

nh2 commented Jan 24, 2024

But is it acceptable to do it this way ? And is it a good design ?

@lilyinstarlight on Matrix suggested:

yes, that's legitimate and a relatively common pattern

@imincik
Copy link
Contributor Author

imincik commented Feb 5, 2024

Fixed in #281180

@imincik imincik closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants