Skip to content

Comments

python311Packages.babeltrace: init at 1.5.11 #310617

Merged
doronbehar merged 7 commits intoNixOS:masterfrom
wentasah:package/python-babeltrace
Jun 18, 2024
Merged

python311Packages.babeltrace: init at 1.5.11 #310617
doronbehar merged 7 commits intoNixOS:masterfrom
wentasah:package/python-babeltrace

Conversation

@wentasah
Copy link
Contributor

@wentasah wentasah commented May 10, 2024

Description of changes

Rebase of #285681 plus additional fixes.

In the original PR, @hacker1024 (who agrees with this PR) says:

This PR adds the Babeltrace 2 package along with its Python bindings. It is "completely independent from Babeltrace 1".

It also updates Babeltrace 1 to 1.5.11 (which mainly improves compatibility with newer Python and dependency versions) and adds a derivation for its Python bindings as well.

Cross-compilation (targeting aarch64-linux on x86_64-linux) has been tested.

My additions to that are:

  • update babeltrace2 from 2.0.5 to 2.0.6
  • fix/patch both babeltrace python packages to work with Python 3.12.
  • run nixpkgs-review

Closes #285681

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label May 10, 2024
@wentasah
Copy link
Contributor Author

Result of nixpkgs-review pr 310617 run on x86_64-linux 1

7 packages marked as broken and skipped:
  • linuxKernel.packages.linux_4_19.perf
  • linuxKernel.packages.linux_4_19.perf.debug
  • linuxKernel.packages.linux_4_19_hardened.perf
  • linuxKernel.packages.linux_4_19_hardened.perf.debug
  • rocmPackages.mivisionx
  • rocmPackages.mivisionx-cpu
  • rocmPackages.mivisionx-hip
3 packages failed to build:
  • rocmPackages_5.mivisionx (rocmPackages_5.mivisionx-hip)
  • rocmPackages_5.mivisionx-cpu
  • rocmPackages_5.mivisionx-opencl
57 packages built:
  • babeltrace
  • babeltrace2
  • cargo-flamegraph
  • ceph
  • ceph-client
  • ceph-csi
  • ceph.dev
  • ceph.doc
  • libceph (ceph.lib ,libceph.dev ,libceph.doc ,libceph.lib ,libceph.man)
  • ceph.man
  • hotspot
  • linuxKernel.packages.linux_5_10.perf
  • linuxKernel.packages.linux_5_10.perf.debug
  • linuxKernel.packages.linux_5_10_hardened.perf
  • linuxKernel.packages.linux_5_10_hardened.perf.debug
  • linuxKernel.packages.linux_5_15.perf
  • linuxKernel.packages.linux_5_15.perf.debug
  • linuxKernel.packages.linux_5_15_hardened.perf
  • linuxKernel.packages.linux_5_15_hardened.perf.debug
  • linuxKernel.packages.linux_5_4.perf
  • linuxKernel.packages.linux_5_4.perf.debug
  • linuxKernel.packages.linux_5_4_hardened.perf
  • linuxKernel.packages.linux_5_4_hardened.perf.debug
  • linuxKernel.packages.linux_6_1.perf
  • linuxKernel.packages.linux_6_1.perf.debug
  • linuxKernel.packages.linux_6_1_hardened.perf
  • linuxKernel.packages.linux_6_1_hardened.perf.debug
  • linuxKernel.packages.linux_6_6.perf
  • linuxKernel.packages.linux_6_6.perf.debug
  • linuxKernel.packages.linux_hardened.perf (linuxKernel.packages.linux_6_6_hardened.perf)
  • linuxKernel.packages.linux_hardened.perf.debug (linuxKernel.packages.linux_6_6_hardened.perf.debug)
  • linuxKernel.packages.linux_6_8.perf
  • linuxKernel.packages.linux_6_8.perf.debug
  • linuxKernel.packages.linux_latest_libre.perf
  • linuxKernel.packages.linux_latest_libre.perf.debug
  • linuxKernel.packages.linux_libre.perf
  • linuxKernel.packages.linux_libre.perf.debug
  • linuxKernel.packages.linux_lqx.perf
  • linuxKernel.packages.linux_lqx.perf.debug
  • linuxKernel.packages.linux_xanmod.perf
  • linuxKernel.packages.linux_xanmod.perf.debug
  • linuxKernel.packages.linux_xanmod_latest.perf (linuxKernel.packages.linux_xanmod_stable.perf)
  • linuxKernel.packages.linux_xanmod_latest.perf.debug (linuxKernel.packages.linux_xanmod_stable.perf.debug)
  • linuxKernel.packages.linux_zen.perf
  • linuxKernel.packages.linux_zen.perf.debug
  • lttv
  • python311Packages.babeltrace
  • python311Packages.babeltrace2
  • python312Packages.babeltrace
  • python312Packages.babeltrace2
  • qemu_full
  • qemu_full.debug
  • qemu_full.ga
  • qtcreator
  • samba4Full
  • samba4Full.dev
  • samba4Full.man

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label May 10, 2024
@ofborg ofborg bot requested a review from bjornfor May 10, 2024 16:15
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels May 10, 2024
@wentasah
Copy link
Contributor Author

rocmPackages_5.mivisionx fails due to failure of its dependency python311Packages.torchWithRocm, which fails on master since update to 2.3.0 few days ago. Therefore I think this can be safely merged.

@wentasah wentasah marked this pull request as ready for review May 14, 2024 05:54
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S If you'd use python311Packages.babeltrace and not python3Packages.babeltrace in the commit prefixes, you'd convince ofborg to build this attributes for you automatically. (The python3Packages prefixed attributes are not discovered by Hydra and hence are not discoved by ofborg as well).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then you'd be able to use pname and version without the finalAttrs. prefix...

Copy link
Contributor Author

@wentasah wentasah Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed finalAttrs completely, because it's not used for anything. I've also removed the second level of function calls so that there is just one attrset of parameters.

@doronbehar
Copy link
Contributor

Sorry it took so long to discover this PR.. It looks good overall.

@wentasah wentasah force-pushed the package/python-babeltrace branch from 13f0bad to ff1d41e Compare June 13, 2024 10:56
@wentasah
Copy link
Contributor Author

So I addressed most of the @doronbehar's comments including squashing commits together and updating commit titles to trigger ofborg. Now, I'm running nixpkgs-review. I'll post the results once it finishes.

@wentasah
Copy link
Contributor Author

Result of nixpkgs-review pr 310617 run on x86_64-linux 1

16 packages marked as broken and skipped:
  • linuxKernel.packages.linux_4_19.perf
  • linuxKernel.packages.linux_4_19.perf.debug
  • linuxKernel.packages.linux_4_19_hardened.perf
  • linuxKernel.packages.linux_4_19_hardened.perf.debug
  • linuxPackages_4_19_hardened.perf
  • linuxPackages_4_19_hardened.perf.debug
  • rocmPackages.mivisionx
  • rocmPackages.mivisionx-cpu
  • rocmPackages.mivisionx-hip
  • rocmPackages_5.mivisionx
  • rocmPackages_5.mivisionx-cpu
  • rocmPackages_5.mivisionx-hip
  • rocmPackages_5.mivisionx-opencl
  • rocmPackages_6.mivisionx
  • rocmPackages_6.mivisionx-cpu
  • rocmPackages_6.mivisionx-hip
60 packages built:
  • babeltrace
  • babeltrace2
  • cargo-flamegraph
  • ceph (ceph-dev)
  • ceph-client
  • ceph-csi
  • ceph.dev (ceph-dev.dev)
  • ceph.doc (ceph-dev.doc)
  • libceph (ceph.lib ,libceph.dev ,libceph.doc ,libceph.lib ,libceph.man)
  • ceph.man (ceph-dev.man)
  • hotspot
  • linuxPackages_5_10_hardened.perf (linuxKernel.packages.linux_5_10.perf)
  • linuxPackages_5_10_hardened.perf.debug (linuxKernel.packages.linux_5_10.perf.debug)
  • linuxPackages_5_15_hardened.perf (linuxKernel.packages.linux_5_15.perf)
  • linuxPackages_5_15_hardened.perf.debug (linuxKernel.packages.linux_5_15.perf.debug)
  • linuxKernel.packages.linux_5_4.perf
  • linuxKernel.packages.linux_5_4.perf.debug
  • linuxPackages_5_4_hardened.perf (linuxKernel.packages.linux_5_4_hardened.perf)
  • linuxPackages_5_4_hardened.perf.debug (linuxKernel.packages.linux_5_4_hardened.perf.debug)
  • linuxKernel.packages.linux_6_1.perf
  • linuxKernel.packages.linux_6_1.perf.debug
  • linuxPackages_6_1_hardened.perf (linuxKernel.packages.linux_6_1_hardened.perf)
  • linuxPackages_6_1_hardened.perf.debug (linuxKernel.packages.linux_6_1_hardened.perf.debug)
  • linuxPackages.perf (linuxKernel.packages.linux_6_6.perf)
  • linuxPackages.perf.debug (linuxKernel.packages.linux_6_6.perf.debug)
  • linuxPackages_hardened.perf (linuxPackages_6_6_hardened.perf)
  • linuxPackages_hardened.perf.debug (linuxPackages_6_6_hardened.perf.debug)
  • linuxKernel.packages.linux_6_8.perf
  • linuxKernel.packages.linux_6_8.perf.debug
  • linuxPackages_6_8_hardened.perf (linuxKernel.packages.linux_6_8_hardened.perf)
  • linuxPackages_6_8_hardened.perf.debug (linuxKernel.packages.linux_6_8_hardened.perf.debug)
  • linuxPackages_latest.perf (linuxKernel.packages.linux_6_9.perf)
  • linuxPackages_latest.perf.debug (linuxKernel.packages.linux_6_9.perf.debug)
  • linuxPackages_6_9_hardened.perf (linuxKernel.packages.linux_6_9_hardened.perf)
  • linuxPackages_6_9_hardened.perf.debug (linuxKernel.packages.linux_6_9_hardened.perf.debug)
  • linuxPackages_latest-libre.perf (linuxKernel.packages.linux_latest_libre.perf)
  • linuxPackages_latest-libre.perf.debug (linuxKernel.packages.linux_latest_libre.perf.debug)
  • linuxPackages-libre.perf (linuxKernel.packages.linux_libre.perf)
  • linuxPackages-libre.perf.debug (linuxKernel.packages.linux_libre.perf.debug)
  • linuxPackages_lqx.perf (linuxKernel.packages.linux_lqx.perf)
  • linuxPackages_lqx.perf.debug (linuxKernel.packages.linux_lqx.perf.debug)
  • linuxPackages_xanmod.perf (linuxKernel.packages.linux_xanmod.perf)
  • linuxPackages_xanmod.perf.debug (linuxKernel.packages.linux_xanmod.perf.debug)
  • linuxPackages_xanmod_latest.perf (linuxKernel.packages.linux_xanmod_latest.perf ,linuxPackages_xanmod_stable.perf)
  • linuxPackages_xanmod_latest.perf.debug (linuxKernel.packages.linux_xanmod_latest.perf.debug ,linuxPackages_xanmod_stable.perf.debug)
  • linuxPackages_zen.perf (linuxKernel.packages.linux_zen.perf)
  • linuxPackages_zen.perf.debug (linuxKernel.packages.linux_zen.perf.debug)
  • lttv
  • python311Packages.babeltrace
  • python311Packages.babeltrace2
  • python312Packages.babeltrace
  • python312Packages.babeltrace2
  • qemu_full
  • qemu_full.debug
  • qemu_full.ga
  • qtcreator
  • rocmPackages.rocgdb (rocmPackages_6.rocgdb)
  • sambaFull (samba4Full)
  • sambaFull.dev (samba4Full.dev)
  • sambaFull.man (samba4Full.man)

@doronbehar
Copy link
Contributor

I'm also not sure that the right thing to do here is to separate the expressions for the v1 and version 2 attributes... If they are separate, they might eventually change through out time differently. If the current common.nix would have been very complicated, I'd agree it would be smarter to share a common.nix file, like what they do with the different Thunderbird variants, and the chromium and Firefox variants... This is such a simple and classic expression that it doesn't worth it IMO.

@SuperSandro2000 SuperSandro2000 changed the title Package/python babeltrace python311Packages.babeltrace: init at 1.5.11 Jun 13, 2024
@wentasah wentasah force-pushed the package/python-babeltrace branch from ff1d41e to 16ccb10 Compare June 15, 2024 14:24
@wentasah
Copy link
Contributor Author

I rebased to nixos-unstable and separated v1 and v2 to their own independent packages. The result is really simpler.

@bjornfor I added myself as co-maintainer to v1. Do you agree?

Other changes:

  • added an update script to make updates easier/automated
  • v2 uses enablePython parameter (I'll probably do the same with v1 - sorry for not doing it in one shot)

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. and removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. labels Jun 15, 2024
@wentasah wentasah force-pushed the package/python-babeltrace branch from 16ccb10 to 023ae8b Compare June 15, 2024 15:23
@wentasah
Copy link
Contributor Author

Now, even v1 uses enablePython.

@hacker1024 It seems that cross-compilation to aarch64 was important for you. Cross-compilation works with Python 3.11, but fails with 3.12. Is it ok for you?

@wentasah wentasah requested a review from doronbehar June 15, 2024 15:27
@bjornfor
Copy link
Contributor

@bjornfor I added myself as co-maintainer to v1. Do you agree?

Yes. Thanks!

@wentasah
Copy link
Contributor Author

Result of nixpkgs-review pr 310617 run on x86_64-linux 1

11 packages marked as broken and skipped:
  • linuxKernel.packages.linux_4_19.perf
  • linuxKernel.packages.linux_4_19.perf.debug
  • linuxKernel.packages.linux_4_19_hardened.perf
  • linuxKernel.packages.linux_4_19_hardened.perf.debug
  • rocmPackages.mivisionx
  • rocmPackages.mivisionx-cpu
  • rocmPackages.mivisionx-hip
  • rocmPackages_5.mivisionx
  • rocmPackages_5.mivisionx-cpu
  • rocmPackages_5.mivisionx-hip
  • rocmPackages_5.mivisionx-opencl
60 packages built:
  • babeltrace
  • babeltrace2
  • cargo-flamegraph
  • ceph
  • ceph-client
  • ceph-csi
  • ceph.dev
  • ceph.doc
  • libceph (ceph.lib ,libceph.dev ,libceph.doc ,libceph.lib ,libceph.man)
  • ceph.man
  • hotspot
  • linuxKernel.packages.linux_5_10.perf (linuxKernel.packages.linux_5_10_hardened.perf)
  • linuxKernel.packages.linux_5_10.perf.debug (linuxKernel.packages.linux_5_10_hardened.perf.debug)
  • linuxKernel.packages.linux_5_15.perf (linuxKernel.packages.linux_5_15_hardened.perf)
  • linuxKernel.packages.linux_5_15.perf.debug (linuxKernel.packages.linux_5_15_hardened.perf.debug)
  • linuxKernel.packages.linux_5_4.perf
  • linuxKernel.packages.linux_5_4.perf.debug
  • linuxKernel.packages.linux_5_4_hardened.perf
  • linuxKernel.packages.linux_5_4_hardened.perf.debug
  • linuxKernel.packages.linux_6_1.perf
  • linuxKernel.packages.linux_6_1.perf.debug
  • linuxKernel.packages.linux_6_1_hardened.perf
  • linuxKernel.packages.linux_6_1_hardened.perf.debug
  • linuxKernel.packages.linux_6_6.perf
  • linuxKernel.packages.linux_6_6.perf.debug
  • linuxKernel.packages.linux_hardened.perf (linuxKernel.packages.linux_6_6_hardened.perf)
  • linuxKernel.packages.linux_hardened.perf.debug (linuxKernel.packages.linux_6_6_hardened.perf.debug)
  • linuxKernel.packages.linux_6_8.perf
  • linuxKernel.packages.linux_6_8.perf.debug
  • linuxKernel.packages.linux_6_8_hardened.perf
  • linuxKernel.packages.linux_6_8_hardened.perf.debug
  • linuxKernel.packages.linux_6_9.perf
  • linuxKernel.packages.linux_6_9.perf.debug
  • linuxKernel.packages.linux_6_9_hardened.perf
  • linuxKernel.packages.linux_6_9_hardened.perf.debug
  • linuxKernel.packages.linux_latest_libre.perf
  • linuxKernel.packages.linux_latest_libre.perf.debug
  • linuxKernel.packages.linux_libre.perf
  • linuxKernel.packages.linux_libre.perf.debug
  • linuxKernel.packages.linux_lqx.perf
  • linuxKernel.packages.linux_lqx.perf.debug
  • linuxKernel.packages.linux_xanmod.perf
  • linuxKernel.packages.linux_xanmod.perf.debug
  • linuxKernel.packages.linux_xanmod_latest.perf (linuxKernel.packages.linux_xanmod_stable.perf)
  • linuxKernel.packages.linux_xanmod_latest.perf.debug (linuxKernel.packages.linux_xanmod_stable.perf.debug)
  • linuxKernel.packages.linux_zen.perf
  • linuxKernel.packages.linux_zen.perf.debug
  • lttv
  • python311Packages.babeltrace
  • python311Packages.babeltrace2
  • python312Packages.babeltrace
  • python312Packages.babeltrace2
  • qemu_full
  • qemu_full.debug
  • qemu_full.ga
  • qtcreator
  • rocmPackages.rocgdb
  • samba4Full
  • samba4Full.dev
  • samba4Full.man

@hacker1024
Copy link
Member

Now, even v1 uses enablePython.

@hacker1024 It seems that cross-compilation to aarch64 was important for you. Cross-compilation works with Python 3.11, but fails with 3.12. Is it ok for you?

That's fine for me for now, I'm happy to look into it myself for 3.12 later. I'll probably need it once we switch to ROS Jazzy Jalisco with Python 3.12.

Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we can unconditionally enable man pages and use outputs = [ "out" "man" "dev" ]; so they won't take too much space in closure if someone doesn't want them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, is upstream aware that they need these loosening CFLAGS to make it work? It'd be nice to put a link if they do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any upstream commit addressing that. I'll let them know later, I'm in hurry right know. I just put there a comment that its needed when cross-compiling Python bindings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the 1.5.8 -> 1.5.11 commit, or even before it, it'd be nice to format with nixfmt the expression, and also switch to finalAttrs: pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted it as last commit (no time for resolving conflicts right now :-).

Also, is there any advantage of adding the finalAttrs parameter if it is not used in the actual Nix expression? I don't think so and I believe that it makes evaluation a bit slower.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we could replace rec and version with finalAttrs, but it doesn't help much, because we would need to override the whole src due to hash change. Or am I missing something?

@doronbehar
Copy link
Contributor

Cross-compilation works with Python 3.11, but fails with 3.12. Is it ok for you?

Could you share please how it fails? Maybe I can help.

@siraben
Copy link
Member

siraben commented Jun 16, 2024

Result of nixpkgs-review pr 310617 run on x86_64-linux 1

16 packages marked as broken and skipped:
  • linuxKernel.packages.linux_4_19.perf
  • linuxKernel.packages.linux_4_19.perf.debug
  • linuxKernel.packages.linux_4_19_hardened.perf
  • linuxKernel.packages.linux_4_19_hardened.perf.debug
  • linuxPackages_4_19_hardened.perf
  • linuxPackages_4_19_hardened.perf.debug
  • rocmPackages.mivisionx
  • rocmPackages.mivisionx-cpu
  • rocmPackages.mivisionx-hip
  • rocmPackages_5.mivisionx
  • rocmPackages_5.mivisionx-cpu
  • rocmPackages_5.mivisionx-hip
  • rocmPackages_5.mivisionx-opencl
  • rocmPackages_6.mivisionx
  • rocmPackages_6.mivisionx-cpu
  • rocmPackages_6.mivisionx-hip
13 packages failed to build:
  • ceph (ceph-dev)
  • ceph-client
  • ceph-csi
  • ceph.dev (ceph-dev.dev)
  • ceph.doc (ceph-dev.doc)
  • libceph (ceph.lib ,libceph.dev ,libceph.doc ,libceph.lib ,libceph.man)
  • ceph.man (ceph-dev.man)
  • qemu_full
  • qemu_full.debug
  • qemu_full.ga
  • sambaFull (samba4Full)
  • sambaFull.dev (samba4Full.dev)
  • sambaFull.man (samba4Full.man)
47 packages built:
  • babeltrace
  • babeltrace2
  • cargo-flamegraph
  • hotspot
  • linuxPackages_5_10_hardened.perf (linuxKernel.packages.linux_5_10.perf)
  • linuxPackages_5_10_hardened.perf.debug (linuxKernel.packages.linux_5_10.perf.debug)
  • linuxPackages_5_15_hardened.perf (linuxKernel.packages.linux_5_15.perf)
  • linuxPackages_5_15_hardened.perf.debug (linuxKernel.packages.linux_5_15.perf.debug)
  • linuxKernel.packages.linux_5_4.perf
  • linuxKernel.packages.linux_5_4.perf.debug
  • linuxPackages_5_4_hardened.perf (linuxKernel.packages.linux_5_4_hardened.perf)
  • linuxPackages_5_4_hardened.perf.debug (linuxKernel.packages.linux_5_4_hardened.perf.debug)
  • linuxKernel.packages.linux_6_1.perf
  • linuxKernel.packages.linux_6_1.perf.debug
  • linuxPackages_6_1_hardened.perf (linuxKernel.packages.linux_6_1_hardened.perf)
  • linuxPackages_6_1_hardened.perf.debug (linuxKernel.packages.linux_6_1_hardened.perf.debug)
  • linuxPackages.perf (linuxKernel.packages.linux_6_6.perf)
  • linuxPackages.perf.debug (linuxKernel.packages.linux_6_6.perf.debug)
  • linuxPackages_hardened.perf (linuxPackages_6_6_hardened.perf)
  • linuxPackages_hardened.perf.debug (linuxPackages_6_6_hardened.perf.debug)
  • linuxKernel.packages.linux_6_8.perf
  • linuxKernel.packages.linux_6_8.perf.debug
  • linuxPackages_6_8_hardened.perf (linuxKernel.packages.linux_6_8_hardened.perf)
  • linuxPackages_6_8_hardened.perf.debug (linuxKernel.packages.linux_6_8_hardened.perf.debug)
  • linuxPackages_latest.perf (linuxKernel.packages.linux_6_9.perf)
  • linuxPackages_latest.perf.debug (linuxKernel.packages.linux_6_9.perf.debug)
  • linuxPackages_6_9_hardened.perf (linuxKernel.packages.linux_6_9_hardened.perf)
  • linuxPackages_6_9_hardened.perf.debug (linuxKernel.packages.linux_6_9_hardened.perf.debug)
  • linuxPackages_latest-libre.perf (linuxKernel.packages.linux_latest_libre.perf)
  • linuxPackages_latest-libre.perf.debug (linuxKernel.packages.linux_latest_libre.perf.debug)
  • linuxPackages-libre.perf (linuxKernel.packages.linux_libre.perf)
  • linuxPackages-libre.perf.debug (linuxKernel.packages.linux_libre.perf.debug)
  • linuxPackages_lqx.perf (linuxKernel.packages.linux_lqx.perf)
  • linuxPackages_lqx.perf.debug (linuxKernel.packages.linux_lqx.perf.debug)
  • linuxPackages_xanmod.perf (linuxKernel.packages.linux_xanmod.perf)
  • linuxPackages_xanmod.perf.debug (linuxKernel.packages.linux_xanmod.perf.debug)
  • linuxPackages_xanmod_latest.perf (linuxKernel.packages.linux_xanmod_latest.perf ,linuxPackages_xanmod_stable.perf)
  • linuxPackages_xanmod_latest.perf.debug (linuxKernel.packages.linux_xanmod_latest.perf.debug ,linuxPackages_xanmod_stable.perf.debug)
  • linuxPackages_zen.perf (linuxKernel.packages.linux_zen.perf)
  • linuxPackages_zen.perf.debug (linuxKernel.packages.linux_zen.perf.debug)
  • lttv
  • python311Packages.babeltrace
  • python311Packages.babeltrace2
  • python312Packages.babeltrace
  • python312Packages.babeltrace2
  • qtcreator
  • rocmPackages.rocgdb (rocmPackages_6.rocgdb)

@wentasah
Copy link
Contributor Author

Cross-compilation works with Python 3.11, but fails with 3.12. Is it ok for you?

Could you share please how it fails? Maybe I can help.

It fails when cross-compiling Python itself:

python3> In file included from ./Include/internal/pycore_object.h:13,
python3>                  from Objects/cellobject.c:4:
python3> ./Include/internal/pycore_interp.h:193:24: error: field 'dtoa' has incomplete type
python3>   193 |     struct _dtoa_state dtoa;
python3>       |                        ^~~~

@doronbehar
Copy link
Contributor

It fails when cross-compiling Python itself:

python3> In file included from ./Include/internal/pycore_object.h:13,
python3>                  from Objects/cellobject.c:4:
python3> ./Include/internal/pycore_interp.h:193:24: error: field 'dtoa' has incomplete type
python3>   193 |     struct _dtoa_state dtoa;
python3>       |                        ^~~~

Could you share in a gist the full build log please?

@wentasah
Copy link
Contributor Author

Full python build log as produced by nix build .#pkgsCross.aarch64-multiplatform.python312Packages.babeltrace

@wentasah
Copy link
Contributor Author

Result of nixpkgs-review pr 310617 run on x86_64-linux 1
16 packages marked as broken and skipped:
13 packages failed to build:

Probably unrelated. Now I see the same, yesterday it was OK.

@doronbehar
Copy link
Contributor

Full python build log as produced by nix build .#pkgsCross.aarch64-multiplatform.python312Packages.python

cc @FRidh .

@doronbehar
Copy link
Contributor

Result of nixpkgs-review pr 310617 run on x86_64-linux 1
16 packages marked as broken and skipped:
13 packages failed to build:

Probably unrelated. Now I see the same, yesterday it was OK.

Yes it could be failures related to the processing power of the machine you used. @siraben try to use nix build --max-jobs 1 --cores 2 on those failing attributes.

@siraben
Copy link
Member

siraben commented Jun 16, 2024

@doronbehar Ok, rerunning.

@wentasah wentasah force-pushed the package/python-babeltrace branch from 023ae8b to 50dd7c2 Compare June 17, 2024 07:25
@wentasah
Copy link
Contributor Author

Addressed most of @doronbehar's comments.

wentasah and others added 4 commits June 17, 2024 21:45
- Don't use `meta = with lib;`.
- Use (finalAttrs:{}) pattern.
- Use lib.enableFeature for debug-info ./configure flag.
- Use pkgs/by-name
@doronbehar doronbehar force-pushed the package/python-babeltrace branch from 50dd7c2 to 2f6b127 Compare June 17, 2024 18:51
@doronbehar
Copy link
Contributor

I reformatted it as last commit (no time for resolving conflicts right now :-).

Indeed the rebase wasn't trivial :) Now it is done.

Also, is there any advantage of adding the finalAttrs parameter if it is not used in the actual Nix expression? I don't think so and I believe that it makes evaluation a bit slower.

Yes. Using rec is slower then evaluating a function.

Addressed most of @doronbehar's comments.

So I hadn't had the patience to wait for it to be perfect, so I did it all myself. Your final approval on my changes will be great, if not, I'll simply wait for CI.

@doronbehar doronbehar force-pushed the package/python-babeltrace branch from 2f6b127 to e8ca973 Compare June 17, 2024 19:11
@doronbehar doronbehar force-pushed the package/python-babeltrace branch from e8ca973 to 2536c9c Compare June 17, 2024 20:48
wentasah and others added 2 commits June 18, 2024 07:50
Separate from babeltrace 1.x as "the Babeltrace 2 project is completely
independent from Babeltrace 1".

https://github.com/efficios/babeltrace/releases/tag/v2.0.0

Co-authored-by: hacker1024 <[email protected]>
A new attribute overriding babeltrace2 is created, rather than enabling
Python support in babeltrace2 itself, in order to reduce the closure
size and leave babeltrace2 Python-version-agnostic.

Co-authored-by: hacker1024 <[email protected]>
@doronbehar doronbehar force-pushed the package/python-babeltrace branch from 2536c9c to 68bc018 Compare June 18, 2024 04:50
@doronbehar doronbehar merged commit e4f736f into NixOS:master Jun 18, 2024
@wentasah
Copy link
Contributor Author

Yes. Using rec is slower then evaluating a function.

Great. I was not aware of that.

So I hadn't had the patience to wait for it to be perfect, so I did it all myself. Your final approval on my changes will be great, if not, I'll simply wait for CI.

Thank you for finishing and merging this. I was traveling with my family - sorry for not having time to give it a final testing.

@wentasah wentasah deleted the package/python-babeltrace branch October 4, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants