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

PCK section missing from self compiled templates (Linux, linking with LLD) #87438

Closed
majenkotech opened this issue Jan 21, 2024 · 7 comments · Fixed by #87464
Closed

PCK section missing from self compiled templates (Linux, linking with LLD) #87438

majenkotech opened this issue Jan 21, 2024 · 7 comments · Fixed by #87464

Comments

@majenkotech
Copy link

Tested versions

4.3.dev HEAD

System information

Arch Linux

Issue description

When exporting with embedded PCK an error is produced saying the PCK section is missing. Probing the resultant executable file with objdump -x you can indeed see there is no pck section in the ELF file.

Steps to reproduce

This is with the MYSQL extension installed. To get it to compile on Arch I had to use LLVM and LLD, which may be the issue?

So... compile the templates with LLVM and LDD and examine the results to see if the pck section exists in them.

Minimal reproduction project (MRP)

No need for a project. Just compile the templates from the source tree with LLVM and LLD.

@bruvzg
Copy link
Member

bruvzg commented Jan 21, 2024

PCK section is not supported when linking with LLD, build process should print a warning: Warning: Creating export template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold, LLD or mold..

@scgm0
Copy link
Contributor

scgm0 commented Jan 21, 2024

PCK section is not supported when linking with LLD, build process should print a warning: Warning: Creating export template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold, LLD or mold..

I'm a bit confused, doesn't mold support embed pck? When exporting godot does prompt that the pck part can't be found, but the exported executable, runs all right.

@bruvzg
Copy link
Member

bruvzg commented Jan 21, 2024

If I remember correctly, the PCK section is not required to embed PCK, it can be simply appended at the end of the executable.

@majenkotech
Copy link
Author

PCK section is not supported when linking with LLD, build process should print a warning: Warning: Creating export template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold, LLD or mold..

I'm a bit confused, doesn't mold support embed pck? When exporting godot does prompt that the pck part can't be found, but the exported executable, runs all right.

The same with LLD - it complains and "fails" the export, yet it has embedded the PCK and it runs.

@AThousandShips
Copy link
Member

AThousandShips commented Jan 21, 2024

It still fails in at least one way as it won't handle shared libraries if the embedding fixup fails

@imvenx
Copy link

imvenx commented Jan 23, 2024

I'm facing the same problem I'm trying to export to windows both with embed pck on/off and it throws same error on run .exe
I'm using 4.3 dev
image
image

@akien-mga
Copy link
Member

@imvenx That should be a different issue, this one is specific to Linux and clearly identified as related to how the binaries are compiled. It can't affect Windows which uses a different approach.

@akien-mga akien-mga changed the title PCK section missing from compiled templates PCK section missing from self compiled templates (Linux, linking with LLD) Jan 24, 2024
@akien-mga akien-mga added this to the 4.3 milestone Jan 24, 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 a pull request may close this issue.

6 participants