You are not logged in.
Hey,
I'm trying to adopt this AUR package: https://gitlab.com/cryptocam/cryptocam-companion-cli
I can simple build it by `git clone` + `cargo build --release`
But when I run it with `makepkg`, it failes. I also tried to reuse the excact environment variables:
PKGBUILD:
# Maintainer: kmille <aur@androidloves.me>
_pkgname=cryptocam-companion-cli
pkgname="$_pkgname-git"
pkgver=r21.3056023
pkgrel=1
arch=('x86_64')
pkgdesc="CLI tool and to decrypt Cryptocam videos and manage keys"
url="https://gitlab.com/cryptocam/cryptocam-companion-cli"
license=('GPL-3.0-or-later')
depends=('ffmpeg')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
#makedepends=('git' 'rust' 'cargo' 'gcc' 'ffmpeg')
makedepends=('git' 'cargo' 'gcc' 'ffmpeg')
source=("${pkgname}::git+${url}.git")
sha512sums=('SKIP')pkgver() {
cd ${pkgname}
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}#prepare() {
# cd "$srcdir/$pkgname"
# export RUSTUP_TOOLCHAIN=stable
# cargo fetch --locked --target host-tuple
#}build() {
cd "$srcdir/$pkgname"
env > env.source
pwd
cargo build --release
#export RUSTUP_TOOLCHAIN=stable
#export CARGO_TARGET_DIR=target
#cargo build --frozen --release --all-features
}check() {
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}package() {
_repodir=$srcdir/$pkgname
# _binsrc=$_repodir/target/release/cryptocam
# _bintarget=$pkgdir/usr/bin/$_pkgname
# install -Dm755 $_binsrc $_bintarget}
build output
kmille@spring:~/projects/arch-packages/cryptocam-companion-cli-git# makepkg
==> Making package: cryptocam-companion-cli-git r21.3056023-1 (Sat Jan 24 10:41:12 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Cloning cryptocam-companion-cli-git git repo...
Cloning into bare repository '/home/kmille/projects/arch-packages/cryptocam-companion-cli-git/cryptocam-companion-cli-git'...
remote: Enumerating objects: 98, done.
remote: Counting objects: 100% (83/83), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 98 (delta 47), reused 58 (delta 31), pack-reused 15 (from 1)
Receiving objects: 100% (98/98), 65.88 KiB | 10.98 MiB/s, done.
Resolving deltas: 100% (49/49), done.
==> Validating source files with sha512sums...
cryptocam-companion-cli-git ... Skipped
==> Extracting sources...
-> Creating working copy of cryptocam-companion-cli-git git repo...
Cloning into 'cryptocam-companion-cli-git'...
done.
==> Starting pkgver()...
==> Starting build()...
/home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git
Compiling proc-macro2 v1.0.105
Compiling quote v1.0.43
Compiling unicode-ident v1.0.22
Compiling version_check v0.9.5
...
Compiling hex v0.3.2
Compiling cryptocam v0.1.3 (/home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git)
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustc4ZZ15Q/symbols.o" "<17 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git/target/release/deps/{libthrea
dpool-22afda2832ee3196,libnum_cpus-0721da61d1fd0e70,libsimple_logger-55905b778e339e7d,liblibcryptocam-7c259ec7b085d7cd,libserde_json-5aa744b5a134e502,libitoa-143b358673d42882,libzmij-e4c1ee0dab6a9b53,libini-54e6ba8451a6fa41,libbase64-28c86
1dea49e0cc6,libage-ed44847530141341,libi18n_embed-fdf0e1ca9e57de2e,libwalkdir-baa315a55de53ca9,libsame_file-4eac95243158c8d7,librust_embed-a481d619bc40bb0d,libthiserror-68bd466fa99e914f,libparking_lot-888bfb319a1f7712,libparking_lot_core-5
4300b14673f7375,liblock_api-81ac37ffb27917aa,libscopeguard-70fde56eb5f3e802,libinstant-5c9f736f96439635,libfluent-1e933e023cb02cf9,libfluent_bundle-01012b2cf561af72,libsmallvec-bb2fec99e5e3cac0,libfluent_langneg-d3f5e2fab0aac63e,libintl_pl
uralrules-b8ebbd51a1527777,libouroboros-2d6612345a4653aa,libstable_deref_trait-766022dddd091dec,libfluent_syntax-d9b570bdc15f9555,librustc_hash-14a77a2f36d2e03f,libintl_memoizer-f43ae3f640f2571e,libtype_map-e4c5046ded13d7a8,librustc_hash-d
d6c43ca1f78d8e4,libunic_langid-4e9081d56cf222ca,libunic_langid_impl-892298ab0c09e500,libtinystr-8ce89e2ecdc61fe3,libx25519_dalek-ac0d59e3335703d2,libcurve25519_dalek-43b748b7c75309bd,libbech32-0241c064aaa0521a,libpin_project-2753e8d618a8b8
54,libscrypt-b14effb492f0c96a,libsalsa20-e97499be04534a49,libpbkdf2-1b6276eb037b2bd3,libage_core-b47c4a4b47ee67d7,libc2_chacha-71618e2b65938b19,libbase64-b70b0bd2adfdd257,libsha2-f10700d9e4456bab,libcpufeatures-63797071d3ac5856,libopaque_d
ebug-df0cf27fc39411af,libblock_buffer-5ac14a8fd2c97639,libhkdf-7b5961e2c0811d96,libhmac-2139630af9a1b164,libcrypto_mac-0a86c0b5223960a3,libdigest-b5f9e2f9989a71ab,libchacha20poly1305-555646893d1c4bcd,libpoly1305-88fa84fe71111246,libcpuid_b
ool-702a6b3405940824,libuniversal_hash-efdf73bb022f3f31,libsubtle-b5c21e33a5191cdf,libaead-adda4b47b22d575c,libcipher-673f326253c13580,libgeneric_array-dd3b4ca39fc75693,libtypenum-9c2a6714e09bc868,libcookie_factory-61ea4b1c1cdb5009,libfutu
res-7f9e0f6fae6a927f,libfutures_executor-9b0646d6381eda61,libfutures_util-3ab6a90b10df5cdd,libfutures_io-8cd6083d36d27a7c,libslab-5c991b14a9c7c840,libfutures_channel-2dc1c6631b025224,libpin_project_lite-32b084c9edde2497,libfutures_sink-1e6
1396793b45d42,libfutures_task-17500b84ecbc1a35,libpin_utils-a440e4ab7655e995,libfutures_core-b0fd97820fb6778b,libnom-e9404340b2c5d242,liblexical_core-491b37b9179661bc,libbitflags-81f353d9b4b85e35,libryu-2372ccc0d9a710da,libstatic_assertion
s-8dfa68419ec76886,libarrayvec-df1b4aed77752aa6,librand-4c89743defe572b4,librand_chacha-398c979387908fb0,librand_core-3eba9bac1a59827b,libgetrandom-62180735a97990d0,liburlencoding-4be6e8f7f95afe7f,libqrcode-27525f48ee6e07bc,libchecked_int_
cast-4a59b1e1c0e7221a,libimage-48357eda0d01eedc,libcolor_quant-712aaff760cec51a,libnum_iter-3cb8985c8ee1a7d9,libbytemuck-e7d459329fe147bf,libnum_rational-82673fb40a041378,libnum_integer-90faad0107bbeddc,libnum_traits-e256f4cbfd7aeea6,libac
_ffmpeg-9a0c3e85762910ec,libserde-b9a81ac8bbf1a50e,libserde_core-7ff42369dc9e5e43,libbytes-34e5f80d3c87eb7d,libiovec-0be3aa359ac4c9f9,libbyteorder-4fceb601fe6625c4,libindicatif-a568671bd73bde85,libconsole-5768dd2b482c052e,libunicode_width-
d23143305d9ae6d1,libnumber_prefix-091c6c945bff4300,libhex-44fae9be4226edcf,libclap-561b1ae2191932d1,libclap_builder-2a79b92b712ae08e,libstrsim-106b6fce0fb6792a,libanstream-f0055c0f8cca028c,libanstyle_query-74bc73bda01390bb,libis_terminal_p
olyfill-c10614172ce70952,libcolorchoice-0286c30d16f376d1,libanstyle_parse-93f7b17238ba3e91,libutf8parse-45c75813cfc013cf,libclap_lex-e7fd3a418ad1cf2e,libanstyle-15267548612961b9,libpinentry-508d2aee993eb80b,libwhich-cf04366438e8ea09,libhome-39f7600676670390,libeither-9f0e986c63afed14,librustix-a274fbd36475129d,liblinux_raw_sys-f0f89a73ad21ac50,libnom-3fc3a60e37ff565c,libpercent_encoding-6a3a45d199fc78ad,libsecrecy-1b5b402a8250e9d3,libdialoguer-db31be620ac909dd,libtempfile-f
582ac19ddbe7725,libgetrandom-fb69b683bd0ccacc,libfastrand-09958f43b50b5fb7,libonce_cell-e65daf38013c10ac,librustix-fba6268485075573,libbitflags-af16169dd0f38ec5,liblinux_raw_sys-567904b9f437d306,libzeroize-a4922419499a8ff3,libconsole-14a3d
040af30caf1,libterminal_size-581c49d132cbed05,libregex-5cabcaa88106c5e4,libregex_syntax-1722866c9c0204ff,libaho_corasick-c152fd21f635ef9b,libmemchr-ce9495af0ac86525,libunicode_width-66beb061126b05ee,liblazy_static-016836ad295443c1,liblog-d
5bd886f80cb844c,libini-1e10e5632c9538cf,libordered_multimap-10149a24f9a320b3,libhashbrown-9dcab66c1fbce62b,libahash-98a273a13411eec4,libdlv_list-8df3ed075bd53d95,librand-bb051374bdbe534a,librand_chacha-3d3cc48f984667d7,libppv_lite86-48228c
2cb5ef8734,libzerocopy-4daad5be6414592e,librand_core-2e3d5739f4aba26c,libgetrandom-d1aad1140a173701,libcfg_if-6cfadabe1be8b965,libdirs_next-a85daf1202a19aaf,libdirs_sys_next-f88b1ed15be2ed23,liblibc-374b0b2d610284e5,libcfg_if-0db540e77fce0c7f,libanyhow-fe6facbc1500e437}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc
_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lavcodec" "-lavformat" "-lavutil" "-lswresample" "-lswscale" "-lgc
c_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/tmp/rustc4ZZ15Q/raw-dylibs" "-fuse-ld=lld" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-c
li-git/target/release/build/ac-ffmpeg-c3f19854b2cd4489/out" "-L" "<sysroot>/lib" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-gi
t/target/release/deps/cryptocam-741f4755de4238ec" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" = note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: ld.lld: error: undefined symbol: ffw_codec_parameters_free
>>> referenced by ac_ffmpeg.205885c00230e615-cgu.3
>>> ac_ffmpeg-9a0c3e85762910ec.ac_ffmpeg.205885c00230e615-cgu.3.rcgu.o:(_$LT$ac_ffmpeg..codec..InnerCodecParameters$u20$as$u20$core..ops..drop..Drop$GT$::drop::h98c9bd8502f2b54f) in archive /home/kmille/projects/arc
h-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlib >>> referenced by ac_ffmpeg.205885c00230e615-cgu.3
>>> ac_ffmpeg-9a0c3e85762910ec.ac_ffmpeg.205885c00230e615-cgu.3.rcgu.o:(ac_ffmpeg::codec::AudioCodecParametersBuilder::sample_rate::h80f876c956ce34d6) in archive /home/kmille/projects/arch-packages/cryptocam-compani
on-cli-git/src/cryptocam-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlib
>>> referenced by ac_ffmpeg.205885c00230e615-cgu.3
>>> ac_ffmpeg-9a0c3e85762910ec.ac_ffmpeg.205885c00230e615-cgu.3.rcgu.o:(ac_ffmpeg::codec::AudioCodecParametersBuilder::channel_layout::h358dec2aa3da0e09) in archive /home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlibld.lld: error: undefined symbol: ffw_audio_codec_parameters_new
>>> referenced by ac_ffmpeg.205885c00230e615-cgu.3
>>> ac_ffmpeg-9a0c3e85762910ec.ac_ffmpeg.205885c00230e615-cgu.3.rcgu.o:(ac_ffmpeg::codec::AudioCodecParameters::builder::h2ef5d64e092a15fb) in archive /home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlibld.lld: error: undefined symbol: ffw_packet_free
>>> referenced by ac_ffmpeg.205885c00230e615-cgu.2
>>> ac_ffmpeg-9a0c3e85762910ec.ac_ffmpeg.205885c00230e615-cgu.2.rcgu.o:(_$LT$ac_ffmpeg..packet..Packet$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0f986b1908310f58) in archive /home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptocam-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlib
>>> referenced by ac_ffmpeg.205885c00230e615-cgu.2
>>> ac_ffmpeg-9a0c3e85762910ec.ac_ffmpeg.205885c00230e615-cgu.2.rcgu.o:(ac_ffmpeg::packet::PacketMut::freeze::hec01a45e53a212f2) in archive /home/kmille/projects/arch-packages/cryptocam-companion-cli-git/src/cryptoc
am-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlib
...
/cryptocam-companion-cli-git/target/release/deps/libac_ffmpeg-9a0c3e85762910ec.rlibld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
collect2: error: ld returned 1 exit statuserror: could not compile `cryptocam` (bin "cryptocam") due to 1 previous error
==> ERROR: A failure occurred in build().
Aborting...
Any help would be appreciated ![]()
Last edited by kmille (2026-01-24 09:44:57)
Offline
That PKGBUILD gives the impression you looked at https://wiki.archlinux.org/title/Rust_p … guidelines but didn't implement it.
Arch package guidelines are our equivalent of "best practices" for creating packages / writing PKGBUILDs .
Please adjust your PKGBUILD to comply with that page, then try again.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Please use code tags not quote tags for commands and their outputs. You need to either disable LTO for the PKGBUILD or add `CFLAGS+=' -ffat-lto-objects'` for the static library the package is building.
Last edited by loqs (2026-01-25 00:06:30)
Offline
Thank you! Fixed it by adding `CFLAGS+=' -ffat-lto-objects'`.
But tbh: I still don't know why this happened and how reading the wiki package could have helped me solving this.
Offline
how reading the wiki package could have helped me solving this.
The package guidelines on the wiki describe best practices developed by arch users. They help a lot to avoid common pitfalls and following them usually improves the quality of a package substantially.
I wasn't willing to look at the error/test build the package until the PKGBUILD was improved, maybe I should have stated that.
P.S.
I just noticed you uploaded a new version to aur. It looks good to me.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
makedepends=('git' 'cargo' 'gcc' 'ffmpeg')gcc is covered by base-devel and ffmpeg is in depends.
Offline
the provides/conflicts should be the non git version only
Offline