I was following the tutorial of Phillip Opperman (https://os.phil-opp.com/) and I was in the chapter- building the kernel(https://os.phil-opp.com/minimal-rust-kernel/#building-our-kernel) and I keep getting the same error. It seems system-related but I don't know.
C:\Users\radri\%radri%\projects\jcomp>cargo build --target jcomp.json
Compiling core v0.0.0 (C:\Users\radri\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core)
Compiling rustc-std-workspace-core v1.99.0 (C:\Users\radri\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\rustc-std-workspace-core)
Compiling compiler_builtins v0.1.71
error: failed to build archive: no such file or directory
error: could not compile `rustc-std-workspace-core` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `core` due to previous error
error: could not compile `compiler_builtins` due to previous error
Created a directory without the '%' as apparently Rust "doesn't like" such directory names. Thanks #SvenMarnach
Related
I tried to build an anchor project
anchor init AnchorProject
cd AnchorProject
anchor build
Then This error appears!
admin#Desktop MINGW64 /d/folder_1/MY_Project/AnchorProject (main)
$ anchor build
Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf
cargo-build-bpf child:
C:\Users\admin\.local\share\solana\install\active_release\bin\cargo-build-sbf.exe --arch bpf
[2022-09-23T17:22:59.130309300Z ERROR cargo_build_sbf] Failed to obtain package metadata:
`cargo metadata` exited with an error: error: failed to load manifest for workspace member
`\\?\D:\folder_1\MY_Project\AnchorProject\programs\*`
Caused by:
failed to read `\\?\D:\folder_1\MY_Project\AnchorProject\programs\*\Cargo.toml`
Caused by:
The filename, directory name, or volume label syntax is incorrect. (os error 123)
and I don't understand what the question mark(?) in the above message mean!
note
I have solved the problem of metadata but when I return to build the project there is another message
$anchor build
error: no such subcommand: build-bpf
Did you mean build-sbf?
also when I tried to write cargo-build-bfs there is another message appears
$cargo-build-bfs
info: uninstalling toolchain 'sbf'
info: toolchain 'sbf' uninstalled
Compiling getrandom v0.1.16
Compiling memchr v2.5.0
Compiling bv v0.11.1
Compiling quote v1.0.21
Compiling rustversion v1.0.9
Compiling blake3 v1.3.1
error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
--> src\lib.rs:267:9
|
267 | / compile_error!("\
268 | | target is not supported, for more information see: \
269 | | https://docs.rs/getrandom/#unsupported-targets\
270 | | ");
| |__________^
error[E0433]: failed to resolve: use of undeclared crate or module `imp`
--> src\lib.rs:291:5
|
291 | imp::getrandom_inner(dest)
| ^^^ use of undeclared crate or module `imp`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
```
Solana programs can not include rand as it would result in nondeterministic outcomes. Programs can not do I/O (files, screens, urls, websites, rand, etc., etc.)
See Rust program build restrictions:
Today when I run cargo build with my project in Fedora 32, shows compile error like this:
Compiling devise v0.3.1
thread 'rustc' panicked at 'assertion failed: sentinel == STR_SENTINEL', /rustc/0b42deaccc2cbe17a68067aa5fdb76104369e1fd/compiler/rustc_serialize/src/opaque.rs:669:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.59.0-nightly (0b42deacc 2021-12-09) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
Compiling async-stream v0.3.2
error: could not compile `time`
warning: build failed, waiting for other jobs to finish...
error: build failed
my cargo version is:
[dolphin#MiWiFi-R4CM-srv]~/Documents/GitHub/rust_wheel% cargo version
cargo 1.58.0-nightly (40dc28175 2021-12-06)
anybody facing the same problem? any fix suggestion? I searching from Google seem no one facing this same issue.
Looks like this internal compiler error is tracked by this issue:
Try cleaning your build artifacts: cargo clean, in most cases the crash should go away after a rebuild.
should be fixed with nightly 2021-12-11
I'm trying to cargo install a project with many dependencies. One of the later dependencies fails to build due to some system configuration issue:
cargo install diesel_cli
... many dependencies here...
Compiling diesel_cli v1.4.1
error: linking with `cc` failed: exit code: 1
|
= note: ...large output removed...
= note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Once I think I've solved the system configuration issue, I need to re-run cargo install, wait a while for the first set of dependencies to build, then see if I get past the failure.
How can I avoid rebuilding all of those dependencies?
The error message contains the directory containing the failed build artifacts:
error: failed to compile `diesel_cli v1.4.1`, intermediate artifacts can be found at `/var/folders/_b/d4_bd15x7s5g99cjvyhpw26w0000gp/T/cargo-installDQOdPD`
You can pass that directory via the --target-dir option (or setting the CARGO_TARGET_DIR environment variable) to use it again, avoiding rebuilding the dependencies:
cargo install diesel_cli --target-dir=/var/folders/_b/d4_bd15x7s5g99cjvyhpw26w0000gp/T/cargo-installDQOdPD
OS:
Manjaro Linux 4.19.28-1-MANJARO
I have some problem about ld in UnrealBuildTool. and I'm everything new about all Unreal Stuff.
A week ago, I was found some Unreal-based Opensource project. released binary version is working perfectly. But it cannot build on my PC. I think It was gcc linker cannot find assimp library.
So I setup environment variable 'LIBRARY_PATH' and 'LD_LIBRARY_PATH' However, UnrealBuildTool seems not using my local machine's ld linker.
Anyone have idea for this?
Log
[440/442] Compile BuildSettings.cpp
[441/442] Compile pugixml.cpp
[442/442] Link (lld) CarlaEditor
/home/suho/Repository/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v12_clang-6.0.1-centos7/x86_64-unknown-linux-gnu/bin/ld.lld: error: unable to find library -lassimp
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: UBT ERROR: Failed to produce item: /home/suho/Workspace/carla-map-editor/Unreal/CarlaEditor/Binaries/Linux/CarlaEditor
(see /home/suho/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-CarlaEditor-Linux-Development.txt for full exception trace)
Total build time: 646.23 seconds (Local executor: 0.00 seconds)
Took 646.750887s to run mono, ExitCode=5
ERROR: UnrealBuildTool failed. See log for more details. (/home/suho/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-CarlaEditor-Linux-Development.txt)
(see /home/suho/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
AutomationTool exiting with ExitCode=5 (5)
RunUAT ERROR: AutomationTool was unable to run successfully.
make: *** [Util/BuildTools/Linux.mk:13: package] Error 5
full of log are here: https://pastebin.com/HmLphXTe
I would like to integrate libreoffice on my tx6s-8035 KARO Board using yocto. I use Ka-ro NXP/Freescale Yocto Project Community BSP recipe layers for yocto distro krogoth. I add too the meta-office layer from open-embedded. I have been facing many issues about packages and libraries dependency to build the libreoffice package. The do_compile task work well but the do_package task fails with the following error:
ERROR: libreoffice-5.0.6.3-r0 do_package: QA Issue: File
'/usr/lib/libreoffice/share/extensions/mysql-connector-
ooo/libmysqlclient_r.so' from libreoffice was already stripped, this will
prevent future debugging! [already-stripped]
WARNING: libreoffice-5.0.6.3-r0 do_package: libreoffice language file
pattern not found: /usr/lib/libreoffice/share/template/%{1}
ERROR: libreoffice-5.0.6.3-r0 do_package: Fatal QA errors found, failing
task.
ERROR: libreoffice-5.0.6.3-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/sconte/fsl-community-
bsp/build_8135_cim/tmp/work/cortexa9hf-neon-poky-linux-
gnueabi/libreoffice/5.0.6.3-r0/temp/log.do_package.8211
ERROR: Task 11 (/home/sconte/fsl-community-bsp/sources/meta-office/recipes-
libreoffice/libreoffice/libreoffice.bb, do_package) failed with exit code
'1'
Here is the log.do_package file output: log.do_package
I view in this file that there is runstrip function which is executed on the same library it cound not find. What does runstrip means? How can i work around this issue?
You can add INSANE_SKIP_${PN}_append = "already-stripped" to libreoffice_%.bbappend recipe to fix this QA error. You can also send a patch upstream by following README.