Skip to content
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

Fix Linux builds with separate debug symbols file when there is a space in the path. #98506

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

0xafbf
Copy link
Contributor

@0xafbf 0xafbf commented Oct 25, 2024

Building the engine in linux with symbols fails if the repo is at a path with spaces in any of the parent folder names.

Black autoformatter breaks this string when applying the autoformat, that's why I add the lines that disable black from formatting those lines.

@0xafbf 0xafbf requested a review from a team as a code owner October 25, 2024 01:53
@clayjohn clayjohn added this to the 4.x milestone Oct 25, 2024
@0xafbf 0xafbf changed the title Fix linux builds with debug symbols when there is a space in the path. Fix linux builds with separate debug symbols file when there is a space in the path. Oct 25, 2024
@akien-mga
Copy link
Member

Black autoformatter breaks this string when applying the autoformat, that's why I add the lines that disable black from formatting those lines.

How does it break it? I get this formatting, which seems correct to me:

def make_debug_linuxbsd(target, source, env):
    dst = str(target[0])
    os.system('objcopy --only-keep-debug "{0}" "{0}.debugsymbols"'.format(dst))
    os.system('strip --strip-debug --strip-unneeded "{0}"'.format(dst))
    os.system('objcopy --add-gnu-debuglink="{0}.debugsymbols" "{0}"'.format(dst))

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Aside from the formatting question, this looks fine.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Dec 4, 2024
@0xafbf
Copy link
Contributor Author

0xafbf commented Dec 5, 2024

How does it break it?

It leaves it exactly as it is in master at the moment. If you try to push it, the CI will complain and will tell you to leave it how it was before.

Last time I tried was a some months ago, I think I tried single quotes but it would correct it back to double quotes with the wrong formatting. I will try again now to confirm if it is really the case.

Edit: I implemented it as you suggested and it seems to pass checks. So I don't know why I didn't do it that way the first time, but I'm glad we got the neat solution working.

@0xafbf 0xafbf force-pushed the build-linux-with-spaces-in-path branch from d89d6ad to becf5d7 Compare December 5, 2024 15:31
@Repiteo Repiteo merged commit 63af934 into godotengine:master Dec 5, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 5, 2024

Thanks!

@akien-mga akien-mga changed the title Fix linux builds with separate debug symbols file when there is a space in the path. Fix Linux builds with separate debug symbols file when there is a space in the path. Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants