Closed ivnsch closed 4 years ago
No, you don't have to install the duckscript it's bundled with Cargo-make
I guess it is an issue that it can't find the file libscrap_ffi.a
in /target/universal/debug/
Could you check that out?
Also, could you rebuild using these commands
$ cargo make ios
$ cargo make post-ios
and include the logs
There is libscrap_ffi.a
in /target/universal/debug/
Logs:
flutterust $ cargo make ios
[cargo-make] INFO - cargo make 0.31.1
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: ios
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: workspace
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: adder-ffi
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: ios
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: ios
[cargo-make][1] INFO - Execute Command: "cargo" "lipo"
[INFO cargo_lipo::meta] Will build universal library for ["adder-ffi", "scrap-ffi"]
[INFO cargo_lipo::lipo] Building "adder-ffi" for "aarch64-apple-ios"
Compiling adder-ffi v0.1.0 (/Users/ischuetz/dev/flutterust/native/adder-ffi)
warning: dropping unsupported crate type `cdylib` for target `aarch64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.66s
[INFO cargo_lipo::lipo] Building "adder-ffi" for "x86_64-apple-ios"
Compiling adder-ffi v0.1.0 (/Users/ischuetz/dev/flutterust/native/adder-ffi)
warning: dropping unsupported crate type `cdylib` for target `x86_64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.30s
[INFO cargo_lipo::lipo] Creating universal library for adder-ffi
[INFO cargo_lipo::lipo] Building "scrap-ffi" for "aarch64-apple-ios"
Compiling scrap-ffi v0.1.0 (/Users/ischuetz/dev/flutterust/native/scrap-ffi)
warning: dropping unsupported crate type `cdylib` for target `aarch64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 3.11s
[INFO cargo_lipo::lipo] Building "scrap-ffi" for "x86_64-apple-ios"
Compiling scrap-ffi v0.1.0 (/Users/ischuetz/dev/flutterust/native/scrap-ffi)
warning: dropping unsupported crate type `cdylib` for target `x86_64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 1.76s
[INFO cargo_lipo::lipo] Creating universal library for scrap-ffi
[cargo-make][1] INFO - Build Done in 6 seconds.
/Users/ischuetz/dev/flutterust
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: scrap-ffi
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: ios
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: ios
[cargo-make][1] INFO - Execute Command: "cargo" "lipo"
[INFO cargo_lipo::meta] Will build universal library for ["adder-ffi", "scrap-ffi"]
[INFO cargo_lipo::lipo] Building "adder-ffi" for "aarch64-apple-ios"
Compiling adder-ffi v0.1.0 (/Users/ischuetz/dev/flutterust/native/adder-ffi)
warning: dropping unsupported crate type `cdylib` for target `aarch64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.45s
[INFO cargo_lipo::lipo] Building "adder-ffi" for "x86_64-apple-ios"
Compiling adder-ffi v0.1.0 (/Users/ischuetz/dev/flutterust/native/adder-ffi)
warning: dropping unsupported crate type `cdylib` for target `x86_64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.33s
[INFO cargo_lipo::lipo] Creating universal library for adder-ffi
[INFO cargo_lipo::lipo] Building "scrap-ffi" for "aarch64-apple-ios"
warning: dropping unsupported crate type `cdylib` for target `aarch64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
[INFO cargo_lipo::lipo] Building "scrap-ffi" for "x86_64-apple-ios"
warning: dropping unsupported crate type `cdylib` for target `x86_64-apple-ios`
warning: 1 warning emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
[INFO cargo_lipo::lipo] Creating universal library for scrap-ffi
[cargo-make][1] INFO - Build Done in 1 seconds.
/Users/ischuetz/dev/flutterust
[cargo-make] INFO - Build Done in 8 seconds.
flutterust $ cargo make post-ios
[cargo-make] INFO - cargo make 0.31.1
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: post-ios
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: workspace
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: adder-ffi
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: post-ios
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: post-ios
[cargo-make][1] ERROR - Error while running duckscript: Source: Unknown Line: 4 - No such file or directory (os error 2)
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
The problematic line seems to be this one:
rm -f ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/packages/${CARGO_MAKE_CRATE_FS_NAME}/ios/Classes/binding.h
But I printed it with
echo ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/packages/${CARGO_MAKE_CRATE_FS_NAME}/ios/lib${CARGO_MAKE_CRATE_FS_NAME}.a
and the file does exist. Running rm -f
with the printed path also works.
Edit: I commented this line. Make runs fine now and the header is overwritten.
I guess the problem is that at first Compile there is no Header file in the ios/Classes
I guess removing the rm -f
line with a cp
command would work.
Could you make a PR please?
Do I've to install duckscript? It's not mentioned in the readme?