zaddach / clamav-sys Goto Github PK
View Code? Open in Web Editor NEWFFI bindings for libclamav
License: GNU General Public License v2.0
FFI bindings for libclamav
License: GNU General Public License v2.0
The README file says to install the clamav-dev
package, there seems to be no such package in the Ubuntu repository, but I found a libclamav-dev
package which I installed.
$ dpkg -l libclamav-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=====================-============-=========================>
ii libclamav-dev 0.103.6+dfsg-1ubuntu1 amd64 anti-virus utility for Un>
But it seems it cannot be found.
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: `"pkg-config" "--libs" "--cflags" "libclamav" "libclamav >= 0.103"` did not exit successfully: exit status: 1
error: could not find system library 'libclamav' required by the 'clamav-sys' crate
--- stderr
Package libclamav was not found in the pkg-config search path.
Perhaps you should add the directory containing `libclamav.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libclamav', required by 'virtual:world', not found
$ ls /usr/lib/x86_64-linux-gnu/pkgconfig/ | grep clam
libclamav.pc
This is on Ubuntu 22.10.
I have includes in
name -a
FreeBSD hades 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64
/usr/local/etc/clamav-milter.conf
/usr/local/bin/clamav-config
/usr/local/include/clamav-version.h
/usr/local/include/clamav-config.h
/usr/local/include/clamav.h
/usr/local/include/clamav-types.h
[clamav-sys 0.0.3] cargo:rustc-link-search=native=/usr/local/lib
[clamav-sys 0.0.3] cargo:rustc-link-lib=clamav
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=LIBCLAMAV_STATIC
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=LIBCLAMAV_DYNAMIC
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_freebsd
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[clamav-sys 0.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[clamav-sys 0.0.3] cargo:rustc-link-lib=dylib=clamav
[clamav-sys 0.0.3] cargo:rerun-if-changed=wrapper.h
[clamav-sys 0.0.3] wrapper.h:1:10: fatal error: 'clamav.h' file not found
[clamav-sys 0.0.3] wrapper.h:1:10: fatal error: 'clamav.h' file not found, err: true
[clamav-sys 0.0.3] thread 'main' panicked at 'Unable to generate bindings: ()', /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/FreeBSD-Ports/libredefender/work/libredefender-e9fac36c9d5b45de021f4b22c6d71c604bc44ae8/cargo-crates/clamav-sys-0.0.3/build.rs:66:10
[clamav-sys 0.0.3] stack backtrace:
[clamav-sys 0.0.3] 0: rust_begin_unwind
[clamav-sys 0.0.3] 1: core::panicking::panic_fmt
[clamav-sys 0.0.3] 2: core::result::unwrap_failed
[clamav-sys 0.0.3] 3: core::result::Result<T,E>::expect
[clamav-sys 0.0.3] at /usr/ports/lang/rust/work/rustc-1.65.0-src/library/core/src/result.rs:1064:23
[clamav-sys 0.0.3] 4: build_script_build::generate_bindings
[clamav-sys 0.0.3] at ./build.rs:62:5
[clamav-sys 0.0.3] 5: build_script_build::main
[clamav-sys 0.0.3] at ./build.rs:115:5
[clamav-sys 0.0.3] 6: core::ops::function::FnOnce::call_once
[clamav-sys 0.0.3] at /usr/ports/lang/rust/work/rustc-1.65.0-src/library/core/src/ops/function.rs:248:5
[clamav-sys 0.0.3] note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: failed to run custom build command for `clamav-sys v0.0.3`[clamav-sys 0.0.3] cargo:rustc-link-search=native=/usr/local/lib
My exact logs:
Compiling clamav-sys v0.0.5
error: failed to run custom build command for `clamav-sys v0.0.5`
Caused by:
process didn't exit successfully: `/home/nicholas/IdeaProjects/testing/target/release/build/clamav-sys-d677088954fa5e9e/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
--- stdout
cargo:rerun-if-env-changed=LIBCLAMAV_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=LIBCLAMAV_STATIC
cargo:rerun-if-env-changed=LIBCLAMAV_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=LIBCLAMAV_STATIC
cargo:rerun-if-env-changed=LIBCLAMAV_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/x86_64-linux-gnu
cargo:rustc-link-lib=clamav
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=LIBCLAMAV_STATIC
cargo:rerun-if-env-changed=LIBCLAMAV_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:rustc-link-lib=dylib=clamav
cargo:rerun-if-changed=wrapper.h
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.