EnzymeAD / rust

A rust fork to work towards Enzyme integration
https://www.rust-lang.org
Other
52 stars 7 forks source link

Update enzyme-ci.yml #84

Closed ZuseZ4 closed 2 months ago

ZuseZ4 commented 3 months ago

We don't need to build LLD (takes 2.5 min), we just want to use some LLD for linking. We also don't need llvm plugins.

ZuseZ4 commented 3 months ago

@wsmoses do you know by coincidence how to get lld into CI? Apt install gives permission denied and building takes 3 minutes (I hope to get CI down to +-10 min)

cc @tgymnich

ZuseZ4 commented 3 months ago

@wsmoses Just trying to fix our CI with @I-Al-Istannen and Jed, could you please try again adding LLD when you have some free cycles (your last commit failed)? Building LLD + LLD wrapper takes up to 8 minutes, which is up to half the CI time if there isn't much else to be rebuild.

ZuseZ4 commented 2 months ago

@wsmoses can you please look again at this? 30 min compile times on every PR are unfortunate.

ZuseZ4 commented 2 months ago

@tgymnich Do you have credentials to help with setting up lld here?

wsmoses commented 2 months ago

@tgymnich should have permissions now, regardless pushed an lld alias, let's see if that makes rust happy.

If not, LLD is installed in the commit I made a few weeks ago to this branch, but wasn't being picked up by rust since there isn't an alias from lld-17 to lld.

Note that the CI should not install such an alias system-wide as other runners that use the same machine will run into other LLVM issues otherwise.

I added a local alias in the script, let's see if that fixes it.

If not, presumably you need to tell rust about the different lld.

wsmoses commented 2 months ago

It looks like it got further (an earlier task seemed to succeed that had fuse-ld=lld) but this one did not and then err'd.

Looks to be inside rust so going to throw it back to you @ZuseZ4 .


  error: linking with `cc` failed: exit status: 1
    |
    = note: LC_ALL="C" PATH="/mnt/Data/_work/rust/rust/build/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/ubuntu/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcukG6IH/symbols.o" "/mnt/Data/_work/rust/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/release/build/std-f3a4a45b769de4cc/build_script_build-f3a4a45b769de4cc.build_script_build.73daf00d2df5a36d-cgu.0.rcgu.o" "/mnt/Data/_work/rust/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/release/build/std-f3a4a45b769de4cc/build_script_build-f3a4a45b769de4cc.build_script_build.73daf00d2df5a36d-cgu.1.rcgu.o" "/mnt/Data/_work/rust/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/release/build/std-f3a4a45b769de4cc/build_script_build-f3a4a45b769de4cc.2dxvdtcu2dacw3os.rcgu.o" "-Wl,--as-needed" "-L" "/mnt/Data/_work/rust/rust/build/build/x86_64-unknown-linux-gnu/stage0-std/
    = note: collect2: fatal error: cannot find 'ld'
            compilation terminated.
            ```l
wsmoses commented 2 months ago

That is weird though since I assume ld is on the system? Let alone the lld we added. Let me try one more thing

ZuseZ4 commented 2 months ago

Thanks, if the system lld now is around and works, I'll experiment a bit more. cc @jedbrown if you have an idea, please feel free to push too

jedbrown commented 2 months ago

I don't think the alias can work because that's only in the shell, not even an exported environment variable. Perhaps we could place a ld.lld symlink in PATH and export it. https://lld.llvm.org/#using-lld

I also note the error message refers to ld, not ld.lld or lld, despite the fact that -fuse-ld=lld has been passed in that command. I don't know if that's a misleading error message or if it's actually looking for the name ld.

     = note: collect2: fatal error: cannot find 'ld'
wsmoses commented 2 months ago

Yeah I think that’s what we’ll need to do.

Make some .local/bin in the workspace dir, add to path, then put a symlink in.

I was hoping you knew a flag to specify it offhand, but if not that should work

On Sun, Apr 14, 2024 at 9:54 PM Jed Brown @.***> wrote:

I don't think the alias can work because that's only in the shell, not even an exported environment variable. Perhaps we could place a ld.lld symlink in PATH and export it. https://lld.llvm.org/#using-lld

I also note the error message refers to ld, not ld.lld or lld, despite the fact that -fuse-ld=lld has been passed in that command. I don't know if that's a misleading error message or if it's actually looking for the name ld.

 = note: collect2: fatal error: cannot find 'ld'

— Reply to this email directly, view it on GitHub https://github.com/EnzymeAD/rust/pull/84#issuecomment-2055124561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJTUXC5CM2DNU4MWK6FDZTY5NMOXAVCNFSM6AAAAABFPGCMJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJVGEZDINJWGE . You are receiving this because you were mentioned.Message ID: @.***>

ZuseZ4 commented 2 months ago

Jay!