darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.64k stars 1.13k forks source link

[Upstream] Deb/RPM packaging: issues with compressed/split debug info #16322

Open LebedevRI opened 7 months ago

LebedevRI commented 7 months ago

In https://github.com/darktable-org/rawspeed/pull/658, i've changed rawspeed build system to tell compiler/linker to compress debug info, and split it into separate files. That resulted in enormous disk space savings for me.

But now that it got propagated into dt master, https://build.opensuse.org/package/show/graphics:darktable:master/darktable builds gone red.

i've backtracked those changes now, so it should go green for now, and stable release is not going to be borked, but this is not a long-term solution. I'm not quite sure how the packaging recepies need to be adjusted so that they are happy with split/compressed debug info.

CC @cryptomilk @bremner @TurboGit

darix commented 7 months ago

those packaging tools already strip out the debuginfo later anyway and ship them into different packages. you do not have to do it manually in the build system.

LebedevRI commented 7 months ago

The thing is that i DO want to do it in my build system, because it reduces the size of my build directory from 800 megabytes down to 200 megabytes. (== less disk writes, faster build times, opens possibilities to cache things on CI)

darix commented 7 months ago

then hide it behind a cmake option and dont break stuff with your assumptions without need.

LebedevRI commented 7 months ago

Ah yes, feels like the old-school forums :) "> How do i do XYZ specifically? < Who even does that, RTFM!"

darix commented 7 months ago

it is not the first time that you break stuff to achieve for yourself without caring about the wider consequences. but keep up your attitude.

LebedevRI commented 7 months ago

I don't appreciate this kind of commentary. If you have nothing to add, don't add anything.

cryptomilk commented 7 months ago

All distributions do not support if you modify objects in any form: striping partially, splitting compressing etc. They just set the flags they want and then extract the debuginfo. So the default build should assume the defaults. If you have a ENABLE_DEVELOPER option of some kind, the best is to hide it behind this as distros wont turn that on.

On the project I'm working on we have something like this which enables really pedantic compiler options and things you do not want in distributions that they fail on that because they update to a newer compiler version.

If you don't have a ENABLE_DEVELOPER yet, maybe add one for you and other developers :-)

LebedevRI commented 7 months ago

...

Ok, let me try again :)

I'm afraid this sounds like you are just saying the usual thing of "the distros are so special, just keep your head down not to anger them".

I have to ask, have you actually assessed what the failures i mentioned are? Have you read https://fedoraproject.org/wiki/Features/DwarfCompressor, https://sourceware.org/pipermail/dwz/2021q1/000886.html, https://sourceware.org/bugzilla/show_bug.cgi?id=24756 ?

For example, the issue at hand does not appear to happen on openSuse, only Fedora / debian/ubuntu.

ptilopteri commented 7 months ago

odd that, opensuse has failed since darktable-4.7.0~git577.1620befa-11344.1.x86_64.rpm on https://download.opensuse.org/repositories/graphics:/darktable:/master/openSUSE_Tumbleweed/x86_64/ (14Feb24)

warning: %post(polkit-default-privs-1550+20240207.d833f4b-1.1.noarch) scriptlet failed, exit status 2

-- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc

LebedevRI commented 7 months ago

I'm talking about https://build.opensuse.org/package/show/graphics:darktable:master/rawspeed:clang / https://build.opensuse.org/package/show/graphics:darktable:master/rawspeed:gcc, not https://build.opensuse.org/package/show/graphics:darktable:master/darktable which is now failing for entirely unrelated reasons.

LebedevRI commented 7 months ago

Ok, graphics:darktable:master/darktable was affected by several issues in short succession (failure to find openexr package, exif.cc patch needed updating, plus the subj issue) so i've missed one more failure there: This suse-specific thing:

[  125s] + find . -type f -name CMakeLists.txt -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\)/{s/^/#IGNORE /}' '{}' +

breaks https://github.com/darktable-org/darktable/blob/26440d6094da1d27ee33890333794aa2e807ec11/src/external/CMakeLists.txt#L17-L22 and we end up with

[  131s] CMake Error at src/external/rawspeed/cmake/build-type.cmake:23 (message):
[  131s]   Unknown build type: RELWITHDEBINFO.  Please specify one of:
[  131s]   Debug;ReleaseWithAsserts;Release;Coverage;Sanitize;TSan;Fuzz
[  131s] Call Stack (most recent call first):
[  131s]   src/external/rawspeed/CMakeLists.txt:167 (include)
LebedevRI commented 7 months ago

odd that, opensuse has failed since darktable-4.7.0~git577.1620befa-11344.1.x86_64.rpm on https://download.opensuse.org/repositories/graphics:/darktable:/master/openSUSE_Tumbleweed/x86_64/ (14Feb24) warning: %post(polkit-default-privs-1550+20240207.d833f4b-1.1.noarch) scriptlet failed, exit status 2 -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc

FWIW, fixed.

ptilopteri commented 7 months ago

tks, openSUSE Tumbleweed build also passes now :)

-- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc

github-actions[bot] commented 5 months ago

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

bremner commented 5 months ago

"github-actions[bot]" @.***> writes:

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

-- Reply to this email directly or view it on GitHub: https://github.com/darktable-org/darktable/issues/16322#issuecomment-2062763571 You are receiving this because you were mentioned.

Message ID: @.***>

never surrender to the stalebot menace

github-actions[bot] commented 3 months ago

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.