Closed guillemcordoba closed 1 year ago
haven't seen before no, but a quick check through chatgpt4 got me to focus on:
tx5-go-pion-sys-0.0.2-alpha/build.rs:129:5
line 129 of the crate tx5-go-pion-sys. can you confirm if the SHA you've got checked out has the same line 129 as develop right now?
https://github.com/holochain/tx5/blob/da9a8fdd3fc8cbfc62c3d319c01449a595f69e16/crates/tx5-go-pion-sys/build.rs#L129
it summarized:
Here’s a summary of the main problems highlighted in the error message:
The linker (ld) is warning about malformed LC_DYSYMTAB. It expected 111 undefined symbols to start at index 14939 but found 121 undefined symbols starting at index 70.
The linker (ld) is unable to find the symbols _darwin_arm_init_mach_exception_handler and _darwin_arm_init_thread_exception_port, leading to undefined symbols errors.
The Go build command is failing with exit status 1 due to the linker errors, causing the Rust build script to panic.
so I did a google for: "unable to find the symbols _darwin_arm_init_mach_exception_handler" and one interesting result is: https://github.com/golang/go/issues/46032#issuecomment-1356019920 this -tags=ios might be necessary but not sufficient to fix
ah, I assume line 129 for you is: https://github.com/holochain/tx5/blame/8d0e74387d8aa541ef283db770541ff933f52b26/crates/tx5-go-pion-sys/build.rs#L129
using the latest may actually help https://github.com/holochain/tx5/blame/main/crates/tx5-go-pion-sys/build.rs#L129 given that there's some additional env vars per platform that are set.
@guillemcordoba - Awesome. Yeah, ideally we'd get the ios simulator running in CI as well. Unfortunately I don't have as much experience with ios dev as android so it's not going to be as easy for me.
When cross-compiling did you specify the cross-compile linker in the build command?
Thanks @Connoropolous , pointing to the latest main gives a different error:
The following warnings were emitted during compilation:
warning: NOTE:running go build: cd "/Users/guillemcordoba/rostanga-test/target/aarch64-apple-ios-sim/debug/build/tx5-go-pion-sys-2584f61e307c2d38/out" && GOARCH="arm64" GOCACHE="/Users/guillemcordoba/rostanga-test/target/aarch64-apple-ios-sim/debug/build/tx5-go-pion-sys-2584f61e307c2d38/out/go-build" GOOS="ios" "go" "build" "-ldflags" "-s -w" "-o" "/Users/guillemcordoba/rostanga-test/target/aarch64-apple-ios-sim/debug/build/tx5-go-pion-sys-2584f61e307c2d38/out/go-pion-webrtc.dylib" "-mod=vendor" "-buildmode=c-shared"
error: failed to run custom build command for `tx5-go-pion-sys v0.0.2-alpha (https://github.com/holochain/tx5?branch=main#da9a8fdd)`
Caused by:
process didn't exit successfully: `/Users/guillemcordoba/rostanga-test/target/debug/build/tx5-go-pion-sys-ea6e511c91bde17d/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=go.mod
cargo:rerun-if-changed=go.sum
cargo:rerun-if-changed=buffer.go
cargo:rerun-if-changed=const.go
cargo:rerun-if-changed=datachannel.go
cargo:rerun-if-changed=peerconnection.go
cargo:rerun-if-changed=main.go
cargo:rerun-if-changed=vendor.zip
cargo:warning=NOTE:running go build: cd "/Users/guillemcordoba/rostanga-test/target/aarch64-apple-ios-sim/debug/build/tx5-go-pion-sys-2584f61e307c2d38/out" && GOARCH="arm64" GOCACHE="/Users/guillemcordoba/rostanga-test/target/aarch64-apple-ios-sim/debug/build/tx5-go-pion-sys-2584f61e307c2d38/out/go-build" GOOS="ios" "go" "build" "-ldflags" "-s -w" "-o" "/Users/guillemcordoba/rostanga-test/target/aarch64-apple-ios-sim/debug/build/tx5-go-pion-sys-2584f61e307c2d38/out/go-pion-webrtc.dylib" "-mod=vendor" "-buildmode=c-shared"
--- stderr
-buildmode=c-shared not supported on ios/arm64
thread 'main' panicked at 'error running go build', /Users/guillemcordoba/rostanga-test/.cargo/git/checkouts/tx5-bc868c796fa5599f/da9a8fd/crates/tx5-go-pion-sys/build.rs:178:5
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::go_build
at ./build.rs:178:5
3: build_script_build::main
at ./build.rs:17:5
4: core::ops::function::FnOnce::call_once
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
@neonphog I don't run the compilation command manually (I don't have any iOS experience either), tauri runs everything for me. These are the commands I think tauri is running:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -scheme rostangatest_iOS -workspace /Users/guillemcordoba/rostanga-test/src-tauri/gen/apple/rostangatest.xcodeproj/project.xcworkspace/ -sdk iphonesimulator -configuration debug -arch arm64-sim -allowProvisioningUpdates build
tauri ios xcode-script -v --platform iOS Simulator --sdk-root /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk --framework-search-paths /Users/guillemcordoba/Library/Developer/Xcode/DerivedData/rostangatest-bovehlqdustugiesclixeelluihr/Build/Products/debug-iphonesimulator "." --header-search-paths /Users/guillemcordoba/Library/Developer/Xcode/DerivedData/rostangatest-bovehlqdustugiesclixeelluihr/Build/Products/debug-iphonesimulator/include --gcc-preprocessor-definitions DEBUG=1 --configuration debug arm64-sim
-buildmode=c-shared not supported on ios/arm64
-- ahh, right, we ran into this before, didn't we @Connoropolous -- yep, we're going to need to use c-archive on everything except windows. Unfortunately, that's going to be a bit of an effort.
@guillemcordoba - what is the priority of this so we can get it scheduled?
yes exactly those comments. was just going to link to them
Okey thanks! It's good to know I'm now up to speed with iOS as well. It's not really urgent to me - ideally I would want to be able to deliver a HC mobile app to users in the next 3-5 months. It seems clear that this is blocking for holochain mobile, which I know is a priority for the HC core team, so I think it's your decision on how you want to weight this.
I've renamed https://github.com/holochain/tx5/issues/40 so it makes more sense. I'll close this now as a duplicate of that.
When building tx5 targeting an iPhone simulator in a MacOs host, I get this error:
I'm really confused... I don't know for sure that this is an error from tx5 or elsewhere. @Connoropolous have you found this error?
This is my
flake.nix
file:@neonphog let me know if you need me to provide any other useful information about this.