Open Sunidhi-Gaonkar1 opened 1 year ago
Ubuntu 16.04.7 LTS
That's a very old Linux distribution. I expect the GCC version is way out of date. Note that LLVM requires at least GCC version 7.1.0. Check gcc --version
to be sure.
2.Installed qemu and powerpc64le-linux-gnu.
Why do you install powerpc64le-linux-gnu?
Hi Team, I am attempting to cross compile Tinygo to build binaries for Power Linux (ppc64le) platform.
"Cross compile TinyGo"? Maybe there is a misunderstanding but TinyGo usually doesn't need to be cross compiled. Just compile wherever you need it to run and then once you have a working tinygo
binary, you can pick a build target using GOOS
and GOARCH
(just like the regular Go toolchain).
If you mean to build binaries for linux/ppc64le, note that this is not yet supported in TinyGo.
Actually, it looks like you're using Clang (not GCC). What's the output of clang --version
?
Thank you for the quick response and sorry for the confusion. This is related to https://github.com/tinygo-org/tinygo/issues/3041. I am trying to build binaries for linux/ppc64le by modifying Github actions workflows and cross compilation done similar to arm and arm64 Linux builds.
Why do you install powerpc64le-linux-gnu?
I have installed powerpc64le-linux-gnu as it provides packages required for cross-compilation.
Below is the output for gcc --version
and clang --version
$ gcc --version
gcc (Ubuntu 7.3.0-23ubuntu2~16.04.york0) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
$ clang --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Thank you, now I better understand the situation.
Can you describe exactly which steps you took? Including all commands?
I see that you are building using Clang, so it appears you have modified CC
at least.
For cross compiling, you'll probably want to:
make llvm-build CROSS=powerpc64le-linux-gnu
to build LLVMmake CROSS=powerpc64le-linux-gnu
to build TinyGoBut make sure this GCC version is new enough, check powerpc64le-linux-gnu-gcc --version
.
Hi Team, I am attempting to cross compile Tinygo to build binaries for Power Linux (ppc64le) platform. Tinygo is used to run unit and integration tests by aquasecurity/trivy (https://github.com/aquasecurity/trivy). So far I have followed the steps mentioned below: 1.Installed the dependencies mentioned here: https://github.com/tinygo-org/tinygo/blob/release/BUILDING.md 2.Installed qemu and powerpc64le-linux-gnu. 3.Downloaded llvm source.
The command
make llvm-build
fails with following error:Additional information: Operating System: Ubuntu 16.04.7 LTS Kernel: Linux 4.4.0-190-generic Architecture: x86-64
Any pointers would be helpful.Thank you.