question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimal example fails to build - archiver error

See original GitHub issue

I’m unable to build even the simplest project with web-view, as the build script from webview-sys crashes with an error I couldn’t find anywhere on the issue tracker - ar can’t find libwebview.a.
My main.rs is just the minimal wikipedia example, and my Cargo.toml only has web-view as a dependency.
I’m on Arch Linux, webkit2gtk is installed and pkg-config can find it:

$ pkg-config --cflags --libs webkit2gtk-4.0
-I/usr/include/webkitgtk-4.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/libsoup-2.4 -pthread -I/usr/include/libxml2 -lwebkit2gtk-4.0 -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lsoup-2.4 -lgio-2.0 -ljavascriptcoregtk-4.0 -lgobject-2.0 -lglib-2.0 

Here’s the error I’m getting:

$ cargo build
   Compiling proc-macro2 v1.0.24
   # ...
   Compiling soup-sys v0.10.0
The following warnings were emitted during compilation:

warning: ar: '/path/to/my/project/target/debug/build/webview-sys-d9d52115717c508a/out/libwebview.a': No such file

error: failed to run custom build command for `webview-sys v0.6.0`

Caused by:
  process didn't exit successfully: `/path/to/my/project/target/debug/build/webview-sys-5be1725bb6ce4ad6/build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.0_STATIC
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.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-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:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=SYSROOT
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.0_STATIC
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.0_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rustc-link-search=native=/usr/lib
  cargo:rustc-link-lib=webkit2gtk-4.0
  cargo:rustc-link-lib=gtk-3
  cargo:rustc-link-lib=gdk-3
  cargo:rustc-link-lib=z
  cargo:rustc-link-lib=pangocairo-1.0
  cargo:rustc-link-lib=pango-1.0
  cargo:rustc-link-lib=harfbuzz
  cargo:rustc-link-lib=atk-1.0
  cargo:rustc-link-lib=cairo-gobject
  cargo:rustc-link-lib=cairo
  cargo:rustc-link-lib=gdk_pixbuf-2.0
  cargo:rustc-link-lib=soup-2.4
  cargo:rustc-link-lib=gio-2.0
  cargo:rustc-link-lib=javascriptcoregtk-4.0
  cargo:rustc-link-lib=gobject-2.0
  cargo:rustc-link-lib=glib-2.0
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.0_STATIC
  cargo:rerun-if-env-changed=WEBKIT2GTK_4.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-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
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  AR_x86_64-unknown-linux-gnu = None
  AR_x86_64_unknown_linux_gnu = None
  HOST_AR = None
  AR = None
  running: "ar" "s" "/path/to/my/project/target/debug/build/webview-sys-d9d52115717c508a/out/libwebview.a"
  cargo:warning=ar: '/path/to/my/project/target/debug/build/webview-sys-d9d52115717c508a/out/libwebview.a': No such file
  exit code: 1

  --- stderr


  error occurred: Command "ar" "s" "/path/to/my/project/target/debug/build/webview-sys-d9d52115717c508a/out/libwebview.a" with args "ar" did not execute successfully (status code exit code: 1).


warning: build failed, waiting for other jobs to finish...
error: build failed

It looks to me like a bug but I’m not 100% sure. Either way I’d love to get some help so I can use this library, it’s perfect for my use case.

Thanks in advance for any help!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
zxeycommented, Dec 9, 2020

Published new patch version 0.7.2 with this fix.

0reactions
pps5commented, Dec 3, 2020

@helgoboss yes, it won’t compile and I think what @gBopHuk said is correct. GTK APIs should be provided by gtk module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FirebaseAnalyticsSwift-Beta: Failure to Build/Archive with Xcode
Describe the problem​​ Xcode Archive fails when using the FirebaseAnalyticsSwift-Beta component. Building and installing the app with the ...
Read more >
How to Fix ORA-00257: archiver error. Connect internal only ...
The first step to fixing this issue would be to log into your server and see if you have run out of physical...
Read more >
Compiler error "archive for required library could not be read"
In my case I had accidentally manually added a Java class to the build path while poking around Eclipse. ... My project was...
Read more >
Xcodebuild Archive fails to errSec… | Apple Developer Forums
Hi! I have an issue to build Archive when using xcodebuild in GitHub Action workflow. The project s quite basic iOS project. Archiving...
Read more >
ORA-00257: archiver error tips - Burleson Consulting
First, make sure your automatic archiving is enabled. To check the archive lo made, try: SQL> archive log list;. Now, note thatyou can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found