Skip to content
Snippets Groups Projects

WIP: Switch build-dependencies to python3

Closed Andreas Henriksson requested to merge wip/python3 into master

The tests are designed to work with either python2 or python3. We should be able to simply switch build-dependencies to python3 equivalents. However if something transitively pulls in python2 the AM_PATH_PYTHON autoconf macro will find python(2) binary, so in that case we need to pass PYTHON=python3 to dh_auto_configure. We try to avoid this by bumping the gtk-doc-tools build-dep to > 1.29 since that version has been switched from python2 to python3.

Merge request reports

Closed by Michael BieblMichael Biebl 5 years ago (Sep 30, 2019 2:18pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Developer

    Please note that the newer gtk-doc-tools is only available in EXPERIMENTAL yet.

  • Author Developer

    This is the build log failure when building with gtk-doc-tools from experimental:

    gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
    if test "$?" = "0"; then \
      mkhtml_options="$mkhtml_options --path=\"/build/network-manager-1.20.0/docs/libnm\""; \
    fi; \
    cd html && gtkdoc-mkhtml $mkhtml_options  libnm ../libnm-docs.xml
    warning: failed to load external entity "../xml/nm-vpn-service-plugin.xml"
    ../libnm-docs.xml:295: element include: XInclude error : could not load ../xml/nm-vpn-service-plugin.xml, and no fallback was found
    warning: failed to load external entity "../xml/nm-vpn-plugin-info.xml"
    ../libnm-docs.xml:296: element include: XInclude error : could not load ../xml/nm-vpn-plugin-info.xml, and no fallback was found
    warning: failed to load external entity "../xml/nm-vpn-plugin-old.xml"
    ../libnm-docs.xml:299: element include: XInclude error : could not load ../xml/nm-vpn-plugin-old.xml, and no fallback was found
    make[3]: *** [Makefile:897: html-build.stamp] Error 6
    make[3]: Leaving directory '/build/network-manager-1.20.0/docs/libnm'
    make[2]: *** [Makefile:16595: all-recursive] Error 1
    make[2]: Leaving directory '/build/network-manager-1.20.0'
    make[1]: *** [Makefile:7458: all] Error 2
    make[1]: Leaving directory '/build/network-manager-1.20.0'
    dh_auto_build: make -j5 returned exit code 2
    make: *** [debian/rules:8: binary] Error 255
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
    E: Failed autobuilding of package

    Full build log attached.network-manager-1.20.0.log

  • Author Developer

    (As previously discussed in the debian bts the alternative would be to not bump gtk-doc-tools build-dep and instead use the PYTHON=python3 environment variable to dh_auto_configure. This has the following drawbacks:

    • NM will still transitively depend on python2
    • NM will eventually have to work with the newer gtk-doc-tools anyway
    • For unknown reasons the test-link-linux and test-route-linux tests now ERROR instead of as previously be SKIPed.

    Targeting gtk-doc-tools > 1.29 seems like the better long term approach.)

  • I filed the build failure as https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/238

    Regarding the newer gtk-doc-tools dependency, would be great to have a time frame when this version of gtk-doc-tools will land in unstable.

  • Michael Biebl added 1 commit

    added 1 commit

    Compare with previous version

  • closed

  • reopened

  • Michael Biebl added 8 commits

    added 8 commits

    Compare with previous version

  • Hi @ah,

    the upstream build failure regarding gtk-doc-tools has been fixed in 1.20.2 and refined in 1.20.4

    I decided to slightly modify your patch. I actually think it's preferable to explicitly set PYTHON=/usr/bin/python3 instead of bumping the gtk-doc-tools b-dep for the following reasons:

    • It makes buster backports easier
    • It doesn't entangle the gtk-doc-tools and python3 transition
    • I can upload a fix to unstable today
    • Given your comments in the commit message about AM_PATH_PYTHON preferring python(2) over python3, the build is less likely to fail in a tainted build environemnt.

    That said, thanks again for the MR. I've uploaded 1.20.4-1 today which hopefully addresses https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=938944

  • closed

  • Author Developer

    I agree that seems like a good aproach ATM. FWIW I've seen some debian-python people do Build-Conflicts against python2 to avoid problems with AM_PATH_PYTHON.

    FYI The gnome 3.34 transitions was just approved and I unleached it by doing a bunch of uploads. Bet sorting that out will keep me busy for a while, but as soon as that is solved I'm basically planning on uploading gtk-doc to unstable. The bug reports I filed has been sitting for > 2 weeks now and there doesn't seem to be any reaction at all on them, so that gives me little interest in holding back the upload any longer.

Please register or sign in to reply
Loading