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
Do not vendor the pugixml library #8
Conversation
This prevents trying to co-install pugixml with existing system libraries, and also fixes the includes for pugixml.hpp to actually use the include path added by find_package/add_subdirectory instead of a hardcoded relative path.
For our reference CURA-5226 |
Something went wrong in Jira there so I had to delete CURA-5226 and create a new ticket. The new ticket is CURA-5300. I think this is a nice improvement. You rarely see a PR that removes 14k lines of code, replaces it with 7 lines and it still works 😆 |
Upstream put pugixml inside the distribution and it is built and installed alongside with the library. This results in file collisions when pugixml is already installed on the system. Existing upstream pull request: Ultimaker/libSavitar#8 This commit applies that pull request as a patch. I modified the patch slightly to not include the actual deletion of the library and only apply the needed changes to the rest of the library. I did this because otherwise the filesize was bigger than the portage limit. Closes: https://bugs.gentoo.org/658112 Package-Manager: Portage[mgorny]-2.3.36.1
Ran into this as you can see from the commits above running Gentoo. Applied this PR and works perfectly. Would be nice if it can be merged in the next version. |
Upstream put pugixml inside the distribution and it is built and installed alongside with the library. This results in file collisions when pugixml is already installed on the system. Existing upstream pull request: Ultimaker/libSavitar#8 This commit applies that pull request as a patch. I modified the patch slightly to not include the actual deletion of the library and only apply the needed changes to the rest of the library. I did this because otherwise the filesize was bigger than the portage limit. Closes: https://bugs.gentoo.org/658112 Closes: #8846 Package-Manager: Portage[mgorny]-2.3.36.1
@MathyV , I tested your pull request and result of it:
After installing "sudo apt-get install libpugixml-dev" I cannot call cmake because I am missing: If I remove find_package(pugixml REQUIRED), I trigger cmake .., "make" command works well without error. |
Then your pugixml installation sucks and is broken, because it misses the files (Never mind that cmake should use the standard pkg-config instead of it's homebrew solution...) Anyway I've got no clue whatsoever whatsoever what you're proposing instead, nor why you're addressing your comment to random people instead of me, the author of this PR. |
Mystery solved, debian's package is broken: https://packages.debian.org/sid/amd64/libpugixml-dev/filelist You'll need to tell cmake (using |
Hi @eli-schwartz , which linux distro are you using? |
Arch Linux. As mentioned in #7 (referenced in the first comment) I found this bug in the process of helping to resolve downstream bug https://bugs.archlinux.org/task/57800 |
Shall we just add this library to cura-build-environment then? |
Apparently not. It's been decided that an external dependency makes setting up your development environment for Cura needlessly difficult. We won't be merging this then. Sorry! |
WAT 😱 |
Can't we find a compromise where it can build it from an external lib for distros but use the shipped library for Cura dev env. My cmake fu is too weak to suggest a patch. |
I would assume that would involve:
It should be sufficient to tell cmake to install arbitrary (static) libs to some custom build root, and then set the cmake module path. I'm unsure if @Ghostkeeper's rejection means only something simple enough to be shipped directly in this precise git repository would be accepted. |
This prevents trying to co-install pugixml with existing system
libraries, and also fixes the includes for pugixml.hpp to actually use
the include path added by find_package/add_subdirectory instead of a
hardcoded relative path.
Fixes #7