Error while building function with KNative - rust

I was trying to build a Serverless application with Knative while using Rust. The program run well locally after calling cargo build. However before deploying the project, I keep ending with the error below.
Installing function v0.1.0 (/workspace)
error: failed to get `actix-http` as a dependency of package `function v0.1.0 (/workspace)`
Caused by:
failed to load source for dependency `actix-http`
Caused by:
Unable to update registry `crates-io`
Caused by:
usage of sparse registries requires `-Z sparse-registry`
unable to invoke layer creator
unable to contribute application layer
unable to install single
unable to build
exit status 101
ERROR: failed to build: exit status 1
Error: failed to build the function: executing lifecycle: failed with status code: 51
Error: exit status 1
I've been looking for solutions to solve this without any luck. Can someone help me figure out how to resolve this issue?

Related

Failed to run custom build command for `librocksdb-sys

Does anybody know what should I install to fulfill librocksdb-sys dependency? I was trying to solve it with apt install clang but does not solve the issue. My best guess is that it is some error connected with linking and/or versioning.
Appreciate any hints.
error: failed to run custom build command for librocksdb-sys v0.8.0+7.4.4
Caused by: process didn't exit successfully:
/home/tomek/ssd/workspaces/substrate/target/release/build/librocksdb-sys-dcab8f317e6498cb/build-script-build
(exit status: 101) --- stderr thread 'main' panicked at
'"enum_(unnamed_at_rocksdb/include/rocksdb/c_h_981_1)" is not a valid
Ident',
/home/tomek/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.46/src/fallback.rs:756:9
note: run with RUST_BACKTRACE=1 environment variable to display a
backtrace warning: build failed, waiting for other jobs to finish...
The error occurs on Debian.

Cargo error: unable to get packages from source

error: failed to download `adler v1.0.2`
Caused by:
unable to get packages from source
Caused by:
failed to parse manifest at `/home/actionanand/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/Cargo.toml`
Caused by:
could not parse input as TOML
Caused by:
unexpected character found: `\u{0}` at line 1 column 1
Rust .toml file was full of red line when we add new dependency
This is caused by the crash of internal package (say cargo)
we can solve this by following the steps
Please clear the cargo registry
rm -rf /home/username/.cargo/registry/
And follow the proceedure shown after this, if you use old version
For the reference, I've given the proceedure also below:
If you are trying to migrate from the previous edition (2018), the
process requires following these steps:
1. Start with `edition = "2018"` in `Cargo.toml`
2. Run `cargo fix --edition`
3. Modify `Cargo.toml` to set `edition = "2021"`
4. Run `cargo build` or `cargo test` to verify the fixes worked
More details may be found at
https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html
You may need to to add --allow-no-vcs sometimes (it'll be prompted by the terminal) as below
cargo fix --edition --allow-no-vcs

trying to use the gstreamer-player rust crate, I get this pkg-config error

This is the full log
error: failed to run custom build command for `glib-sys v0.10.1`
Caused by:
process didn't exit successfully: `C:\Users\Wu\Documents\RustProjects\mechanical\target\debug\build\glib-sys-b6b5049ea9ffd484\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=GLIB_2.0_STATIC
cargo:rerun-if-env-changed=GLIB_2.0_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
Failed to run `"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.42"`: The system cannot find the file specified. (os error 2)
warning: build failed, waiting for other jobs to finish...
error: build failed
I have this error when I try to build my project (it's empty but it's using the gstreamer-player crate
I was told to install pkg-config (I'm on windows) so I used MSYS2 to install it with pacman -S mingw-w64-x86_64-pkg-config
The error persisted so I added the environment variable PKG_CONFIG_PATH = H:\MSYS2\usr\lib\pkgconfig, and I added H:\MSYS2\usr\lib\pkgconfig to the path variable
The error still persists, anyone has any idea of what I could do or what am I doing wrong? Any help appreciated

Error Installing MPI for Rust: failed to run custom build command

Please assist, i am trying to install MPI for Rust and i am getting the follwing error :
error: failed to run custom build command for `mpi-sys v0.2.0 (https://github.com/rsmpi/rsmpi#055d5036)`
Caused by:
process didn't exit successfully..
added the [dependency] as follows: mpi = { git = "https://github.com/rsmpi/rsmpi" } .I tried following the documentation in github adding the [dependency] as follows : mpi = "0.5" but I received the following error :
error: failed to run custom build command for `libffi-sys v0.6.3`
Caused by:
process didn't exit successfully:

Yocto error: Building libreoffice package fails in do_package task

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.

Resources