Skip to content

llvm-project-rustc: Rust-Lang Enhanced/Specifc LLVM 14.0.0#18322

Closed
Grommish wants to merge 1 commit into
openwrt:masterfrom
Itus-Shield:llvm-project-rustc
Closed

llvm-project-rustc: Rust-Lang Enhanced/Specifc LLVM 14.0.0#18322
Grommish wants to merge 1 commit into
openwrt:masterfrom
Itus-Shield:llvm-project-rustc

Conversation

@Grommish
Copy link
Copy Markdown
Contributor

@Grommish Grommish commented Apr 18, 2022

This is the rust enhanced/specific LLVM 14.0.0 toolchain, used
in building/linking rust-lang projects.

We cannot use the existing OpenWrt eBPF LLVM toolchain for this.
The eBPF LLVM toolchain only builds for eBPF, but we need the
rust enhanced LLVM and support for AArch64, ARM, Mips, PowerPC,
and X86.

This LLVM is stored/preserved in staging_dir/host/llvm-rust and
carries over a clean, requiring only a build once situation
(unless the LLVM changes, or staging_dir gets removed).

Used/Required for #13916

Signed-off-by: Donald Hoskins grommish@gmail.com

Grommish added a commit to Itus-Shield/packages that referenced this pull request Apr 18, 2022
Rust is a multi-paradigm, general-purpose programming language
designed for performance and safety, especially safe concurrency.

It is syntactically similar to C++, but can guarantee memory
safety by using a borrow checker to validate references.

This introduces support for an external rust-specific LLVM
toolchain.

This update introduces the following target tuples:
mips64-openwrt-linux-musl (upstreamed)
mips-openwrt-linux-musl
mipsel-openwrt-linux-musl
aarch64-openwrt-linux-musl
arm-openwrt-linux-muslgnueabi
arm-openwrt-linux-muslgnueabihf
armv5-openwrt-linux-muslgnueabi
armv7-openwrt-linux-muslgnueabi
armv7-openwrt-linux-muslgnueabihf

Initial testing and support for:
powerpc64-openwrt-linux-musl
x86_64-openwrt-linux-musl

The HOST and TARGET Tuples are stored in staging_dir/host and
will survive make clean and various rebuilds for persistence.

Requires commit openwrt#18322

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish
Copy link
Copy Markdown
Contributor Author

Before someone asks, no, we cannot use the OpenWrt eBPF LLVM toolchain for this. Not only is the eBPF LLVM toolchain only building for eBPF, but we need the rust enhanced LLVM (and mine supports AArch64, ARM, Mips, PowerPC, and X86)

@champtar
Copy link
Copy Markdown
Member

Before someone asks, no, we cannot use the OpenWrt eBPF LLVM toolchain for this. Not only is the eBPF LLVM toolchain only building for eBPF, but we need the rust enhanced LLVM (and mine supports AArch64, ARM, Mips, PowerPC, and X86)

This info should be in the commit message then

@Grommish Grommish force-pushed the llvm-project-rustc branch from 192961c to 015deed Compare April 18, 2022 16:12
@Grommish
Copy link
Copy Markdown
Contributor Author

rust-lang/llvm-project pushes changes to their dated branches without updating the dated branches. This is, as you've found, cause issues. I will work on another way to do this.

@Grommish
Copy link
Copy Markdown
Contributor Author

Due to the way rust-lang llvm-project is branched, with no release
artifacts, and additional issue with the fact GitHub cannot/will
not guarentee sha256sums over time for the same commit head, I am
moving to a cloned repo. This is a significant space investment
on the clone, but ultimately a smaller space footprint in the
dl/ section as I can use .xz rather than .zip/.tar.gz

PKG_MIRROR_HASH is intentionally left as "skip" because no tarball
is available from the Openwrt buildbots. If this becomes available
from the build-bot, that will probably be set by it.

@Grommish
Copy link
Copy Markdown
Contributor Author

ln -s llvm-rust-14.0.0.Linux-x86_64 /home/ubuntu/21/staging_dir/host/llvm-rust STRIP_KMOD= PATCHELF= STRIP=strip /home/ubuntu/21/scripts/rstrip.sh /home/ubuntu/21/staging_dir/host/llvm-rust echo "14.0.0" > /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version bash: /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version: No such file or directory

Do you have a staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/ directory?

@openwrtfirmwarecostum
Copy link
Copy Markdown

ln -s llvm-rust-14.0.0.Linux-x86_64 /home/ubuntu/21/staging_dir/host/llvm-rust STRIP_KMOD= PATCHELF= STRIP=strip /home/ubuntu/21/scripts/rstrip.sh /home/ubuntu/21/staging_dir/host/llvm-rust echo "14.0.0" > /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version bash: /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version: No such file or directory

Do you have a staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/ directory?

there isn't any

@Grommish
Copy link
Copy Markdown
Contributor Author

ln -s llvm-rust-14.0.0.Linux-x86_64 /home/ubuntu/21/staging_dir/host/llvm-rust STRIP_KMOD= PATCHELF= STRIP=strip /home/ubuntu/21/scripts/rstrip.sh /home/ubuntu/21/staging_dir/host/llvm-rust echo "14.0.0" > /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version bash: /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version: No such file or directory

Do you have a staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/ directory?

there isn't any

That is like the second to last step in the package.

make package/feeds/packages/llvm-project-rustc/{clean,compile}

@openwrtfirmwarecostum
Copy link
Copy Markdown

ln -s llvm-rust-14.0.0.Linux-x86_64 /home/ubuntu/21/staging_dir/host/llvm-rust STRIP_KMOD= PATCHELF= STRIP=strip /home/ubuntu/21/scripts/rstrip.sh /home/ubuntu/21/staging_dir/host/llvm-rust echo "14.0.0" > /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version bash: /home/ubuntu/21/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version: No such file or directory

Do you have a staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/ directory?

there isn't any

That is like the second to last step in the package.

make package/feeds/packages/llvm-project-rustc/{clean,compile}

for now I leave rust. I've tried twice

@Grommish
Copy link
Copy Markdown
Contributor Author

Grommish commented Apr 20, 2022

@Grommish

https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink

You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

image

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish
https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink

You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

strange I didn't commit and didn't change the makefile

@Grommish
Copy link
Copy Markdown
Contributor Author

@Grommish
https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink
You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

strange I didn't commit and didn't change the makefile

Did you pull down the change the PR that removes the pre-packed archive in exchange for the cloned repo that I pushed earlier today?

@Grommish
Copy link
Copy Markdown
Contributor Author

@Grommish
https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink
You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

strange I didn't commit and didn't change the makefile

Did you pull down the change the PR that removes the pre-packed archive in exchange for the cloned repo that I pushed earlier today?

i made it with openwrt sdk and put llvm-project-rustc in the package folder

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish
https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink
You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

strange I didn't commit and didn't change the makefile

Did you pull down the change the PR that removes the pre-packed archive in exchange for the cloned repo that I pushed earlier today?

i made it with openwrt sdk and put llvm-project-rustc in the package folder

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

it should work because llvm-project-rustc is in packages/devel

@Grommish
Copy link
Copy Markdown
Contributor Author

Grommish commented Apr 20, 2022

@Grommish
https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink
You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

strange I didn't commit and didn't change the makefile

Did you pull down the change the PR that removes the pre-packed archive in exchange for the cloned repo that I pushed earlier today?

i made it with openwrt sdk and put llvm-project-rustc in the package folder

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

it should work because llvm-project-rustc is in packages/devel

Can you try the make V=sc package/feeds/packages/llvm-project-rust/{clean,compile} and tell me what it says/if/where it errors for you?

And can you verify you have 100868392 Apr 19 09:07 dl/llvm-project-rustc-14.0.0-2022-03-22.tar.xz?

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish
https://youtube.com/shorts/MuYO6jagkR4?feature=share

Right, that is in build_dir/hostpkg, not staging_dir/host/. I expect what that video to show to be where you found it, but staging_dir/host/ should have a llvm-rust-14.0.0.Linux-x86_64/ and a llvm-rust/ symlink
You error'd on the last step (https://github.com/openwrt/packages/pull/18322/files#diff-b4e31a91efc8abfddf3de0eabf84c13e8ea2b8fb3ab64cb216df28c4b5a8401fR88) and you're saying it isn't there. What steps did you do? I've built out LLVM twice today, the rust HOST toolchain 3 times, and several target toolchains (working on testing ARM11MPCORE and ARMv6 arm1176jzf-s)

strange I didn't commit and didn't change the makefile

Did you pull down the change the PR that removes the pre-packed archive in exchange for the cloned repo that I pushed earlier today?

i made it with openwrt sdk and put llvm-project-rustc in the package folder

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

it should work because llvm-project-rustc is in packages/devel

Can you try the make V=sc package/feeds/packages/llvm-project-rust/{clean,compile} and tell me what it says/if/where it errors for you?

And can you verify you have 100868392 Apr 19 09:07 dl/llvm-project-rustc-14.0.0-2022-03-22.tar.xz?

I will redo it. i will tell you

@Grommish
Copy link
Copy Markdown
Contributor Author

@Grommish

https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_150541.jpg

I'm building out LLVM right now from a rm -rf bin/ build_dir/ dl/ staging_dir/ tmp/ .config

image

I'll have to let you know if I hit an error, but I suspect if I don't it has to do with building from the SDK rather than source. I'll check back when it's done.

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish
https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_150541.jpg

I'm building out LLVM right now from a rm -rf bin/ build_dir/ dl/ staging_dir/ tmp/ .config

image

I'll have to let you know if I hit an error, but I suspect if I don't it has to do with building from the SDK rather than source. I'll check back when it's done.

https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_151218.jpg

@Grommish
Copy link
Copy Markdown
Contributor Author

@Grommish
https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_150541.jpg

I'm building out LLVM right now from a rm -rf bin/ build_dir/ dl/ staging_dir/ tmp/ .config
image
I'll have to let you know if I hit an error, but I suspect if I don't it has to do with building from the SDK rather than source. I'll check back when it's done.

https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_151218.jpg

Can you scroll up and show the error as to why it failed?

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish
https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_150541.jpg

I'm building out LLVM right now from a rm -rf bin/ build_dir/ dl/ staging_dir/ tmp/ .config
image
I'll have to let you know if I hit an error, but I suspect if I don't it has to do with building from the SDK rather than source. I'll check back when it's done.

https://github.com/openwrtfirmwarecostum/su/blob/main/Screenshot_2022-04-20_151218.jpg

Can you scroll up and show the error as to why it failed?

-- Up-to-date: /home/ubuntu/openwrt/staging_dir/hostpkg/lib/cmake/llvm/./CheckCompilerVersion.cmake
-- Up-to-date: /home/ubuntu/openwrt/staging_dir/hostpkg/lib/cmake/llvm/./GetErrcMessages.cmake
make[3]: Leaving directory '/home/ubuntu/openwrt/build_dir/hostpkg/llvm-project-rustc-14.0.0-2022-03-22'ln -s llvm-rust-14.0.0.Linux-x86_64 /home/ubuntu/openwrt/staging_dir/host/llvm-rust
STRIP_KMOD= PATCHELF= STRIP=strip /home/ubuntu/openwrt/scripts/rstrip.sh /home/ubuntu/openwrt/staging_dir/host/llvm-rust
echo "14.0.0" > /home/ubuntu/openwrt/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version
bash: /home/ubuntu/openwrt/staging_dir/host/llvm-rust-14.0.0.Linux-x86_64/.llvm-version: No such file or directory
Makefile:95: recipe for target '/home/ubuntu/openwrt/staging_dir/hostpkg/stamp/.llvm-project-rustc_installed' failed
make[2]: *** [/home/ubuntu/openwrt/staging_dir/hostpkg/stamp/.llvm-project-rustc_installed] Error 1
make[2]: Leaving directory '/home/ubuntu/openwrt/feeds/packages/devel/llvm-project-rustc'
time: package/feeds/packages/llvm-project-rustc/compile#26.37#8.15#38.60
ERROR: package/feeds/packages/llvm-project-rustc failed to build.
package/Makefile:114: recipe for target 'package/feeds/packages/llvm-project-rustc/compile' failed
make[1]: *** [package/feeds/packages/llvm-project-rustc/compile] Error 1
make[1]: Leaving directory '/home/ubuntu/openwrt'
/home/ubuntu/openwrt/include/toplevel.mk:221: recipe for target 'package/rust/compile' failed
make: *** [package/rust/compile] Error 2

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish

there is no llvm-rust-14.0.0.Linux-x86_64 folder in llvm-project-rustc-14.0.0-2022-03-22 folder

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish
Copy link
Copy Markdown
Contributor Author

image
image

I just finished building out from what essentially was a fresh repo without issue. Whatever is happening, it has to do with your build system setup.

@openwrtfirmwarecostum
Copy link
Copy Markdown

image image

I just finished building out from what essentially was a fresh repo without issue. Whatever is happening, it has to do with your build system setup.

did you try sdk 21.02.2?

@Grommish
Copy link
Copy Markdown
Contributor Author

Grommish commented Apr 20, 2022

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

No, as I told you prior, I only build from source on master branch (and suggested you do the same). I don't use/never have used SDK or ImageBuilder, and have no idea what issues (if any) it would cause.

Edit: In theory, there should be no reason you couldn't build out 21.x from source and not have this work, but again, I only build from the master branch (currently at HEAD 7a73221332 - (upstream/master, upstream/HEAD, master) build: use numeric-owner in ipkg-build (11 hours ago) <Paul Spooren>)

@openwrtfirmwarecostum
Copy link
Copy Markdown

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

No, as I told you prior, I only build from source on master branch (and suggested you do the same). I don't use/never have used SDK or ImageBuilder, and have no idea what issues (if any) it would cause.

Edit: In theory, there should be no reason you couldn't build out 21.x from source and not have this work, but again, I only build from the master branch (currently at HEAD 7a73221332 - (upstream/master, upstream/HEAD, master) build: use numeric-owner in ipkg-build (11 hours ago) <Paul Spooren>)

naturally you don't get an error you don't try it. for the master branch I don't use it for my daily use

@Grommish
Copy link
Copy Markdown
Contributor Author

Grommish commented Apr 20, 2022

You need to build from source. I've never used the SDK and/or Imagebuilder, so I have no idea if it works or not (and suspect not however).

No, as I told you prior, I only build from source on master branch (and suggested you do the same). I don't use/never have used SDK or ImageBuilder, and have no idea what issues (if any) it would cause.
Edit: In theory, there should be no reason you couldn't build out 21.x from source and not have this work, but again, I only build from the master branch (currently at HEAD 7a73221332 - (upstream/master, upstream/HEAD, master) build: use numeric-owner in ipkg-build (11 hours ago) <Paul Spooren>)

naturally you don't get an error you don't try it. for the master branch I don't use it for my daily use

Understandable, but this package will never be backported to 21.xx or 22.xx. Those branches for Openwrt and Packages are locked except for security updates (or will be in the case of 22.xx by the time this is anywhere near ready).. Rust-lang will never be officially supported in those version, nor LLVM. I cannot burn time on something that will never be accepted into the repo. You are welcome to try and make it work, if you'd like, but I cannot at this time

@openwrtfirmwarecostum
Copy link
Copy Markdown

although this is not accepted in openwrt but we can manage rust so that it can be installed in openwrt. over time openwrt users need this. I really appreciate your work

@openwrtfirmwarecostum
Copy link
Copy Markdown

@Grommish

i understand now llvm is on master and openwrt 22.03.x. so now i will wait for 22.03.x stable release. thanks

wtf moments.... hehe

@Grommish
Copy link
Copy Markdown
Contributor Author

Grommish commented Apr 20, 2022 via email

@openwrtfirmwarecostum
Copy link
Copy Markdown

The LLVM package that you are referring to is for the eBPF toolchain and will not work with rust.

On Wed, Apr 20, 2022, 5:32 AM openwrtfirmwarecostum < @.> wrote: @Grommish https://github.com/Grommish i understand now llvm is on master and openwrt 22.03.x. so now i will wait for 22.03.x stable release. thanks wtf moments.... hehe — Reply to this email directly, view it on GitHub <#18322 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBY6JQLJI4CY3FTXZZX5TDVF7FMNANCNFSM5TVDODWA . You are receiving this because you were mentioned.Message ID: @.>

I mean the error is because openwrt 21.02 doesn't support llvm-bpf and I see the makefile in your rust is the same as the makefile in llvm-bpf

@jefferyto
Copy link
Copy Markdown
Member

PKG_MIRROR_HASH is intentionally left as "skip" because no tarball
is available from the Openwrt buildbots. If this becomes available
from the build-bot, that will probably be set by it.

You can use the hash from the tarball created locally; it should be identical to the tarball created by buildbots.

No, as I told you prior, I only build from source on master branch (and suggested you do the same). I don't use/never have used SDK or ImageBuilder, and have no idea what issues (if any) it would cause.

AFAIK buildbots use the SDKs to build packages. There are also snapshot SDKs built from master, I believe once a day.

@Grommish
Copy link
Copy Markdown
Contributor Author

PKG_MIRROR_HASH is intentionally left as "skip" because no tarball
is available from the Openwrt buildbots. If this becomes available
from the build-bot, that will probably be set by it.

You can use the hash from the tarball created locally; it should be identical to the tarball created by buildbots.

No, as I told you prior, I only build from source on master branch (and suggested you do the same). I don't use/never have used SDK or ImageBuilder, and have no idea what issues (if any) it would cause.

AFAIK buildbots use the SDKs to build packages. There are also snapshot SDKs built from master, I believe once a day.

Thanks! In researching the issue with rust-lang llvm-project branch, they date their branches, but then push updates (while not generating release tarballs), I ran across other issues reported where the sha256sum was changing based on the host. Apparently when Github changed/updated their backend, it started changing sha256sums and causing havoc.

@jefferyto
Copy link
Copy Markdown
Member

You can use the hash from the tarball created locally; it should be identical to the tarball created by buildbots.

Thanks! In researching the issue with rust-lang llvm-project branch, they date their branches, but then push updates (while not generating release tarballs), I ran across other issues reported where the sha256sum was changing based on the host. Apparently when Github changed/updated their backend, it started changing sha256sums and causing havoc.

As part of building a package using a git checkout (instead of downloading a source tarball), buildroot will also create a tar.xz archive of the source code it downloaded. The archive should be in your "dl" directory, probably named "llvm-project-rustc-14.0.tar.xz". The sha256 hash of this file is the value for PKG_MIRROR_HASH.

Buildroot can also fill in the value for you if you do:

make package/llvm-project-rustc/check FIXUP=1 V=s

Grommish added a commit to Itus-Shield/packages that referenced this pull request Apr 30, 2022
in building/linking rust-lang projects.

We cannot use the existing OpenWrt eBPF LLVM toolchain for this.
The eBPF LLVM toolchain only builds for eBPF, but we need the
rust enhanced LLVM and support for AArch64, ARM, Mips, PowerPC,
and X86.

This LLVM is stored/preserved in staging_dir/host/llvm-rust and
carries over a clean, requiring only a build once situation
(unless the LLVM changes, or staging_dir gets removed).

Used/Required for openwrt#18322

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish Grommish force-pushed the llvm-project-rustc branch from 860bf63 to c4cebe3 Compare April 30, 2022 10:45
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 1, 2022
This is the rust enhanced/specific LLVM 14.0.0 toolchain, used
in building/linking rust-lang projects.

We cannot use the existing OpenWrt eBPF LLVM toolchain for this.
The eBPF LLVM toolchain only builds for eBPF, but we need the
rust enhanced LLVM and support for AArch64, ARM, Mips, PowerPC,
and X86.

This LLVM is stored/preserved in staging_dir/host/llvm-rust and
carries over a clean, requiring only a build once situation
(unless the LLVM changes, or staging_dir gets removed).

Used/Required for openwrt#18322

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish Grommish force-pushed the llvm-project-rustc branch from c4cebe3 to 81151da Compare May 1, 2022 17:42
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 5, 2022
Rust-lang toolchain is divided into two separate parts: Build HOST
and TARGET toolchains.  The HOST toolchain is persistent in
STAGING_DIR_HOST and compiled rustc/cargo for use by the TARGET
toolchains which require MUSL specific tags.

This package requires the rust specific LLVM (openwrt#18322)
PR to build and is a dependent for rust-lang TARGET toolchain (openwrt#13916)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 5, 2022
Rust is a multi-paradigm, general-purpose programming language
designed for performance and safety, especially safe concurrency.

It is syntactically similar to C++, but can guarantee memory
safety by using a borrow checker to validate references.

This introduces support for an external rust-specific LLVM
toolchain.

This update introduces the following target tuples:
mips64-openwrt-linux-musl (upstreamed)
mips-openwrt-linux-musl
mipsel-openwrt-linux-musl
aarch64-openwrt-linux-musl
arm-openwrt-linux-muslgnueabi
arm-openwrt-linux-muslgnueabihf
armv5tej-openwrt-linux-muslgnueabi
armv6k-openwrt-linu8x-muslgnueabi
armv7-openwrt-linux-muslgnueabi
armv7-openwrt-linux-muslgnueabihf

This PR requires/depends on the rust-lang specific LLVM (openwrt#18322)
and rust-lang rust_host (openwrt#18453)

Initial testing and support for:
powerpc64-openwrt-linux-musl
x86_64-openwrt-linux-musl

Signed-off-by: Donald Hoskins <grommish@gmail.com>
This is the rust enhanced/specific LLVM 14.0.0 toolchain, used
in building/linking rust-lang projects.

We cannot use the existing OpenWrt eBPF LLVM toolchain for this.
The eBPF LLVM toolchain only builds for eBPF, but we need the
rust enhanced LLVM and support for AArch64, ARM, Mips, PowerPC,
and X86.

This LLVM is stored/preserved in staging_dir/host/llvm-rust and
carries over a clean, requiring only a build once situation
(unless the LLVM changes, or staging_dir gets removed).

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish Grommish force-pushed the llvm-project-rustc branch from 81151da to 2509795 Compare May 5, 2022 19:01
@Grommish
Copy link
Copy Markdown
Contributor Author

Grommish commented May 5, 2022

Updated Integration into the build system to remove the need for LD_LIBRARY_PATH flags and fully integrated the libLLVM-14.0.so into the build system

Used for rust_host (#18453) and rust-lang (#13916)

Grommish added a commit to Itus-Shield/packages that referenced this pull request May 5, 2022
bandwhich is a terminal bandwidth monitoring utility

This package requires llvm-project-rustc (openwrt#18322), rust_host (openwrt#18453) and rust-lang (openwrt#13916)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 5, 2022
bandwhich is a terminal bandwidth monitoring utility

This package requires llvm-project-rustc (openwrt#18322), rust_host (openwrt#18453) and rust-lang (openwrt#13916)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 5, 2022
bottom is a CLI graphical process/system monitor.

This package requires llvm-project-rustc (openwrt#18322), rust_host (openwrt#18453) and
rust-lang (openwrt#13916)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 5, 2022
Ripgrep recursively searches directories for a regex pattern while respecting your gitignore

This package requires llvm-project-rustc (openwrt#18322), rust_host (openwrt#18453) and
rust-lang (openwrt#13916)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
Grommish added a commit to Itus-Shield/packages that referenced this pull request May 7, 2022
Move rust-host PR (openwrt#18453) into existing
rust-lang PR for cleanliness issues.

This adds powerpc-openwrt-linux-musl support

Still requires LLVM-Project-Rustc (openwrt#18322)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish Grommish marked this pull request as ready for review May 7, 2022 22:04
desowin pushed a commit to desowin/packages that referenced this pull request May 17, 2022
Rust is a multi-paradigm, general-purpose programming language
designed for performance and safety, especially safe concurrency.

It is syntactically similar to C++, but can guarantee memory
safety by using a borrow checker to validate references.

This introduces support for an external rust-specific LLVM
toolchain.

This update introduces the following target tuples:
mips64-openwrt-linux-musl (upstreamed)
mips-openwrt-linux-musl
mipsel-openwrt-linux-musl
aarch64-openwrt-linux-musl
arm-openwrt-linux-muslgnueabi
arm-openwrt-linux-muslgnueabihf
armv5tej-openwrt-linux-muslgnueabi
armv6k-openwrt-linu8x-muslgnueabi
armv7-openwrt-linux-muslgnueabi
armv7-openwrt-linux-muslgnueabihf

This PR requires/depends on the rust-lang specific LLVM (openwrt#18322)
and rust-lang rust_host (openwrt#18453)

Initial testing and support for:
powerpc64-openwrt-linux-musl
x86_64-openwrt-linux-musl

Signed-off-by: Donald Hoskins <grommish@gmail.com>
desowin pushed a commit to desowin/packages that referenced this pull request May 17, 2022
Move rust-host PR (openwrt#18453) into existing
rust-lang PR for cleanliness issues.

This adds powerpc-openwrt-linux-musl support

Still requires LLVM-Project-Rustc (openwrt#18322)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish
Copy link
Copy Markdown
Contributor Author

Closed - Rolled into #13916

@Grommish Grommish closed this May 19, 2022
desowin pushed a commit to desowin/packages that referenced this pull request May 30, 2022
Rust is a multi-paradigm, general-purpose programming language
designed for performance and safety, especially safe concurrency.

It is syntactically similar to C++, but can guarantee memory
safety by using a borrow checker to validate references.

This introduces support for an external rust-specific LLVM
toolchain.

This update introduces the following target tuples:
mips64-openwrt-linux-musl (upstreamed)
mips-openwrt-linux-musl
mipsel-openwrt-linux-musl
aarch64-openwrt-linux-musl
arm-openwrt-linux-muslgnueabi
arm-openwrt-linux-muslgnueabihf
armv5tej-openwrt-linux-muslgnueabi
armv6k-openwrt-linu8x-muslgnueabi
armv7-openwrt-linux-muslgnueabi
armv7-openwrt-linux-muslgnueabihf

This PR requires/depends on the rust-lang specific LLVM (openwrt#18322)
and rust-lang rust_host (openwrt#18453)

Initial testing and support for:
powerpc64-openwrt-linux-musl
x86_64-openwrt-linux-musl

Signed-off-by: Donald Hoskins <grommish@gmail.com>
desowin pushed a commit to desowin/packages that referenced this pull request May 30, 2022
Move rust-host PR (openwrt#18453) into existing
rust-lang PR for cleanliness issues.

This adds powerpc-openwrt-linux-musl support

Still requires LLVM-Project-Rustc (openwrt#18322)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
desowin pushed a commit to desowin/packages that referenced this pull request Oct 2, 2022
Rust is a multi-paradigm, general-purpose programming language
designed for performance and safety, especially safe concurrency.

It is syntactically similar to C++, but can guarantee memory
safety by using a borrow checker to validate references.

This introduces support for an external rust-specific LLVM
toolchain.

This update introduces the following target tuples:
mips64-openwrt-linux-musl (upstreamed)
mips-openwrt-linux-musl
mipsel-openwrt-linux-musl
aarch64-openwrt-linux-musl
arm-openwrt-linux-muslgnueabi
arm-openwrt-linux-muslgnueabihf
armv5tej-openwrt-linux-muslgnueabi
armv6k-openwrt-linu8x-muslgnueabi
armv7-openwrt-linux-muslgnueabi
armv7-openwrt-linux-muslgnueabihf

This PR requires/depends on the rust-lang specific LLVM (openwrt#18322)
and rust-lang rust_host (openwrt#18453)

Initial testing and support for:
powerpc64-openwrt-linux-musl
x86_64-openwrt-linux-musl

Signed-off-by: Donald Hoskins <grommish@gmail.com>
desowin pushed a commit to desowin/packages that referenced this pull request Oct 2, 2022
Move rust-host PR (openwrt#18453) into existing
rust-lang PR for cleanliness issues.

This adds powerpc-openwrt-linux-musl support

Still requires LLVM-Project-Rustc (openwrt#18322)

Signed-off-by: Donald Hoskins <grommish@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants