From: A Tammy Subject: Re: Help needed on porting ripgrep-all To: Neel chakraborty Cc: ports@openbsd.org Date: Thu, 12 Sep 2024 09:18:37 -0400 On 9/12/24 9:16 AM, A Tammy wrote: > > > On 9/12/24 9:08 AM, Neel chakraborty wrote: >> Thank you, that solves the problem.  >> Can you please tell me how you figured out  >> `MODCARGO_CRATES_KEEP = libsqlite3-sys` >> would solve the problem? >> >> I read through cargo-module(5), but couldn't find  >> MODCARGO_CRATES_KEEP > > > Hmm, it might be time to add this to cargo-module(5). If you want to > add a patch for adding this to the man page, it would be very welcome :) > > From semarie@ email, maybe we shouldn't add it to the man page, so lets ignore this for now. > I knew through experience, as I've ported some other rust packages > where this was needed, so I recognized the error. > > And by reading through the cargo.port.mk module in > devel/cargo/cargo.port.mk > > In general, reading through the .port.mk module shows > idiosyncrasies specific to that module and is a good thing to do once > in a lifetime. > > >> >> On Thu, Sep 12, 2024 at 6:15 PM A Tammy wrote: >> >> >> On 9/12/24 6:11 AM, Neel chakraborty wrote: >>> Hello everyone,  >>> I am trying to port ripgrep-all >>> .  >>> However, I am facing a few difficulties and would greatly >>> appreciate  >>> your help on this matter.  >>> >>> I am running OpenBSD-current.  >>> >>> This is my makefile  >>> >>> COMMENT = fast line-oriented search tool for regex across files. >>> >>> DIST_TUPLE = github phiresky ripgrep-all v0.10.6 . >>> >>> CATEGORIES = textproc >>> >>> MAINTAINER = Neel Chakraborty >>> >>> # AGPL >>> PERMIT_PACKAGE = Yes >>> >>> WANTLIB = ${MODCARGO_WANTLIB} >>> >>> MODULES = devel/cargo >>> >>> SEPARATE_BUILD = Yes >>> >>> CONFIGURE_STYLE = cargo >>> >>> >>> BUILD_DEPENDS += databases/sqlite3 >> >> >> Try by adding something like >> >> MODCARGO_CRATES_KEEP = libsqlite3-sys >> >> >> >>> >>> RUN_DEPENDS += textproc/ripgrep >>> RUN_DEPENDS += textproc/pandoc >>> RUN_DEPENDS +=  sysutils/fzf >>> RUN_DEPENDS +=  poppler-utils >>> RUN_DEPENDS +=  graphics/ffmpeg >>> >>> .include "crates.inc" >>> >>> .include > >>> >>> >>> This is the error I am getting when running make build >>> >>>  Compiling libsqlite3-sys v0.27.0 >>>      Running >>> `/usr/ports/pobj/ripgrep-all-0.10.6/build-amd64/target/release/build/libsqlite3-sys-c5409b034e940ed1/build-script-build` >>> error: failed to run custom build command for `libsqlite3-sys >>> v0.27.0` >>> note: To improve backtraces for build dependencies, set the >>> CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment >>> variable to enable debug information generation. >>> >>> Caused by: >>>   process didn't exit successfully: >>> `/usr/ports/pobj/ripgrep-all-0.10.6/build-amd64/target/release/build/libsqlite3-sys-c5409b034e940ed1/build-script-build` >>> (exit status: 101) >>>   --- stdout >>>   cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG >>> >>>   --- stderr >>>   thread 'main' panicked at >>> /usr/ports/pobj/ripgrep-all-0.10.6/ripgrep-all-0.10.6/modcargo-crates/libsqlite3-sys-0.27.0/build.rs:36:35: >>>   Could not copy bindings to output directory: Os { code: 2, >>> kind: NotFound, message: "No such file or directory" } >>>   stack backtrace: >>>      0:      0xbc10fe72b38 - >>> >> core::fmt::Display>::fmt::hb1559dead543c4dd >>>      1:      0xbc10feb3b51 - core::fmt::write::he56f0be7f17b9c9a >>>      2:      0xbc10fe6aebe - >>> std::io::Write::write_fmt::h6a35cfbffbb514ae >>>      3:      0xbc10fe98b61 - >>> std::panicking::default_hook::{{closure}}::h06883bf808c36eac >>>      4:      0xbc10fe987de - >>> std::panicking::default_hook::h1c1770ff24688834 >>>      5:      0xbc10fe991a3 - >>> std::panicking::rust_panic_with_hook::h4097070b7c950101 >>>      6:      0xbc10fe739ca - >>> std::panicking::begin_panic_handler::{{closure}}::h828757695de97871 >>>      7:      0xbc10fe72d5d - >>> std::sys::backtrace::__rust_end_short_backtrace::h486f9e2b1dd3da6d >>>      8:      0xbc10fe98d58 - rust_begin_unwind >>>      9:      0xbc10feb6ee7 - >>> core::panicking::panic_fmt::h71a69e6793d4abbb >>>     10:      0xbc10feb72fa - >>> core::result::unwrap_failed::h89080097d7c27163 >>>     11:      0xbc10fdab945 - >>> core::result::Result::expect::h0250482707e6d270 >>>     12:      0xbc10fdac79c - >>> build_script_build::copy_bindings::h480ee24fbe3e216d >>>     13:      0xbc10fdacbe3 - >>> build_script_build::build_bundled::main::h9e698e9ca6e8e2c5 >>>     14:      0xbc10fdaca1b - >>> build_script_build::main::h265adfe4e758df8d >>>     15:      0xbc10fdab56a - >>> core::ops::function::FnOnce::call_once::hf7a67807d7b8dbb3 >>>     16:      0xbc10fdab439 - >>> std::sys::backtrace::__rust_begin_short_backtrace::h7d43a1d33fd415b5 >>>     17:      0xbc10fdab124 - >>> std::rt::lang_start::{{closure}}::hb9923532271481d0 >>>     18:      0xbc10fe7c5b7 - >>> std::rt::lang_start_internal::hebea6b6875aad9ad >>>     19:      0xbc10fdab0fd - std::rt::lang_start::h65e09182653fcb33 >>>     20:      0xbc10fdaf05c - main >>>     21:      0xbc10fdaac1b - >>> *** Error 101 in . (/usr/ports/devel/cargo/cargo.port.mk:358 >>> 'do-build': @cd >>> /usr/ports/pobj/ripgrep-all-0.10.6/ripgrep-all-0.10.6 && /usr/b...) >>> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3057 >>> >>> '/usr/ports/pobj/ripgrep-all-0.10.6/build-amd64/.build_done': >>> @cd /usr/ports...) >>> *** Error 2 in /usr/ports/textproc/ripgrep-all >>> (/usr/ports/infrastructure/mk/bsd.port.mk:2704 >>> 'build': @lock=ripgrep-all-0.10.6; >>>  export _LO...) >>> >>> I am not facing this issue when I am building this software >>> outside of the ports tree.  >>> >>> >>> How do I resolve this issue?  >>> I am new to porting and rust, please forgive me if this is a >>> rudimentary question.  >>