dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
23.11k stars 382 forks source link

šŸ› delta fails to build with enabled `lto` #1651

Open Porkepix opened 7 months ago

Porkepix commented 7 months ago

I used to update git-delta to latest commit for quite some time, through ArchLinux's AUR, from https://aur.archlinux.org/packages/git-delta-git Recently, Arch changed building defaults to enable lto by default for everything.

It caused some of these packages to fail to build under lto option, and delta is one of them.

I didn't see any report of the failing build with lto so it felt like it's always worth a report, even if it's to explain that it's intended.

The build/link errors are the following ones:

[ā€¦]
   Compiling syntect v5.0.0
   Compiling git2 v0.17.2
   Compiling git-delta v0.16.5 (/home/clement/.cache/yay/git-delta-git/src/delta)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "cc" "-m64" "/tmp/rustckAXkMr/symbols.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.00.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.01.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.02.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.03.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.04.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.05.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.06.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.07.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.08.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.09.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.10.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.11.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.12.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.13.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.14.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.15.rcgu.o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.1pwm0cnj1ubtt639.rcgu.o" "-Wl,--as-needed" "-L" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps" "-L" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/build/onig_sys-9f4eaa7c8b8303ee/out" "-L" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/build/libgit2-sys-69c41211096908ce/out/build" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libctrlc-bbb6852a2a48df02.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libnix-2c603f546327d8b3.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libpalette-3fab71efec26a952.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libfast_srgb8-fa282ec935783f93.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libphf-c41b9af61c5b09f8.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libphf_shared-dc879fcfe3ce1d2d.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsiphasher-4aea6efb24f6a23a.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libapprox-f681af22ad0c7065.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbox_drawing-825d183d526b60d5.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libpathdiff-6332c249af60e8d2.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libchrono_humanize-1011312ae02d5270.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liburl-1a9de0f15b790a54.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libidna-c61073d16e0285b9.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libunicode_normalization-1a6f09432bfd9185.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libtinyvec-cf2359632ce71d41.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libtinyvec_macros-b6076bda174af30b.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libunicode_bidi-ba45a1a103d9b6ab.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libform_urlencoded-ca67f2d74be0f12e.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libpercent_encoding-46c771d8d0efc6bf.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblibgit2_sys-48f6f901be762756.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblibz_sys-b96f27272bce4eff.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libdirs-d32b83cfc75f5451.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libdirs_sys-fe36d3f9fb7fb28c.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liboption_ext-d27b8a32b2953563.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libxdg-910a2cd980cbb3d6.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libhome-701154559386eaa5.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libanyhow-041e139ed51b5278.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsysinfo-d6981df5d13c701f.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libchrono-5f1fe9bb3e869958.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libnum_traits-4a70d6101d7867c7.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libiana_time_zone-390cbebb61b58c44.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libtime-e12536e1cd315a58.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsmol_str-d96edf6673de401d.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbytelines-1ee9920f0bbac399.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libclap_complete-2fea54e620019c2c.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libclap-ab8b7c6d67f8457f.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libclap_builder-875dea4fd4afc772.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libterminal_size-b004c2ebf8868729.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/librustix-e37da1fda6730ec3.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libio_lifetimes-821b6f47339654ea.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblinux_raw_sys-a5ffed5acf204dc1.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libstrsim-21887bedd3871408.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libanstream-7e2a1cd77936c581.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libanstyle_query-513146763e7f89cb.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libis_terminal-3409342eb8e237a2.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/librustix-00d00e98b0538732.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbitflags-a3028726d8f5bd2c.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblinux_raw_sys-908c4669b82a765e.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libanstyle-18d471c5d09516ac.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libcolorchoice-229f2f1a20349974.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libanstyle_parse-e819a1f89401032e.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libclap_lex-0cbaf51f0e542e94.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbat-6739e671aee20958.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libansi_colours-c61e45e0b63265de.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/librgb-2d68aa7956261bc4.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbytemuck-d2a173ffb709c3d2.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgrep_cli-bfb7d1043b793d88.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libtermcolor-702994de4c47d155.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libserde_yaml-d4b8336479bbe732.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libglobset-d726ca7a202de5b1.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblog-a5955c1bdfd5fada.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libregex-cfec84b4d9688a43.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbstr-064d2b354f16c78a.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libregex_automata-caffe34bd21b1143.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libregex_syntax-63057b219945ce5b.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libaho_corasick-893f0ab2233c6dc5.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libencoding-6f08135db997f7b0.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libencoding_index_tradchinese-5b988073813a7d9b.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libencoding_index_simpchinese-186a74c69b13e695.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libencoding_index_japanese-4cf754936452d52c.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libencoding_index_korean-940985a951a18469.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libencoding_index_singlebyte-954e6f7fcd2ac5dd.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbytesize-4b9c2a26c737dfbe.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libconsole-4cea73df08457ae3.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libshell_words-0d0f1b5d20b5abc8.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libcontent_inspector-5ef783ad39ab7da1.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libnu_ansi_term-16fda7009c7e43e4.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libclircle-5ab5a0bb3fd78403.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblibc-64cf10aaecc96d59.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsemver-bca6528c8bc13805.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libpath_abs-01bf2e93658a4342.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libstd_prelude-4dce925a45ee7119.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsyntect-eab86f2473421451.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libthiserror-e5432c71934f52c6.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libwalkdir-108a8667a6a7685e.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsame_file-ec2dfbd72fbea145.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig_sys-a028435a0d393a47.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libyaml_rust-08e31f67aa564ca5.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblinked_hash_map-79c59b20acb3b899.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libregex_syntax-b7e7b870a75c13c4.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libfnv-dd53d7bf1af72b3a.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbitflags-2d3fb3aa751004a9.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libserde_json-38b46d231a716079.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libryu-cbfbab7eab8a4de1.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libplist-5bfcebc7b900f661.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libline_wrap-fa5db947b36d0cef.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsafemem-38077433f3d46895.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libtime-0842cbd1ef86e1af.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libitoa-ffa09a849e18fbaa.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libtime_core-40de2277850661c6.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libquick_xml-841c45cd9c6c1528.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libmemchr-b9f7cdd7a0ccceef.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbase64-08e958696c850dc8.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libindexmap-70bbfa52bcdbe274.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libhashbrown-97e897e1b4acae82.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libflate2-9d2486d8af64bc86.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libminiz_oxide-107d99311751d868.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libadler-c80b88fc3cb29575.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libcrc32fast-2c2b918d38088358.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libcfg_if-ff378949fa9efc6d.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libbincode-cc83d116251a6fad.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libserde-83b26c87a5299bcb.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblazy_static-ed85c14336dd57f7.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonce_cell-5504836c02d3a354.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libunicode_width-f970aa16a71d9967.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libunicode_segmentation-7e08fff408690820.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libitertools-a012ca4b7b0daa87.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libeither-f5d4a523c33aea4c.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libansi_term-6b10db8b1e3c8fdb.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libvte-212e78d1433e9eda.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libutf8parse-c3f0bfa1f33e3523.rlib" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libarrayvec-070e05729dfc8ade.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-dce4da11b2ccc789.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-c5aff1055622daf3.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libobject-9027304ca17f2680.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-c5fb359364fdb009.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-19a4ac3a15b73927.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-545ef01c478e3996.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-6ac5c2838ec4f836.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-290b884672cd911f.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-f9093be1927a1602.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-19087ab4fa333a2c.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f66fa5fbf4547710.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libadler-d7285f96d8856fea.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-406c5a4d6fa7f15b.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-43d91895302c1941.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-8e42f4a5e7a1d2d4.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-79b317ec80906222.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-099918608866d404.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9a01eccf23a84d5b.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-dc359f8c64813cd3.rlib" "-Wl,-Bdynamic" "-lz" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/liblibgit2_sys-48f6f901be762756.rlib(libgit2_sys-48f6f901be762756.libgit2_sys.dd2e6843b1b72bd7-cgu.0.rcgu.o): in function `libgit2_sys::init::{{closure}}':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libgit2-sys-0.15.2+1.6.4/lib.rs:4243:(.text.unlikely._ZN3std10sys_common4once5futex4Once4call17h8addfb411a121b0aE+0xb0): undefined reference to `git_libgit2_init'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libgit2-sys-0.15.2+1.6.4/lib.rs:4252:(.text.unlikely._ZN3std10sys_common4once5futex4Once4call17h8addfb411a121b0aE+0x15c): undefined reference to `git_error_last'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsyntect-eab86f2473421451.rlib(syntect-eab86f2473421451.syntect.f641a764216d1ef6-cgu.12.rcgu.o): in function `onig::syntax::Syntax::default':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/syntax.rs:97:(.text._ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h7fa14eb015c2042fE.llvm.7893781050962898617+0x28): undefined reference to `OnigDefaultSyntax'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/syntax.rs:97:(.text._ZN9once_cell3imp17OnceCell$LT$T$GT$10initialize28_$u7b$$u7b$closure$u7d$$u7d$17h8b2bb4e58f56d232E.llvm.7893781050962898617+0x27): undefined reference to `OnigDefaultSyntax'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.1.rcgu.o): in function `<onig::match_param::MatchParam as core::default::Default>::default':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/match_param.rs:37:(.text._ZN72_$LT$onig..match_param..MatchParam$u20$as$u20$core..default..Default$GT$7default17h30dd42d2acfa5d0eE+0x3): undefined reference to `onig_new_match_param'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/match_param.rs:38:(.text._ZN72_$LT$onig..match_param..MatchParam$u20$as$u20$core..default..Default$GT$7default17h30dd42d2acfa5d0eE+0xf): undefined reference to `onig_initialize_match_param'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.1.rcgu.o): in function `<onig::match_param::MatchParam as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/match_param.rs:48:(.text._ZN71_$LT$onig..match_param..MatchParam$u20$as$u20$core..ops..drop..Drop$GT$4drop17hbaeadb2ca8e276e0E+0x5): undefined reference to `onig_free_match_param'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.2.rcgu.o): in function `<onig::region::Region as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/region.rs:208:(.text._ZN4core3ptr41drop_in_place$LT$onig..region..Region$GT$17h3d95ac49061210f2E+0x4): undefined reference to `onig_region_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.2.rcgu.o): in function `onig::region::Region::reserve':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/region.rs:81:(.text._ZN4onig6region6Region13with_capacity17ha6b46158920f961cE+0x19): undefined reference to `onig_region_resize'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.2.rcgu.o): in function `<onig::region::Region as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/region.rs:208:(.text._ZN62_$LT$onig..region..Region$u20$as$u20$core..ops..drop..Drop$GT$4drop17h0288d0a83ab14cb4E+0x4): undefined reference to `onig_region_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.2.rcgu.o): in function `onig::region::Region::clone_from_raw':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/region.rs:52:(.text._ZN59_$LT$onig..region..Region$u20$as$u20$core..clone..Clone$GT$5clone17h1438b1195e932864E+0x19): undefined reference to `onig_region_copy'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.08.rcgu.o: in function `git2::repo::Repository::discover':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/repo.rs:254:(.text._ZN4git24repo10Repository8discover17h20c779139a3cddebE+0x6b): undefined reference to `git_repository_discover'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/delta-340c855f98c02c6b.delta.f0b890de4f8c8231-cgu.08.rcgu.o: in function `git2::repo::Repository::open':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/repo.rs:137:(.text._ZN4git24repo10Repository8discover17h20c779139a3cddebE+0xda): undefined reference to `git_repository_open'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.00.rcgu.o): in function `git2::repo::Repository::find_remote':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/repo.rs:592:(.text._ZN4git24repo10Repository11find_remote17haa669d284156d8f2E+0x59): undefined reference to `git_remote_lookup'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.00.rcgu.o): in function `git2::repo::Repository::config':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/repo.rs:1062:(.text._ZN4git24repo10Repository6config17h93daff0580d2f683E+0x1b): undefined reference to `git_repository_config'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.00.rcgu.o): in function `<git2::repo::Repository as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/repo.rs:3233:(.text._ZN64_$LT$git2..repo..Repository$u20$as$u20$core..ops..drop..Drop$GT$4drop17h76d6220ef68f9b44E+0x5): undefined reference to `git_repository_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `<git2::buf::Buf as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/buf.rs:69:(.text._ZN4core3ptr35drop_in_place$LT$git2..buf..Buf$GT$17hf670157c6536d3cbE+0x2): undefined reference to `git_buf_dispose'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::open':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:83:(.text._ZN4git26config6Config4open17h2133e4ab40614708E+0x7e): undefined reference to `git_config_open_ondisk'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::open_default':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:97:(.text._ZN4git26config6Config12open_default17h8da040e53af389a7E+0x2d): undefined reference to `git_config_open_default'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::get_bool':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:203:(.text._ZN4git26config6Config8get_bool17h1ac5d5758ca681b5E+0x58): undefined reference to `git_config_get_bool'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::get_i64':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:231:(.text._ZN4git26config6Config7get_i6417h25735a2fd4cbe5c5E+0x59): undefined reference to `git_config_get_int64'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::get_string':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:270:(.text._ZN4git26config6Config10get_string17hef3fe166632a5672E+0x81): undefined reference to `git_config_get_string_buf'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:275:(.text._ZN4git26config6Config10get_string17hef3fe166632a5672E+0x31b): undefined reference to `git_buf_dispose'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::entries':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:336:(.text._ZN4git26config6Config7entries17h94037dc5f3ce814eE+0x5e): undefined reference to `git_config_iterator_glob_new'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:339:(.text._ZN4git26config6Config7entries17h94037dc5f3ce814eE+0x91): undefined reference to `git_config_iterator_new'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::Config::snapshot':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:458:(.text._ZN4git26config6Config8snapshot17hfb67222d8e39c709E+0x1b): undefined reference to `git_config_snapshot'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `<git2::config::Config as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:514:(.text._ZN62_$LT$git2..config..Config$u20$as$u20$core..ops..drop..Drop$GT$4drop17h637459f95eb740c0E+0x5): undefined reference to `git_config_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `<git2::config::ConfigEntry as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:637:(.text._ZN4git26config13ConfigEntries4next17h304ee4a055cba1abE+0x27): undefined reference to `git_config_entry_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `git2::config::ConfigEntries::next':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:607:(.text._ZN4git26config13ConfigEntries4next17h304ee4a055cba1abE+0x33): undefined reference to `git_config_next'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `<git2::config::ConfigEntries as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:630:(.text._ZN69_$LT$git2..config..ConfigEntries$u20$as$u20$core..ops..drop..Drop$GT$4drop17h97b93ed6ac87837aE+0x5): undefined reference to `git_config_iterator_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.08.rcgu.o): in function `<git2::config::ConfigEntry as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/config.rs:637:(.text._ZN67_$LT$git2..config..ConfigEntry$u20$as$u20$core..ops..drop..Drop$GT$4drop17ha31baffac3d896f7E+0xb): undefined reference to `git_config_entry_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.10.rcgu.o): in function `git2::error::Error::last_error':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/error.rs:58:(.text._ZN4git25error5Error10last_error17hffc08210b8b27171E+0x2a): undefined reference to `git_error_last'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/error.rs:58:(.text._ZN4git25error5Error10last_error17hffc08210b8b27171E+0x130): undefined reference to `git_error_last'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/error.rs:66:(.text._ZN4git25error5Error10last_error17hffc08210b8b27171E+0x196): undefined reference to `git_error_clear'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.13.rcgu.o): in function `<git2::buf::Buf as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/buf.rs:69:(.text._ZN56_$LT$git2..buf..Buf$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc21452020d375b33E+0x2): undefined reference to `git_buf_dispose'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.15.rcgu.o): in function `git2::remote::Remote::url_bytes':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/remote.rs:146:(.text._ZN4git26remote6Remote3url17h0302733b5c0e42f5E+0xa): undefined reference to `git_remote_url'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libgit2-5c456929a04fdb71.rlib(git2-5c456929a04fdb71.git2.e001ce5ee71611f4-cgu.15.rcgu.o): in function `<git2::remote::Remote as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.17.2/src/remote.rs:445:(.text._ZN62_$LT$git2..remote..Remote$u20$as$u20$core..ops..drop..Drop$GT$4drop17h4122e77c3d6ff90aE+0x5): undefined reference to `git_remote_free'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libsyntect-eab86f2473421451.rlib(syntect-eab86f2473421451.syntect.f641a764216d1ef6-cgu.06.rcgu.o): in function `onig::Regex::search_with_param':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:707:(.text._ZN4onig5Regex17search_with_param17h51018bce7cf2fbd3E+0x3c): undefined reference to `OnigEncodingUTF8'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:710:(.text._ZN4onig5Regex17search_with_param17h51018bce7cf2fbd3E+0x49): undefined reference to `OnigEncodingUTF8'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:723:(.text._ZN4onig5Regex17search_with_param17h51018bce7cf2fbd3E+0x1cb): undefined reference to `onig_search_with_param'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.3.rcgu.o): in function `onig::Error::new':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:166:(.text._ZN4onig5Error3new17h3f567a3a67144f30E+0x40): undefined reference to `onig_error_code_to_str'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.3.rcgu.o): in function `onig::Regex::with_options_and_encoding':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:347:(.text._ZN4onig5Regex25with_options_and_encoding17hb47373bcb270f3a5E+0x97): undefined reference to `OnigEncodingUTF8'
          /usr/bin/ld: /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:347:(.text._ZN4onig5Regex25with_options_and_encoding17hb47373bcb270f3a5E+0xad): undefined reference to `onig_new'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.3.rcgu.o): in function `onig::Error::new':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:166:(.text._ZN4onig5Regex25with_options_and_encoding17hb47373bcb270f3a5E+0x125): undefined reference to `onig_error_code_to_str'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.3.rcgu.o): in function `onig::Regex::encoding':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:824:(.text._ZN4onig5Regex8encoding17hb8a8845a051b0bd4E+0x5): undefined reference to `onig_get_encoding'
          /usr/bin/ld: /home/clement/.cache/yay/git-delta-git/src/delta/target/release/deps/libonig-45f5d891c751d818.rlib(onig-45f5d891c751d818.onig.36b05d929265f9b6-cgu.3.rcgu.o): in function `<onig::Regex as core::ops::drop::Drop>::drop':
          /home/clement/.cargo/registry/src/index.crates.io-6f17d22bba15001f/onig-6.4.0/src/lib.rs:841:(.text._ZN53_$LT$onig..Regex$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6b0c38e08c6508caE+0x5): undefined reference to `onig_free'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `git-delta` (bin "delta") due to 1 previous error
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: git-delta-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
git-delta-git - exit status 4

I'm not much knowledgeable of the matter, but I'm guessing issue would come from onig crate, coming from there:

onig v6.4.0
ā””ā”€ā”€ syntect v5.1.0
    ā”œā”€ā”€ bat v0.23.0
    ā”‚   ā””ā”€ā”€ git-delta v0.16.5 (/home/clement/.cache/yay/git-delta-git/src/delta)
    ā””ā”€ā”€ git-delta v0.16.5 (/home/clement/.cache/yay/git-delta-git/src/delta)
Bennett-Petzold commented 6 months ago

I've also had this issue. I believe the issue is the that the library built (onig, using onig-sys, using rust-bindgen) doesn't emit lto-valid code. It needs to be built with LLVM LTO format (since that's the rustc LTO output) by setting the C compiler to clang and manually specifying some linker configuration. It builds properly on my system when I do that.

So use RUSTFLAGS="-C linker-plugin-lto -C linker=clang -C link-arg=-fuse-ld=lld" CC=clang cargo .... For the Arch Linux PKGBUILD, put this ahead of the build and test cargo invocations.

Here's a source for the rustflags combo: https://github.com/rust-lang/rust-bindgen/discussions/2405

Porkepix commented 3 weeks ago

I've also had this issue. I believe the issue is the that the library built (onig, using onig-sys, using rust-bindgen) doesn't emit lto-valid code. It needs to be built with LLVM LTO format (since that's the rustc LTO output) by setting the C compiler to clang and manually specifying some linker configuration. It builds properly on my system when I do that.

So use RUSTFLAGS="-C linker-plugin-lto -C linker=clang -C link-arg=-fuse-ld=lld" CC=clang cargo .... For the Arch Linux PKGBUILD, put this ahead of the build and test cargo invocations.

Here's a source for the rustflags combo: rust-lang/rust-bindgen#2405

I completely missed your answer. When trying to add those flags, it fails very early this way:

error: linking with `clang` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "clang" "-m64" "/tmp/rustcvdD3Kt/symbols.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/proc-macro2-353085366260a5a9/build_script_build-353085366260a5a9.build_script_build.20739e304462bbaa-cgu.0.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/proc-macro2-353085366260a5a9/build_script_build-353085366260a5a9.59yy69sqm7ub6lw0krlky02rx.rcgu.o" "-Wl,--as-needed" "-L" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/deps" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-975ad26df43f3092.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-854d359d815154a1.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1adba7de6291c957.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-2f003cc5096f2a41.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1940fdd05db36b65.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-6affaed698e37946.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-59090bd5092c735e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-95e6adcbe5e3e3b6.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-0b7c2ec24db7ead0.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f07917aaf98e9537.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-3d4fee16d8573795.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libadler-31d2edee42aa9f31.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-09f6820ab6e8fa52.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-67b9ce86c9dd6f1e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e318bc901c18d569.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-fa5228cf59161233.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2356df8ff6149061.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcore-972c7c6eb3eb878d.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-288663704b9edb44.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-Wl,-plugin-opt=O0,-plugin-opt=mcpu=x86-64" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/proc-macro2-353085366260a5a9/build_script_build-353085366260a5a9" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,--strip-debug" "-nodefaultlibs" "-fuse-ld=lld"
  = note: clang: error: invalid linker name in argument '-fuse-ld=lld'

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `clang` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "clang" "-m64" "/tmp/rustcmKu0HE/symbols.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/serde-10c90918a54ac077/build_script_build-10c90918a54ac077.build_script_build.81d712daa15f93e4-cgu.0.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/serde-10c90918a54ac077/build_script_build-10c90918a54ac077.6m4k9ml42to73yzex2rhffbjk.rcgu.o" "-Wl,--as-needed" "-L" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/deps" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-975ad26df43f3092.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-854d359d815154a1.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1adba7de6291c957.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-2f003cc5096f2a41.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1940fdd05db36b65.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-6affaed698e37946.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-59090bd5092c735e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-95e6adcbe5e3e3b6.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-0b7c2ec24db7ead0.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f07917aaf98e9537.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-3d4fee16d8573795.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libadler-31d2edee42aa9f31.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-09f6820ab6e8fa52.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-67b9ce86c9dd6f1e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e318bc901c18d569.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-fa5228cf59161233.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2356df8ff6149061.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcore-972c7c6eb3eb878d.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-288663704b9edb44.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-Wl,-plugin-opt=O0,-plugin-opt=mcpu=x86-64" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/serde-10c90918a54ac077/build_script_build-10c90918a54ac077" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,--strip-debug" "-nodefaultlibs" "-fuse-ld=lld"
  = note: clang: error: invalid linker name in argument '-fuse-ld=lld'

error: could not compile `serde` (build script) due to 1 previous error
error: linking with `clang` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "clang" "-m64" "/tmp/rustck7RjTm/symbols.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/libc-a25c1b35ac330fab/build_script_build-a25c1b35ac330fab.build_script_build.aa3d912dfb08114a-cgu.0.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/libc-a25c1b35ac330fab/build_script_build-a25c1b35ac330fab.build_script_build.aa3d912dfb08114a-cgu.1.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/libc-a25c1b35ac330fab/build_script_build-a25c1b35ac330fab.build_script_build.aa3d912dfb08114a-cgu.2.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/libc-a25c1b35ac330fab/build_script_build-a25c1b35ac330fab.build_script_build.aa3d912dfb08114a-cgu.3.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/libc-a25c1b35ac330fab/build_script_build-a25c1b35ac330fab.ckdk0zbfvj87egtlv8eg7ivz0.rcgu.o" "-Wl,--as-needed" "-L" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/deps" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-975ad26df43f3092.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-854d359d815154a1.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1adba7de6291c957.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-2f003cc5096f2a41.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1940fdd05db36b65.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-6affaed698e37946.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-59090bd5092c735e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-95e6adcbe5e3e3b6.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-0b7c2ec24db7ead0.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f07917aaf98e9537.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-3d4fee16d8573795.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libadler-31d2edee42aa9f31.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-09f6820ab6e8fa52.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-67b9ce86c9dd6f1e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e318bc901c18d569.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-fa5228cf59161233.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2356df8ff6149061.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcore-972c7c6eb3eb878d.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-288663704b9edb44.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-Wl,-plugin-opt=O0,-plugin-opt=mcpu=x86-64" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/libc-a25c1b35ac330fab/build_script_build-a25c1b35ac330fab" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,--strip-debug" "-nodefaultlibs" "-fuse-ld=lld"
  = note: clang: error: invalid linker name in argument '-fuse-ld=lld'

error: could not compile `libc` (build script) due to 1 previous error
error: linking with `clang` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "clang" "-m64" "/tmp/rustcTb9UQ1/symbols.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/rustix-f8f184104ab5ca79/build_script_build-f8f184104ab5ca79.build_script_build.c637cab1cc22d5ff-cgu.0.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/rustix-f8f184104ab5ca79/build_script_build-f8f184104ab5ca79.build_script_build.c637cab1cc22d5ff-cgu.1.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/rustix-f8f184104ab5ca79/build_script_build-f8f184104ab5ca79.build_script_build.c637cab1cc22d5ff-cgu.2.rcgu.o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/rustix-f8f184104ab5ca79/build_script_build-f8f184104ab5ca79.20wbd5g9rn3hs4hfpplnxanu5.rcgu.o" "-Wl,--as-needed" "-L" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/deps" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd-975ad26df43f3092.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-854d359d815154a1.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1adba7de6291c957.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-2f003cc5096f2a41.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1940fdd05db36b65.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-6affaed698e37946.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-59090bd5092c735e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-95e6adcbe5e3e3b6.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-0b7c2ec24db7ead0.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f07917aaf98e9537.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-3d4fee16d8573795.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libadler-31d2edee42aa9f31.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-09f6820ab6e8fa52.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-67b9ce86c9dd6f1e.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e318bc901c18d569.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-fa5228cf59161233.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2356df8ff6149061.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcore-972c7c6eb3eb878d.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-288663704b9edb44.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-Wl,-plugin-opt=O0,-plugin-opt=mcpu=x86-64" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clement/.cache/paru/clone/git-delta-git/src/delta/target/release/build/rustix-f8f184104ab5ca79/build_script_build-f8f184104ab5ca79" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,--strip-debug" "-nodefaultlibs" "-fuse-ld=lld"
  = note: clang: error: invalid linker name in argument '-fuse-ld=lld'

error: could not compile `rustix` (build script) due to 1 previous error
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'git-delta-git-r.319.f89300a-1':
error: packages failed to build: git-delta-git-r.319.f89300a-1

But I don't know why it would fail in my case, if it works for yours?

On the other hand, taken from non-AUR -git release, I tried adding CFLAGS+=' -ffat-lto-objects' (https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/blob/main/PKGBUILD?ref_type=heads#L38) and in that case it builds, but I can't explain why would this be needed.

There are quite some differences between the two build files and I don't find build docs around, so in case you would know if/why is https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/blob/main/PKGBUILD?ref_type=heads#L40 needed and the recommendations between cargo locked and frozen (see https://gitlab.archlinux.org/archlinux/packaging/packages/git-delta/-/blob/main/PKGBUILD?ref_type=heads#L43).