Building with CARGO_TARGET_DIR doesn't work
Describe the bug
If CARGO_TARGET_DIR variable is defined, build process fails
Expected Behavior
The build process should work with the vairable defined.
Current Behavior
It fails with the following error:
Compiling coins-bip39 v0.7.0
error: failed to run custom build command for `acala-cli v2.24.0 (/home/juanito/repo/triton/Acala/node/cli)`
Caused by:
process didn't exit successfully: `/home/juanito/repo/triton/Acala/test/debug/build/acala-cli-3489a94c48bb58da/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-env=SUBSTRATE_CLI_COMMIT_HASH=89ef1e5b216
cargo:rustc-env=SUBSTRATE_CLI_IMPL_VERSION=2.24.0-89ef1e5b216
--- stderr
thread 'main' panicked at /home/juanito/repo/triton/Acala/orml/build-script-utils/src/license.rs:43:13:
The license in "../../test/debug/build/reed-solomon-novelpoly-c3e7686f9688934d/out/table_f2e16.rs" is either missing or it doesn't match the expected string!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:38: build-full] Error 101
Steps to Reproduce
- export CARGO_TARGET_DIR=something
- make init
- make build-full
Additional context
- Node version: 20.5.1
- OS: Pop 22.04
- Command line options:
- Relevant transaction hash:
- Relevant account address:
- Logs. Please format it as
code blocks
I tried the CARGO_TARGET_DIR and it worked for me.
The license in "../../test/debug/build/reed-solomon-novelpoly-c3e7686f9688934d/out/table_f2e16.rs" is either missing or it doesn't match the expected string!
we check the license in the source files. Not sure why it checks for files outside the project, I haven't reproduced it, but you can delete the check in the code
https://github.com/AcalaNetwork/Acala/blob/332b9c6a27ddfdb258af7d75d4fa7f54ed6bd7ce/node/cli/build.rs#L21-L33
I see. You should change the CARGO_TARGET_DIR=test to CARGO_TARGET_DIR=.test
This will avoid checking the license