-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: linking with cc failed #28
Comments
Looks like this is because osmosisd only supports x86. |
I got this just now on our CI: https://github.com/mars-protocol/red-bank/actions/runs/5621988241/job/15233817436?pr=267 Not sure why it happened. I managed to solve it by running the job on |
@CyberHoward Are you running linux? Perhaps its a linux issue. |
No, running the latest Mac OS. |
Also seeing this. looks like test-tube/packages/osmosis-test-tube/libosmosistesttube is build for x86 and when running on mac os M1/2 linking for arm architecture fails cc @iboss-ptk |
Also having this issue. Makes it more annoying to write tests with this library... and it's so nice I want to use it. |
I also have the same issue running on Apple M1 Max |
A temporary fix I've found is to run the test in a x86 docker container. dockerfile. But it's a lot slower. |
@CyberHoward @njerschow @j0nl1 @JakeHartnell I was really wondering about this issue since I'm on m1 max as well and there is no issue. But one possibility might be because of rust toolchain . run you might be on |
stable-aarch64-apple-darwin (default)
rustc 1.72.0 (5680fa18f 2023-08-23) Running the aarch toolchain. |
Then how about
(try |
Did that, now the error: failed to run custom build command for `osmosis-test-tube v19.0.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `abstract/modules/target/debug/build/osmosis-test-tube-066cc009cbc73844/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=./libosmosistesttube
--- stderr
go: no Go source files
thread 'main' panicked at 'failed to build go code', /Users/robin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/osmosis-test-tube-19.0.0/build.rs:114:9
stack backtrace:
0: rust_begin_unwind
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
2: build_script_build::build_libosmosistesttube
3: build_script_build::main
4: core::ops::function::FnOnce::call_once Which is: let exit_status = Command::new("go")
.current_dir(manifest_dir.join("libosmosistesttube"))
.arg("build")
.arg("-buildmode=c-shared")
.arg("-o")
.arg(out)
.arg("main.go")
.spawn()
.unwrap()
.wait()
.unwrap();
if !exit_status.success() {
panic!("failed to build go code"); // <--- This line
} Thanks for the help btw, happy to try some more suggestions. Edit: will try cloning and building this repo locally Edit 2: The output of the shell command that fails is: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "go: no Go source files\n" Edit 3: A quick google search pointed out setting |
In summary doing the following fixed the issue for me: cargo clean
export GOOS="darwin"
export GOARCH="arm64"
export CGO_ENABLED=1 @JakeHartnell @njerschow @j0nl1 |
@CyberHoward Nice! Out of curiosity, what's the output of your |
|
Oh, that's probably why. Mine is |
Same here with an M2 mac, im running |
Update, works for me with latest versions. Also running it in DAO DAO CI: https://github.com/DA0-DA0/dao-contracts/blob/95e4f73a170705deeb3689341c51f3a3b126e3e9/.github/workflows/test_tube.yml |
OP issue is resolved, please open new issue if there is any similar one. |
When using test-tube as an execution environment I run into the following error:
Are there any pre-requisites that I might not have installed? I didn't see any in the readme.
Running on an M1 max.
The text was updated successfully, but these errors were encountered: