-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Building native images with quarkus.native.container-build=true and quarkus.native.debug.enabled=true depends on host tools for splitting the debug info #13754
Comments
/cc @galderz |
It would likely introduce a dependency for Graal so as to be able to do the stripping. Note that graal might have different user needs, but perhaps it should be discussed upstream. I'm not sure what the outcome of such discussion would be.
I'm +1 on this, if we've got the container flag set,
I believe we've discussed option 3) before and opted against it. There did even exist a prototype. The reason why it was rejected, eludes me now. But I think it was considered something quarkus should be driving (the post-processing), not graal itself. |
Thanks for the input Severin.
AFAIU I opened oracle/graal#3056 to get the discussion going. |
Hmm, OK. It sounds a bit like re-inventing the wheel to me, though.
|
Describe the bug
Currently, when using
quarkus.native.container-build=true
in combination withquarkus.native.debug.enabled=true
Quarkus uses the container image to build the native image but relies on the host to provide theobjcopy
utility to split the debug info from the native image. Since the purpose of using a container image is to avoid having to install specific tooling on the host, this results in bad user experience (see #13517).Expected behavior
Users shouldn't need to install anything special/extra on the host to build native images when using
quarkus.native.container-build=true
.Actual behavior
Users need to make sure
objcopy
is available on the host (see #13517).To Reproduce
On a system without
objcopy
installed run:(Mostly copied from #13517)
Configuration
Additional context
Possible approaches to solving this:
1. Since the container image is currently defined to run
native-image
we could extendnative-image
to accept a flag that dumps the symbols in a separate.debug
file.This benefits both GraalVM users and Quarkus users but it will need to go through upstream Graal and it will take some time to make it to Quarkus.
2. We can use the container image to actually call
objcopy
in some "ugly" way.E.g.:
This seems the most straight forward approach and will be directly accessible.
3. Change the container image to use as the entrypoint a wrapper script instead of
native-image
This will move the
objcopy
part out of Quarkus' source code for the case ofquarkus.native.container-build=true
but it will still require the logic to be present for native builds on the host system.The text was updated successfully, but these errors were encountered: