-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
cura needs updated to 5.1 #186570
Comments
@milahu made https://github.com/milahu/conan2nix, don't know how well it works. |
Also needs pyqt6 which is not in nixpkgs yet |
pyqt6 in progress here: #175510 Tried packaging it myself and ran into the same |
Got PyQt6 working in #186689 Getting libarcus to build with or without conan seems like a massive pain. :( |
I'm trying to do this for another distro and it seems like the way to go is to throw away Conan. The CMake scripts require some patching because the casing of the Conan packages and the CMake find scripts is usually different, e.g. We also need to add an install() command to actually install the libraries in a way that they can be found again. |
Currently have arcus building + made a replacement for conan's CMakeDeps generator which generates the same config/target files for an existing built package that conan would have built. Looks something like this in practice:
It's a bit hacky but it seems to work. Got as far as cura successfully building but have to debug some issues at runtime. |
CuraEngine's SIGSEGVing when trying to slice so still needs some work.
|
#189042 builds and runs with some bugs. I need some help from someone good at cmake and/or conan to come up with a better approach, as the one I took there is very hacky and I don't think it's suitable for nixpkgs. |
@LunNova On of the Cura devs here and mostly responsible for implementing Conan as our dependency manager; Sorry, but not sorry ;-). No, in all fairness I hate to see all you package maintainers struggle with our new build setup. Not here to open up a discussion why we made the switch and if we can switch back, since the old method simply wasn't scale-able and maintainable for Ultimaker anymore. But I'm here to inquire about what issues you run into, and why you need such a "hacky" method. I'm not familiar with NixOS, so I might miss some context about design philosophy and basic principle you guys/galls use over there. Because we set our builds up in such away that we can build on 3 OSes, with 4 different compilers, either in a GitHub hosted runner or an a local system and it should all boil down to:
This should give you a standalone version of Cura 5.2.1 with all the Python modules, binaries and resources in the correct location:
As I said earlier I'm unfamiliar with you NixOS and how your packages are build and distributed. But I honestly don't know why you would want to patch the CMakeFiles? If I'm missing something here please me known. I hope the steps described above will help you guys, see also our updated instructions on the Wiki:
and you might get some inspiration from our workflow to create our own installer: |
Thanks for the information @jellespijker We need to be able to build in a sandbox which is isolated entirely from network access, and acquire all the dependencies ahead of time in a deterministic way. Mixing acquiring dependencies and building is not possible in the nix model. For other build tools which work this way we usually resolve it by reading a lockfile of all the dependencies, and fetching those ahead of time. Conan doesn't seem to generate a lockfile or have a way to export the list of required downloads so we can perform them separately and reproducibly. Without support for this in conan we have to build without conan. All nix builds work this way, and turning off the sandbox is not an option for something included in nixpkgs. If it's impossible to build properly redistributing an upstream binary build is something we can do, and sometimes do. edit: I don't think you're particularly doing anything wrong. I consider this to be a Conan issue rather than a Cura issue. Of course, it would still be nice if your upstream CMakeLists worked without Conan! |
yes, we would need dynamic analysis just to get a list of URLs. limitation: on build time, conanfile.py can fetch different URLs, for example on a different platform |
Conan can create lockfiles which can be used to recreate the state of the build at anytime. It might be that the lock file that Conan creates is missing some additional information. https://docs.conan.io/en/latest/versioning/lockfiles.html an alternative approach might be that you write a custom Conan generator to obtain that information from the dependencies, and output to a lock file format of your choosing. An other possible way to obtain the source urls and is to look at the conandata.yml for each dependency in the I'm tagging @memsharded in this pr, he might have some valuable insight or might have an idea how Conan can be used to help package maintainers such as yourself with Conan. Since NixOS isn't the only one with issues. I know the guys in the AUR, apt and Flatpack also have some troubles with building Cura 5.x using Conan. |
Thanks for the mention @jellespijker Sure, if there is any thing that I could clarify, of course I'd like to help. It is true that so far it seems it is necessary a bit of awareness, from:
It is true that lockfiles in Conan 1.X might be a bit more challenging that we would like, but they have been greatly simplified in 2.0, which is very close. I'd recommend to have a look at them, try them, and let us know if there are any questions. Thanks! |
@milahu would integrating those new lockfiles into your conan2nix solve our problem? |
short answer: yes long answer: file hashes are missing, so we still need to run cd $(mktemp -d)
git clone --depth 1 https://github.com/Ultimaker/Cura
cd Cura
nix-shell -p conan
conan --version # Conan version 1.49.0
# naive approach ...
conan lock create # ERROR: Specify the 'name' and the 'version'
conan lock create --version 0 # ERROR: Specify the 'name' and the 'version'
conan lock create conanfile.py
# ERROR: Error loading conanfile at '/tmp/tmp.hCLqFQpRRe/Cura/conanfile.py': 410: Gone. [Remote: bintray]
# conan install
# based on .github/workflows/cura-installer.yml
conan_cache=$(mktemp -d)
conan config set storage.download_cache=$conan_cache
conan profile new default --detect
conan remove "*" -f # drop cache
conan config install https://github.com/Ultimaker/conan-config.git
# generate cura_inst/conan_install_info.json
conan install conanfile.py --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=false -o cura:staging=true --json "cura_inst/conan_install_info.json"
# /nix/store/2ispfz80kmwrsvwndxkxs56irn86h43p-bash-5.1-p16/bin/sh: line 1: cmake: command not found
# clipper/6.4.2: ERROR: Package '9559105bf27da09bb163021398de2f5474adca73' build failed
conan lock create # ERROR: Specify the 'name' and the 'version'
conan lock create conanfile.py example from {
"42": {
"ref": "cura_binary_data/5.3.0-alpha+testing_0@ultimaker/testing#4d64f788795ae6d2289a94b1405b854d",
"options": "",
"package_id": "4db1be536558d833e52e862fd84d64d75c2b3656",
"prev": "33588c598a4adaaea572aec57c1246c4",
"context": "host"
},
... translate to url + hash // cat cura_inst/conan_install_info.json | jq | less
{
"recipe": {
"id": "cura_binary_data/latest@ultimaker/testing",
"downloaded": true,
"exported": false,
"error": null,
"remote": "https://ultimaker.jfrog.io/artifactory/api/conan/cura-internal",
"time": "2022-11-03T08:10:32.697655",
"dependency": true,
"name": "cura_binary_data",
"version": "latest",
"user": "ultimaker",
"channel": "testing"
},
"packages": []
},
so the URLs look like
but we still need *all* the file hashes ... or we use a fixed-output-derivation and hope that files in conan cache
// cat ~/.conan/data/cura_binary_data/latest/ultimaker/testing/metadata.json | jq
{
"recipe": {
"revision": "9dd7d8d0f8d8cd9f75927a79f72cc8fc",
"remote": "cura",
"properties": {},
"checksums": {
"conanmanifest.txt": {
"md5": "ceb79270efd4ec7fab19ba4eb104bc00",
"sha1": "4103c848317c3928d67099b87ce95ea7a8a6af7c"
},
"conanfile.py": {
"md5": "ae071ea730a8be6466690f36ba8352f6",
"sha1": "300b20a01beb2ad21f060278290c6450c644d7db"
}
}
},
"packages": {}
} other packages can have more/other files
|
Is this going to work with splitting the builds up still or will be stuck with one giant build that includes cura and all its dependencies at once? |
no, conan would do all the fetching and building, so it does not use nixpkgs
yes but ... what is worse?
|
I think it's fine if it gets cura working, a little worried if conan starts being widely used that we'd need to find a better solution but that's for the future. |
I made some progress with Cura 5.2.1, copying what Alpine Linux does: PR #208124 This now seems to need mainly the main |
Here's how I solved this issue for myself: I use
|
The AppImage approach works for me after adding
and rebooting. |
This would generally be great, I have to use the appimage to share backups right now. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/packaging-curaengine-5-4-0/33719/2 |
User report from managed system CC @abbradar @gebner Proposal to flag as broken package, the current version appears to be unusable due to it using too new dependencies for which it wasn't designed for so it's having issues slicing and saving the gcode and the version is over a year old so that seems like a recipe for disaster.. Discussed in NixOS Contributors: https://matrix.to/#/!kjdutkOsheZdjqYmqp:nixos.org/$UhC2Qpe5a_HgihBUIfPwiAeUcNmP3WCl1e7iLkMU8gs?via=nixos.org&via=matrix.org&via=nixos.dev |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/issue-building-nixos-due-to-sip-package/48702/5 |
Your wrapper has also been added to the NUR at |
@FliegendeWurst, I had to use nix-community/nur-combined#21 so it could execute. But it doesn't work under Wayland, I get a |
Running it with |
This fixed the package for me: pbek/nixcfg@c6afa61 |
I created xeals/nur-packages#76. |
@MarSoft @bct @FliegendeWurst @pbek: I'm looking to add the AppImage version to nixpkgs as Can you be co-maintainers? |
I put the PR for Please volunteer as co-maintainers! |
Yeah, you can add me. Wanted to upstream the package myself too. |
Current Cura is difficult to build (see NixOS#186570), so in the meantime we're providing an AppImage version as well so people at least have some Cura version available. Adapted from NixOS#186570 (comment) and the subsequent discussion.
There is #372614 now. |
Cura 5 is out, it has a new build system. It's using conan now.
I had a go at updating it myself, just updating the version numbers doesn't work, unsurprisingly.
Related issue about build instructions: Ultimaker/Cura#12941
I'm trying to get it to build and will PR if I get it working.
Checklist
Project name
current version: 4.12.1
desired version: 5.1.0
Notify maintainers
maintainers: @abbradar @gebner
Note for maintainers
Please tag this issue in your PR.
The text was updated successfully, but these errors were encountered: