Comments (2)
/xref #5
from image-tools.
Here is the way I've tested this:
$ cat Dockerfile.test-llvm
FROM docker.io/cilium/cilium-llvm:629310350b8cf33a1e426e167e1caadb6848f6c5 as llvm-dist
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y libelf1 libmnl0 file libc-bin
COPY --from=llvm-dist /bin/llc /bin/clang /bin/
RUN /bin/llc --version
RUN /bin/clang --version
RUN echo 'int main() { return 0; }' > /tmp/test.c && clang -O2 -target bpf -c /tmp/test.c -o /tmp/test.o
$ cat Dockerfile.test-llvm | docker buildx build --platform linux/amd64,linux/arm64 --progress plain --no-cache
<SNIP>
#11 [linux/amd64 stage-1 4/6] RUN /bin/llc --version
#11 0.090 LLVM (http://llvm.org/):
#11 0.090 LLVM version 10.0.0
#11 0.090 Optimized build.
#11 0.090 Default target: x86_64-unknown-linux-gnu
#11 0.090 Host CPU: skylake
#11 0.090
#11 0.090 Registered Targets:
#11 0.090 bpf - BPF (host endian)
#11 0.090 bpfeb - BPF (big endian)
#11 0.090 bpfel - BPF (little endian)
#11 DONE 0.1s
#12 [linux/amd64 stage-1 5/6] RUN /bin/clang --version
#12 0.112 clang version 10.0.0 (https://github.com/llvm/llvm-project.git 1548db2d7ed11eed6b42cf31943a634be1047ba5)
#12 0.112 Target: x86_64-unknown-linux-gnu
#12 0.112 Thread model: posix
#12 0.112 InstalledDir: /bin
#12 DONE 0.2s
#13 [linux/amd64 stage-1 6/6] RUN echo 'int main() { return 0; }' > /tmp/tes...
#13 DONE 0.1s
<SNIP>
#18 [linux/arm64 stage-1 4/6] RUN /bin/llc --version
#18 0.225 LLVM (http://llvm.org/):
#18 0.225 LLVM version 10.0.0
#18 0.225 Optimized build.
#18 0.225 Default target: aarch64-linux-gnu
#18 0.225 Host CPU: (unknown)
#18 0.225
#18 0.225 Registered Targets:
#18 0.225 aarch64 - AArch64 (little endian)
#18 0.225 aarch64_32 - AArch64 (little endian ILP32)
#18 0.225 aarch64_be - AArch64 (big endian)
#18 0.225 arm64 - ARM64 (little endian)
#18 0.225 arm64_32 - ARM64 (little endian ILP32)
#18 DONE 0.3s
#19 [linux/arm64 stage-1 5/6] RUN /bin/clang --version
#19 0.231 clang version 10.0.0 (https://github.com/llvm/llvm-project.git 1548db2d7ed11eed6b42cf31943a634be1047ba5)
#19 0.231 Target: aarch64-unknown-linux-gnu
#19 0.231 Thread model: posix
#19 0.231 InstalledDir: /bin
#19 DONE 0.3s
#20 [linux/arm64 stage-1 6/6] RUN echo 'int main() { return 0; }' > /tmp/tes...
#20 0.335 error: unable to create target: 'No available targets are compatible with triple "bpf"'
#20 0.339 1 error generated.
#20 ERROR: executor failed running [/bin/sh -c echo 'int main() { return 0; }' > /tmp/test.c && clang -O2 -target bpf -c /tmp/test.c -o /tmp/test.o]: buildkit-runc did not terminate successfully
------
> [linux/arm64 stage-1 6/6] RUN echo 'int main() { return 0; }' > /tmp/test.c && clang -O2 -target bpf -c /tmp/test.c -o /tmp/test.o:
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c echo 'int main() { return 0; }' > /tmp/test.c && clang -O2 -target bpf -c /tmp/test.c -o /tmp/test.o]: buildkit-runc did not terminate successfully
$
from image-tools.
Related Issues (20)
- turn `build-image.sh` into a high-level tool HOT 1
- push to quay.io as well as docker.io HOT 4
- include core shared libraries in all images
- rename repo to image-tools
- missing iproute2 build dockerfile HOT 5
- Dependency Dashboard
- Add bazel to compilers image
- validate build logic on PR
- use full image names
- use buildx bake
- lookup commit ID based on tree hash
- test out GitHub registry HOT 3
- informative image labels
- Failed to pull images for linux/arm/v7 HOT 1
- image signing
- build images on PRs HOT 1
- consider using cache
- Unknown flag: --builder with docker buildx
- automate updating `FROM` statements with new digests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-tools.