-
Notifications
You must be signed in to change notification settings - Fork 31
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
V2 #14
V2 #14
Conversation
Looking at |
env Print XX_* variables defining target environment | ||
is-cross Exit cleanly if target is not native architecture | ||
libc Print used libc (musl or gnu) | ||
march Print target machine architecture, uname -m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inconsistent with the other *-arch
commands and not as obviously coming from uname
. Would prefer uname-arch
. And also wonder if we shouldn't reverse it to arch-*
instead so it's arch-alpine
, arch-debian
, arch-uname
, arch-pkg
.
Would be nice to add support for MIPS systems: if case $TARGETARCH in "mips"*) true;; *) false;; esac; then
if [ -n "$TARGETVARIANT" ]; then
export GOMIPS="$TARGETVARIANT"
else
export GOMIPS="hardfloat"
fi
fi |
@crazy-max I did add some mips support to verify script. I've no specific need to provide support for it but as I noticed that both alpine and debian provide packages(might be different variant though) I don't mind PRs to add it to other scripts as well(wait until I move this out of draft). It's much less common in container-world though. The official images do not support mips and to support |
Yes indeed I'm using this snippet only to create artifacts through bake actually. |
@crazy-max Regarding mips, https://github.com/moby/buildkit/tree/master/util/archutil would probably need support as well for consistency. |
Pushed some new Dockerfiles for building tools to v2...wip-toolchains-v2. I wonder if for https://github.com/tonistiigi/xx/compare/v2...wip-toolchains-v2?expand=1#diff-b093d34eec92adf6e0cc6e445edb7147ea45d25fb0c98f2f84a60f5aae6f34f7R177 case it would make sense to add |
base/xx-verify
Outdated
fi | ||
|
||
if [ -n "$static" ]; then | ||
if ! echo $out | grep "statically linked" >/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer using readelf -d $out | grep -q NEEDED
(cf https://twitter.com/tiborvass/status/1277154999689076737). Readelf is in binutils package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah... it wouldn't work for non-linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's another dependency and only works on elf
@crazy-max @tiborvass I wonder what is the best pattern to use for cross-os builds and static toolchains. I have toolchains for binutils, cctools, compiler-rt etc. I wonder how to publish them so they can be easily used. For the tools that target a specific platform need to make an image that has target in the name: eg Then in the Dockerfile you would use it with
For things like compiler-rt, macos sdk, windows libraries that are always for a specific platform already I think it makes more sense to leave the image to their target platform. Eg. windows arm libraries would run with That brings us to the case where you need both. Eg. to build for macos, you need an sdk with the headers for the target but you also need support binaries targeting macos like ld64 and signer for your current build platform. I'd like to avoid the case where even to do a simple build you need to include 2 extra images, with a different include model. I'm wondering if maybe we could instead release the static binaries of the tooling as github binary releases in this repo. Then scripts like |
@tonistiigi sounds good to me.
What would the names look like? |
@tiborvass |
Sounds good to me too
I'm worried about this one because we have to handle proxy support and other exotic behavior for some users. I'm ok to release an image even if it's a huge one. |
@tonistiigi Sorry I don't understand the consistency between |
the ld example was for the binaries release. For image release, we can just use musl based binutils. |
The issue isn't that images are big. It is that a lot of manual work is needed by user in their Dockerfile to use it. With binary release we can put this logic in the |
@tonistiigi what about |
@tiborvass This was an example of the binary release. The difference is that ld64 is a mac specific linker that can target both amd64 and arm64. While |
@tonistiigi I see you edited the image names in #14 (comment) to make it consistent, so I'm fine with |
I guess what is being suggested here at least as a first step, is to have a simpler Dockerfile UX for those not behind a proxy but those behind a proxy can use the specific images, just a bit longer to write in a Dockerfile. |
Yes sorry I misinterpreted the initial objective and I understand the issue of having a Dockerfile as simple as possible. I guess |
2c57e7a
to
631ddc3
Compare
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
No description provided.