ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[Build Error] Error while building with "yarn build", cargo error

Open baillow opened this issue 2 years ago • 9 comments

Error message

(Compiling with "yarn build") ...
Compiling soup2-sys v0.2.0 Compiling glib-sys v0.15.10 Compiling gobject-sys v0.15.10 Compiling gdk-sys v0.15.1 Compiling gio-sys v0.15.10 Compiling atk-sys v0.15.1 Compiling gdk-pixbuf-sys v0.15.10 Compiling gtk-sys v0.15.3 Compiling cairo-sys-rs v0.15.1 Compiling pango-sys v0.15.10 The following warnings were emitted during compilation:

warning: "pkg-config" "--libs" "--cflags" "libsoup-2.4" "libsoup-2.4 >= 2.62" did not exit successfully: exit status: 1

error: failed to run custom build command for soup2-sys v0.2.0

Caused by: process didn't exit successfully: <home folder>/ChatGPT/target/release/build/soup2-sys-a1eedea6792f3e76/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=LIBSOUP_2.4_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu 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-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:warning="pkg-config" "--libs" "--cflags" "libsoup-2.4" "libsoup-2.4 >= 2.62" did not exit successfully: exit status: 1 error: could not find system library 'libsoup-2.4' required by the 'soup2-sys' crate

--- stderr Package libsoup-2.4 was not found in the pkg-config search path. Perhaps you should add the directory containing libsoup-2.4.pc' to the PKG_CONFIG_PATH environment variable No package 'libsoup-2.4' found Package libsoup-2.4 was not found in the pkg-config search path. Perhaps you should add the directory containing libsoup-2.4.pc' to the PKG_CONFIG_PATH environment variable No package 'libsoup-2.4' found

warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

OS

Ubuntu 22.04

Environment

cargo 1.67.0 (8ecd4f20a 2023-01-10) rustc 1.67.0 (fc594f156 2023-01-24)

baillow avatar Jan 29 '23 13:01 baillow

https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux

lencx avatar Jan 29 '23 13:01 lencx

@lencx I have the same issue in aws ec2, libsoup2 is v2.56

0x32Studio avatar Jan 30 '23 07:01 0x32Studio

@baillow

sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-2.62.2-2.el7.x86_64.rpm sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-devel-2.62.2-2.el7.x86_64.rpm

0x32Studio avatar Jan 30 '23 07:01 0x32Studio

@lencx I have the same issue in aws ec2, libsoup2 is v2.56

Did you solve the problem afterwards?

lencx avatar Jan 30 '23 10:01 lencx

Yes, I use Ubuntu 22.04 and I installed the libsoup2.4-dev package:

sudo apt install libsoup2.4-dev

I did not know that this dependency was not downloaded from Rust.

baillow avatar Jan 31 '23 22:01 baillow

yes, solve with bellow sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-2.62.2-2.el7.x86_64.rpm sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-devel-2.62.2-2.el7.x86_64.rpm

0x32Studio avatar Feb 01 '23 10:02 0x32Studio

Fixed

Just install webkit2gtk

In arch linux, i have done

sudo pacman -S webkit2gtk

KunalSin9h avatar Jul 18 '23 16:07 KunalSin9h

Fixed

Just install webkit2gtk

In arch linux, i have done

sudo pacman -S webkit2gtk

Thank you so much :)

zerodev-exe avatar Nov 30 '23 16:11 zerodev-exe

Fixed

Just install webkit2gtk

In arch linux, i have done

sudo pacman -S webkit2gtk

thanks brother

KekmaTime avatar Dec 08 '23 17:12 KekmaTime