-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
platform: Androidplatform: iOSstatus: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug
Description
Describe the bug
I recently started adding a top-level cargo workspace to all my Tauri apps, so that regular cargo commands work without annoying cd src-tauri
.
This breaks the mobile bundler however as it apparently expects a hard-coded target
path for the dylib.
Reproduction
- Create a Tauri app that has mobile support (so through
ppm crate vite
andcargo tauri init
) - Add a top level cargo workspace
[workspace] members = ["src-tauri"]
- See the error
ld: warning: directory not found for option '-L/Users/jonaskruckenberg/Documents/GitHub/elk-desktop/src-tauri/target/aarch64-apple-ios-sim/debug'
it is looking in the wrong path for the dylib
Expected behavior
The mobile bundler should use the cargo apis (cargo metadata
maybe?) to figure out the correct target directory
Platform and versions
Environment
› OS: Mac OS 13.0.1 X64
› Node.js: 18.12.1
› npm: 8.19.2
› pnpm: 7.18.1
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.65.0
› cargo: 1.65.0
› Rust toolchain: stable-aarch64-apple-darwin
Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 2.0.0-alpha.0
› @tauri-apps/api [NPM]: Not installed!
› tauri [RUST]: 2.0.0-alpha.1 (1.2.2, 2.0.0-alpha.1),
› tauri-build [RUST]: 2.0.0-alpha.0,
› tao [RUST]: 0.15.6,
› wry [RUST]: 0.23.1,
App
› build-type: bundle
› CSP: style-src 'self'; media-src https:; connect-src https: wss:; font-src 'self'; default-src 'none'; img-src 'self' data: https:
› distDir: ../elk/.output/public
› devPath: http://localhost:5314/
App directory structure
├─ target
├─ elk
├─ .github
├─ src-tauri
└─ .git
iOS
› Teams: None
Stack trace
Ld /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Products/debug-iphonesimulator/app.app/app normal (in target 'app_iOS' from project 'app')
cd /Users/jonaskruckenberg/Documents/GitHub/elk-desktop/src-tauri/gen/apple
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-sim-apple-ios9.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk -L/Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Products/debug-iphonesimulator -L/Users/jonaskruckenberg/Documents/GitHub/elk-desktop/src-tauri/target/aarch64-apple-ios-sim/debug -F/Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Products/debug-iphonesimulator -F. -filelist /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/app.build/debug-iphonesimulator/app_iOS.build/Objects-normal/arm64-sim/app.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/app.build/debug-iphonesimulator/app_iOS.build/Objects-normal/arm64-sim/app_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib\=libc++ -fobjc-arc -fobjc-link-runtime -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/app.build/debug-iphonesimulator/app_iOS.build/app.app-Simulated.xcent -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __ents_der -Xlinker /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/app.build/debug-iphonesimulator/app_iOS.build/app.app-Simulated.xcent.der -lapp -framework CoreGraphics -framework Metal -framework MetalKit -framework QuartzCore -framework Security -framework UIKit -framework WebKit -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Intermediates.noindex/app.build/debug-iphonesimulator/app_iOS.build/Objects-normal/arm64-sim/app_dependency_info.dat -o /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Products/debug-iphonesimulator/app.app/app
ld: warning: directory not found for option '-L/Users/jonaskruckenberg/Documents/GitHub/elk-desktop/src-tauri/target/aarch64-apple-ios-sim/debug'
ld: library not found for -lapp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/jonaskruckenberg/Library/Developer/Xcode/DerivedData/app-elzodwdekrmvyqaltibljffxgybm/Build/Products/debug-iphonesimulator/app.app/app normal (in target 'app_iOS' from project 'app')
(1 failure)
Error Command "xcodebuild -scheme app_iOS -workspace /Users/jonaskruckenberg/Documents/GitHub/elk-desktop/src-tauri/gen/apple/app.xcodeproj/project.xcworkspace/ -sdk iphonesimulator -configuration debug -arch arm64-sim -allowProvisioningUpdates build" didn't complete successfully, exiting with code 65.
Additional context
No response
Metadata
Metadata
Assignees
Labels
platform: Androidplatform: iOSstatus: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug