Closed nozwock closed 1 year ago
I think the macos error may be coming from mold
; I think macos support is still experimental https://github.com/rui314/mold/issues/189
Is it possible to have only the macos build using the default slower linker?
I think the macos error may be coming from
mold
; I think macos support is still experimental https://github.com/rui314/mold/issues/189
I've tried it without mold
before, didn't work.
Ig I'll confirm once again just in case.
I also came across https://stackoverflow.com/questions/28124221/error-linking-with-cc-failed-exit-code-1
Maybe the configs are wrong, I'm not familiar with those at all and the current ones were pretty much copy pasted from internet resources. I don't even remember why I had to set them up to be honest.
I also came across https://stackoverflow.com/questions/28124221/error-linking-with-cc-failed-exit-code-1
I've tried those flags in Cargo.toml
aswell, didn't work either.
Also just remembered, that mold linker isn't even enabled.
The weird thing is that macos_build is working fine... Don't know what's up, there should be no difference b/w the two at the time of build.
Edit: just ran an action with the mold section commented out just for the sake of it, it still failed with same error though
Do you think it might be because the target
is not explicitly set in build_artifacts.yml
?
steps:
- uses: actions/checkout@v3
- uses: actions-rs/rust-toolchain@v1
with:
toolchain: stable
override: true
compared to
Do you think it might be because the
target
is not explicitly set inbuild_artifacts.yml
?steps: - uses: actions/checkout@v3 - uses: actions-rs/rust-toolchain@v1 with: toolchain: stable override: true
It shouldn't matter since the default macos target is same, but I can try anyways I guess.
So cargo build --release
would build for x86_64-apple-darwin
here.
It always fails at compiling the quote
crate, just like in the build error log here-> https://github.com/MrTanoshii/rusty-autoclicker/pull/28#issue-1438710068
Ahem ahem, as stupid as it is...
Adding --target x86_64-apple-darwin
to cargo
args fixes the issue 😑
@MrTanoshii I'll push the changes after a while
Try replacing
- name: Building
run: cargo build --release
with
without the --target x86_64-apple-darwin
but with --release
Maybe the cargo action fixes some things which is why https://github.com/MrTanoshii/rusty-autoclicker/blob/main/.github/workflows/macos_build.yml passes
Ahem ahem, as stupid as it is... Adding
--target x86_64-apple-darwin
tocargo
args fixes the issue 😑@MrTanoshii I'll push the changes after a while
Glad you found a fix, I'm lost
Uff celebrated little too early...Now it fails almost at the end of build at rand
create 😭
Try replacing
- name: Building run: cargo build --release
with
Oh sorry oops, I've already done that long before on a private repo, just haven't pushed the changes to the fork since I was experimenting.
This is how it's on the private repo at the moment, just added target: x86_64-apple-darwin
, trying it out.
include:
# - build_target: linux
# os: ubuntu-latest
- build_target: macos
os: macos-latest
# - build_target: windows
# os: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
override: true
# - uses: rui314/setup-mold@v1 # faster linker
# with:
# make-default: false
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.OS }}-release-
if: matrix.os == 'ubuntu-latest'
- name: Setting up dependencies for linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get --assume-yes install libx11-dev libxtst-dev libevdev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --verbose --target x86_64-apple-darwin
This is how it's on the private repo at the moment, just added
target: x86_64-apple-darwin
, trying it out.
This had no impact whatsoever, build failed just as before at rand
crate.
Ok, finally fixed it 😭
I also came across https://stackoverflow.com/questions/28124221/error-linking-with-cc-failed-exit-code-1
Maybe the configs are wrong, I'm not familiar with those at all and the current ones were pretty much copy pasted from internet resources. I don't even remember why I had to set them up to be honest.
Ya the configs were wrong, I'm dumb, earlier I added those field in Cargo.toml
and not in config file, that's why it didn't work before.
This here is what was causing the issue- https://github.com/MrTanoshii/rusty-autoclicker/blob/305dd95f759f175ff6c545df9b907c2988a39065/.cargo/config#L5-L8
Now @MrTanoshii, what should we do about the changes to .cargo/config
? Seperate PR?
Now @MrTanoshii, what should we do about the changes to
.cargo/config
? Seperate PR?
Same PR please
@MrTanoshii Everything's working 👍️
Addresses #10
What's working: