#8252 closed enhancement (fixed)
[PATCH] Create a "debug" build profile for use with Buildbot
Reported by: | umccullough | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/Development |
Keywords: | buildbot debug | Cc: | mdisreali@… |
Blocked By: | Blocking: | ||
Platform: | All |
Description
The attached patch creates a "debug" build profile (in a newly-added DebugBuildProfiles jamfile) while also fixing an issue that is preventing building with DEBUG=1 on a 64bit host.
This build profile will be used with Buildbot to continually test compilation of (most of) the tree with DEBUG=1 set.
During my testing, I discovered a few areas in the tree where targets failed to compile with DEBUG=1 and have added these as exceptions in the profile. These should eventually be fixed and the exceptions removed.
Patch was created with "git format-patch --stdout", please let me know if this is an issue.
Attachments (19)
Change History (44)
by , 13 years ago
Attachment: | add_debug_profile.patch added |
---|
comment:1 by , 13 years ago
patch: | 0 → 1 |
---|
comment:2 by , 13 years ago
Oops, there is one more subdirectory that doesn't compile with DEBUG=1 under gcc4 (I missed that during my testing) - I'll add an additional patch for that.
by , 13 years ago
Attachment: | add_gcc4_exception_debug_profile.patch added |
---|
This should be applied after the other patch to add another subdirectory exception for gcc4 builds
follow-up: 5 comment:3 by , 13 years ago
What happens when jam -q @debug
is run with HAIKU_ADD_ALTERNATIVE_GCC_LIBS ?= 1 ;
?
Does the alternative_system_libs.zip get compiled with debugging?
follow-up: 6 comment:5 by , 13 years ago
Replying to mmadia:
What happens when
jam -q @debug
is run withHAIKU_ADD_ALTERNATIVE_GCC_LIBS ?= 1 ;
?Does the alternative_system_libs.zip get compiled with debugging?
In theory, it should work, and they should include debug code I think (since the variable is set for the directory structure and all targets compiled from within in)... but I'd probably have to increase the image size again.
I'll test this out when I get a chance (probably tomorrow).
@Disreali:
Haven't tested it - and we don't have a buildbot slave on a Haiku host yet either. It should work I think - and I'll perhaps start setting up a buildslave for this soon.
follow-up: 7 comment:6 by , 13 years ago
Replying to umccullough:
Replying to mmadia:
What happens when
jam -q @debug
is run withHAIKU_ADD_ALTERNATIVE_GCC_LIBS ?= 1 ;
?Does the alternative_system_libs.zip get compiled with debugging?
In theory, it should work, and they should include debug code I think (since the variable is set for the directory structure and all targets compiled from within in)...
I doubt that. The alternative gcc part is built in a sub-jam and besides the list of optional packages nothing is propagated to it.
I'm undecided whether it is worth having this build profile at all. The list of DEBUG exceptions could as well be moved to BuildSetup and then the same effect could be reached by running
DEBUG=1 HAIKU_IMAGE_NAME=haiku-debug.image HAIKU_IMAGE_SIZE=650 jam @image
Since I can't think of anyone being interested in building such a debug image that seems good enough to me.
The BBlockCache fix looks OK and could be applied regardless.
follow-up: 8 comment:7 by , 13 years ago
Replying to bonefish:
I doubt that. The alternative gcc part is built in a sub-jam and besides the list of optional packages nothing is propagated to it.
Hmm... would using "DEBUG=1 jam @image" fix that issue?
Since I can't think of anyone being interested in building such a debug image that seems good enough to me.
Ok. I've already got additional patches for fixing several of those exceptions... should I just create a new ticket for all of those?
The BBlockCache fix looks OK and could be applied regardless.
Can someone apply that for me? :)
comment:8 by , 13 years ago
Replying to umccullough:
Replying to bonefish:
I doubt that. The alternative gcc part is built in a sub-jam and besides the list of optional packages nothing is propagated to it.
Hmm... would using "DEBUG=1 jam @image" fix that issue?
Yep. Though, obviously, the calling jam's DEBUG variable value should be propagated.
Ok. I've already got additional patches for fixing several of those exceptions... should I just create a new ticket for all of those?
I guess attaching them to this ticket is fine.
The BBlockCache fix looks OK and could be applied regardless.
Can someone apply that for me? :)
I don't have much time ATM and my tree is in a rather messy state, so if there's any other taker, that would go faster.
by , 13 years ago
Attachment: | add_debug_profile.2.patch added |
---|
Separate patch for adding the debug profile from the 64bit build issue
comment:9 by , 13 years ago
I broke the original patch into two so that the 64bit debug fix can be applied separately.
comment:10 by , 13 years ago
Applied debug_build_on_64bit.patch in hrev43545, based on mailing list feedback.
by , 13 years ago
Attachment: | Fix-copy-paste-error-in-mouse-preferences-so-it-will.patch added |
---|
Fix the mouse preferences debug build
by , 13 years ago
Attachment: | Avoid-warning-in-debug-code-for-media-server.patch added |
---|
Fix media server debug build
by , 13 years ago
Attachment: | Fix-implicit-void-cast-in-usb_midi-debug-code.patch added |
---|
Fix usb_midi debug build
by , 13 years ago
Attachment: | Fix-warning-in-AutoMounter-debug-code.patch added |
---|
Fix AutoMounter debug build
by , 13 years ago
Attachment: | Fix-warnings-in-OpenSound-debug-code.patch added |
---|
Fix OpenSound debug build
comment:11 by , 13 years ago
Attached a few patches to fix various debug builds - I'm sure some of these possibly aren't the best way to fix the problems, but I tried :)
I'll work on a better patch to exclude the rest of the misbehaving subdirs per Ingo's suggestion.
follow-ups: 13 15 comment:12 by , 13 years ago
I forgot to mention: For the third-party code with errors I would simply disable debugging (i.e. override DEBUG) in the respective Jamfiles.
by , 13 years ago
Attachment: | Fix-bad-debug-print-in-canna.patch added |
---|
Fix canna input method debug build
comment:13 by , 13 years ago
Replying to bonefish:
I forgot to mention: For the third-party code with errors I would simply disable debugging (i.e. override DEBUG) in the respective Jamfiles.
OK - I think all the patches I've supplied so far are either our own code, or code that I doubt we plan to replace again (canna input method for example).
Once I've fixed as many as I feel are within my means, I'll submit the jamfile patches you proposed.
comment:14 by , 13 years ago
Fix-copy-paste-error-in-mouse-preferences-so-it-will.patch applied in hrev43550. Can anyone comment on the other patches?
by , 13 years ago
Attachment: | Fix-various-issues-in-cortex-debug-code.patch added |
---|
Fix cortex debug build
by , 13 years ago
Attachment: | Fix-PDF-print-driver-debug-code.patch added |
---|
Fix PDF print driver debug build
by , 13 years ago
Attachment: | Fix-another-mouse-preference-issue-specific-to-gcc4-.patch added |
---|
Fix another mouse pref issue for GCC4 debug build (sorry I didn't catch this one earlier)
follow-up: 16 comment:15 by , 13 years ago
Replying to bonefish:
I forgot to mention: For the third-party code with errors I would simply disable debugging (i.e. override DEBUG) in the respective Jamfiles.
I wasn't sure how to do this - so the last patch I attached here has all of the logic in BuildSetup still.
The 3rd party dirs we likely won't mess with are the two printing libs and the ffmpeg stuff I guess?
follow-ups: 17 18 19 comment:16 by , 13 years ago
Replying to umccullough:
Replying to bonefish:
I forgot to mention: For the third-party code with errors I would simply disable debugging (i.e. override DEBUG) in the respective Jamfiles.
I wasn't sure how to do this - so the last patch I attached here has all of the logic in BuildSetup still.
Just add a DEBUG = 0 ;
line in the respective Jamfiles somewhere between the SubDir
and the rule invocation for the first target. Ideally with a comment.
The 3rd party dirs we likely won't mess with are the two printing libs and the ffmpeg stuff I guess?
With 3rd party I mean code that is still developed outside of our repository and might be updated or outsourced eventually. Hence I would consider libprint
"absorbed", but yes to the others. Moreover coreutils and ctags fall into my 3rd party category. tcpdump as well, though it seems to have been customized quite a bit, so the debug code should probably better be fixed.
Regarding the patches:
Fix-implicit-void-cast-in-usb_midi-debug-code.patch Fix-warning-in-AutoMounter-debug-code.patch Fix-warning-in-BSnow-debug-code.patch Fix-bad-debug-print-in-canna.patch Fix-various-issues-in-cortex-debug-code.patch Fix-PDF-print-driver-debug-code.patch Fix-another-mouse-preference-issue-specific-to-gcc4-.patch Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
Avoid-warning-in-debug-code-for-media-server.patch
: What's the warning and why does the patch fix it? Looks completely equivalent to me.
Fix-warnings-in-OpenSound-debug-code.patch
: First part OK, the second part, just like the previous patch, I don't understand.
PS: It would really be nice to have that "Apply Patch" button in Trac.
comment:17 by , 13 years ago
Replying to bonefish:
Just add a
DEBUG = 0 ;
line in the respective Jamfiles somewhere between theSubDir
and the rule invocation for the first target. Ideally with a comment.
OK, Will do.
With 3rd party I mean code that is still developed outside of our repository and might be updated or outsourced eventually. Hence I would consider
libprint
"absorbed", but yes to the others. Moreover coreutils and ctags fall into my 3rd party category. tcpdump as well, though it seems to have been customized quite a bit, so the debug code should probably better be fixed.
Ah, that makes sense.
Avoid-warning-in-debug-code-for-media-server.patch
: What's the warning and why does the patch fix it? Looks completely equivalent to me.
Fix-warnings-in-OpenSound-debug-code.patch
: First part OK, the second part, just like the previous patch, I don't understand.
Right, these two were a bit subtle.
The warning was about an unused variable. Apparently these variables are only initialized in an "#ifdef DEBUG" block, but further down, they are only used in a TRACE() line... which I suppose may not always be enabled with DEBUG.
By moving the initialization below the definition, the "unused variable" warning seemed to go away. Is there a better suggestion?
Quick reference links:
http://cgit.haiku-os.org/haiku/tree/src/servers/media/NodeManager.cpp#n255
comment:18 by , 13 years ago
Replying to bonefish:
Moreover coreutils and ctags fall into my 3rd party category.
FWIW, coreutils only seems to fail to link - and only on gcc2 at that, so perhaps this is something we should fix in our jamfiles instead... I don't even understand how DEBUG=1 affected this one based on my brief investigation.
by , 13 years ago
Attachment: | Conditionally-add-debug.c-to-ctags-build.patch added |
---|
debug.c is required to compile ctags with DEBUG=1
by , 13 years ago
Attachment: | Disabled-DEBUG-1-in-several-of-the-3rd-party-ffmpeg-.patch added |
---|
Allow ffmpeg sources to compile during debug build
by , 13 years ago
Attachment: | Disable-DEBUG-build-of-3rd-party-libgutenprint.patch added |
---|
Allow libgutenprint sources to compile during debug build
by , 13 years ago
Attachment: | Fix-ASSERT-that-wasn-t-altered-back-in-hrev39770-all.patch added |
---|
Fix debug build of libprint
comment:19 by , 13 years ago
Replying to bonefish:
Regarding the patches:
Fix-implicit-void-cast-in-usb_midi-debug-code.patch Fix-warning-in-AutoMounter-debug-code.patch Fix-warning-in-BSnow-debug-code.patch Fix-bad-debug-print-in-canna.patch Fix-various-issues-in-cortex-debug-code.patch Fix-PDF-print-driver-debug-code.patch Fix-another-mouse-preference-issue-specific-to-gcc4-.patch Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
These seven have been applied in hrev43566
PS: It would really be nice to have that "Apply Patch" button in Trac.
Maybe that could be a GSoC project idea? I'm barely finding the time to make meager progress with our BuildBot setup.
comment:20 by , 13 years ago
by , 13 years ago
Attachment: | Remaining-subdirs-that-cannot-be-compiled-with-DEBUG.patch added |
---|
Patch BuildSetup to disable DEBUG=1 support on subdirs with targets that won't compile as such
comment:21 by , 13 years ago
applied Disabled-DEBUG-1-in-several-of-the-3rd-party-ffmpeg-.patch and Disable-DEBUG-build-of-3rd-party-libgutenprint.patch in hrev43601
comment:22 by , 13 years ago
comment:23 by , 13 years ago
Applied Remaining-subdirs-that-cannot-be-compiled-with-DEBUG.patch in hrev43638. Leaving this ticket open as at least some of the blacklisted items should be fixed. Alternatively a new ticket could be opened for that though.
comment:24 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think we can just close this one and open another ticket (or tickets) for the other issues.
The "buildsystem" changes are now in place, and the debug images are building with buildbot now at least - which was the goal of this ticket.
Thanks!
comment:25 by , 13 years ago
patch: | 1 → 0 |
---|
patch to add debug profile and fix build on 64bit host