Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Issues creating ebuild for Rust project that uses protoc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
gentoo-newcomer
n00b
n00b


Joined: 19 Nov 2024
Posts: 4

PostPosted: Mon Dec 16, 2024 4:27 pm    Post subject: Issues creating ebuild for Rust project that uses protoc Reply with quote

I am trying to write an ebuild file for https://github.com/imLinguin/comet, version 0.2.0. The project uses protoc to compile some protobuf files. This is done inside the `build.rs` file.
However, the build always fails during that stage and I am not sure why exactly.

Here is my current ebuild:

Code:

# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.13.4

EAPI=8

CRATES="
   addr2line@0.24.2
   adler2@2.0.0
   ahash@0.8.11
   aho-corasick@1.1.3
   allocator-api2@0.2.20
   android-tzdata@0.1.1
   android_system_properties@0.1.5
   anstream@0.6.18
   anstyle-parse@0.2.6
   anstyle-query@1.1.2
   anstyle-wincon@3.0.6
   anstyle@1.0.10
   anyhow@1.0.93
   async-compression@0.4.17
   async_zip@0.0.17
   atoi@2.0.0
   atomic-waker@1.1.2
   autocfg@1.4.0
   backtrace@0.3.74
   base64@0.21.7
   base64@0.22.1
   base64ct@1.6.0
   bitflags@2.6.0
   block-buffer@0.10.4
   bumpalo@3.16.0
   byteorder@1.5.0
   bytes@1.8.0
   cc@1.2.1
   cfg-if@1.0.0
   cfg_aliases@0.2.1
   chrono@0.4.38
   clap@4.5.21
   clap_builder@4.5.21
   clap_derive@4.5.18
   clap_lex@0.7.3
   colorchoice@1.0.3
   const-oid@0.9.6
   core-foundation-sys@0.8.7
   core-foundation@0.9.4
   cpufeatures@0.2.15
   crc-catalog@2.4.0
   crc32fast@1.4.2
   crc@3.2.1
   crossbeam-queue@0.3.11
   crossbeam-utils@0.8.20
   crypto-common@0.1.6
   data-encoding@2.6.0
   der@0.7.9
   derive-getters@0.3.0
   digest@0.10.7
   displaydoc@0.2.5
   dotenvy@0.15.7
   either@1.13.0
   encoding_rs@0.8.35
   env_filter@0.1.2
   env_logger@0.11.5
   equivalent@1.0.1
   errno@0.3.9
   etcetera@0.8.0
   event-listener@2.5.3
   fastrand@2.2.0
   flate2@1.0.35
   flume@0.11.1
   fnv@1.0.7
   form_urlencoded@1.2.1
   futures-channel@0.3.31
   futures-core@0.3.31
   futures-executor@0.3.31
   futures-intrusive@0.5.0
   futures-io@0.3.31
   futures-lite@2.5.0
   futures-macro@0.3.31
   futures-sink@0.3.31
   futures-task@0.3.31
   futures-util@0.3.31
   generic-array@0.14.7
   getrandom@0.2.15
   gimli@0.31.1
   h2@0.4.6
   hashbrown@0.14.5
   hashbrown@0.15.1
   hashlink@0.8.4
   heck@0.4.1
   heck@0.5.0
   hermit-abi@0.3.9
   hex@0.4.3
   hkdf@0.12.4
   hmac@0.12.1
   home@0.5.9
   http-body-util@0.1.2
   http-body@1.0.1
   http@1.1.0
   httparse@1.9.5
   humantime@2.1.0
   hyper-rustls@0.27.3
   hyper-util@0.1.10
   hyper@1.5.0
   iana-time-zone-haiku@0.1.2
   iana-time-zone@0.1.61
   icu_collections@1.5.0
   icu_locid@1.5.0
   icu_locid_transform@1.5.0
   icu_locid_transform_data@1.5.0
   icu_normalizer@1.5.0
   icu_normalizer_data@1.5.0
   icu_properties@1.5.1
   icu_properties_data@1.5.0
   icu_provider@1.5.0
   icu_provider_macros@1.5.0
   idna@1.0.3
   idna_adapter@1.2.0
   indexmap@2.6.0
   ipnet@2.10.1
   is_terminal_polyfill@1.70.1
   itoa@1.0.11
   js-sys@0.3.72
   lazy_static@1.5.0
   libc@0.2.164
   libm@0.2.11
   libsqlite3-sys@0.27.0
   linux-raw-sys@0.4.14
   litemap@0.7.3
   lock_api@0.4.12
   log@0.4.22
   md-5@0.10.6
   memchr@2.7.4
   mime@0.3.17
   minimal-lexical@0.2.1
   miniz_oxide@0.8.0
   mio@1.0.2
   nom@7.1.3
   num-bigint-dig@0.8.4
   num-integer@0.1.46
   num-iter@0.1.45
   num-traits@0.2.19
   object@0.36.5
   once_cell@1.20.2
   parking@2.2.1
   parking_lot@0.12.3
   parking_lot_core@0.9.10
   paste@1.0.15
   pem-rfc7468@0.7.0
   percent-encoding@2.3.1
   pin-project-internal@1.1.7
   pin-project-lite@0.2.15
   pin-project@1.1.7
   pin-utils@0.1.0
   pkcs1@0.7.5
   pkcs8@0.10.2
   pkg-config@0.3.31
   ppv-lite86@0.2.20
   proc-macro2@1.0.89
   protobuf-codegen@3.7.1
   protobuf-parse@3.7.1
   protobuf-support@3.7.1
   protobuf@3.7.1
   protoc-bin-vendored-linux-aarch_64@3.1.0
   protoc-bin-vendored-linux-ppcle_64@3.1.0
   protoc-bin-vendored-linux-x86_32@3.1.0
   protoc-bin-vendored-linux-x86_64@3.1.0
   protoc-bin-vendored-macos-aarch_64@3.1.0
   protoc-bin-vendored-macos-x86_64@3.1.0
   protoc-bin-vendored-win32@3.1.0
   protoc-bin-vendored@3.1.0
   quinn-proto@0.11.9
   quinn-udp@0.5.7
   quinn@0.11.6
   quote@1.0.37
   rand@0.8.5
   rand_chacha@0.3.1
   rand_core@0.6.4
   redox_syscall@0.5.7
   regex-automata@0.4.9
   regex-syntax@0.8.5
   regex@1.11.1
   reqwest@0.12.9
   result@1.0.0
   ring@0.17.8
   rsa@0.9.6
   rustc-demangle@0.1.24
   rustc-hash@2.0.0
   rustix@0.38.41
   rustls-pemfile@2.2.0
   rustls-pki-types@1.10.0
   rustls-webpki@0.102.8
   rustls@0.22.4
   rustls@0.23.17
   ryu@1.0.18
   scopeguard@1.2.0
   serde@1.0.215
   serde_derive@1.0.215
   serde_ini@0.2.0
   serde_json@1.0.133
   serde_spanned@0.6.8
   serde_urlencoded@0.7.1
   sha1@0.10.6
   sha2@0.10.8
   shlex@1.3.0
   signal-hook-registry@1.4.2
   signature@2.2.0
   slab@0.4.9
   smallvec@1.13.2
   socket2@0.5.7
   spin@0.9.8
   spki@0.7.3
   sqlformat@0.2.6
   sqlx-core@0.7.4
   sqlx-macros-core@0.7.4
   sqlx-macros@0.7.4
   sqlx-mysql@0.7.4
   sqlx-postgres@0.7.4
   sqlx-sqlite@0.7.4
   sqlx@0.7.4
   stable_deref_trait@1.2.0
   stringprep@0.1.5
   strsim@0.11.1
   subtle@2.6.1
   syn@1.0.109
   syn@2.0.87
   sync_wrapper@1.0.1
   synstructure@0.13.1
   sys-locale@0.3.2
   system-configuration-sys@0.6.0
   system-configuration@0.6.1
   tempfile@3.14.0
   thiserror-impl@1.0.69
   thiserror-impl@2.0.3
   thiserror@1.0.69
   thiserror@2.0.3
   tinystr@0.7.6
   tinyvec@1.8.0
   tinyvec_macros@0.1.1
   tokio-macros@2.4.0
   tokio-rustls@0.25.0
   tokio-rustls@0.26.0
   tokio-stream@0.1.16
   tokio-tungstenite@0.21.0
   tokio-util@0.7.12
   tokio@1.41.1
   toml@0.8.19
   toml_datetime@0.6.8
   toml_edit@0.22.22
   tower-service@0.3.3
   tracing-attributes@0.1.27
   tracing-core@0.1.32
   tracing@0.1.40
   try-lock@0.2.5
   tungstenite@0.21.0
   typenum@1.17.0
   unicode-bidi@0.3.17
   unicode-ident@1.0.13
   unicode-normalization@0.1.24
   unicode-properties@0.1.3
   unicode-segmentation@1.12.0
   unicode_categories@0.1.1
   untrusted@0.9.0
   url@2.5.3
   urlencoding@2.1.3
   utf-8@0.7.6
   utf16_iter@1.0.5
   utf8_iter@1.0.4
   utf8parse@0.2.2
   vcpkg@0.2.15
   version_check@0.9.5
   void@1.0.2
   want@0.3.1
   wasi@0.11.0+wasi-snapshot-preview1
   wasite@0.1.0
   wasm-bindgen-backend@0.2.95
   wasm-bindgen-futures@0.4.45
   wasm-bindgen-macro-support@0.2.95
   wasm-bindgen-macro@0.2.95
   wasm-bindgen-shared@0.2.95
   wasm-bindgen@0.2.95
   wasm-streams@0.4.2
   web-sys@0.3.72
   web-time@1.1.0
   which@4.4.2
   whoami@1.5.2
   windows-core@0.52.0
   windows-registry@0.2.0
   windows-result@0.2.0
   windows-strings@0.1.0
   windows-sys@0.48.0
   windows-sys@0.52.0
   windows-sys@0.59.0
   windows-targets@0.48.5
   windows-targets@0.52.6
   windows_aarch64_gnullvm@0.48.5
   windows_aarch64_gnullvm@0.52.6
   windows_aarch64_msvc@0.48.5
   windows_aarch64_msvc@0.52.6
   windows_i686_gnu@0.48.5
   windows_i686_gnu@0.52.6
   windows_i686_gnullvm@0.52.6
   windows_i686_msvc@0.48.5
   windows_i686_msvc@0.52.6
   windows_x86_64_gnu@0.48.5
   windows_x86_64_gnu@0.52.6
   windows_x86_64_gnullvm@0.48.5
   windows_x86_64_gnullvm@0.52.6
   windows_x86_64_msvc@0.48.5
   windows_x86_64_msvc@0.52.6
   winnow@0.6.20
   write16@1.0.0
   writeable@0.5.5
   yoke-derive@0.7.4
   yoke@0.7.4
   zerocopy-derive@0.7.35
   zerocopy@0.7.35
   zerofrom-derive@0.1.4
   zerofrom@0.1.4
   zeroize@1.8.1
   zerovec-derive@0.10.3
   zerovec@0.10.4
"

inherit cargo

DESCRIPTION="Open Source implementation of GOG Galaxy Communication Service for SDK bundled with GOG games"
HOMEPAGE="https://github.com/imLinguin/comet"
SRC_URI="
    "${HOMEPAGE}/archive/refs/tags/v${PV}.tar.gz"
   ${CARGO_CRATE_URIS}
"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD ISC MIT Unicode-3.0 Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"

pkg_setup() {
  rust_pkg_setup
}

src_configure() {
  cargo_src_configure
}

src_install() {
  dobin "$(cargo_target_dir)/${PN}"
}


And here is the build log:

Code:

     Running `/var/tmp/portage/games-util/comet-0.2.0/work/comet-0.2.0/target/release/build/comet-8436bf295a450799/build-script-build`
error: failed to run custom build command for `comet v0.2.0 (/var/tmp/portage/games-util/comet-0.2.0/work/comet-0.2.0)`

Caused by:
  process didn't exit successfully: `/var/tmp/portage/games-util/comet-0.2.0/work/comet-0.2.0/target/release/build/comet-8436bf295a450799/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=proto/galaxy.protocols.communication_service.proto
  cargo:rerun-if-env-changed=PROTOC

  --- stderr
  Could not make proto path relative: proto/gog.protocols.pb.proto: No such file or directory
  codegen failed: parse and typecheck

  Caused by:
      0: using protoc parser
      1: protoc command "/var/tmp/portage/games-util/comet-0.2.0/work/cargo_home/gentoo/protoc-bin-vendored-linux-x86_64-3.1.0/bin/protoc" "-Iproto" "--descriptor_set_out=/var/tmp/portage/games-util/comet-0.2.0/temp/protobuf-parseIdGHcH/descriptor.pbbin" "--include_imports" "proto/gog.protocols.pb.proto" "proto/galaxy.protocols.webbroker_service.proto" "proto/galaxy.protocols.overlay_for_peer.proto" "proto/galaxy.protocols.communication_service.proto" "proto/galaxy.common.protocols.peer_to_server.proto" "proto/galaxy.common.protocols.peer_to_peer.proto" "proto/galaxy.common.protocols.peer_common.proto" "proto/galaxy.common.protocols.connection.proto" exited with non-zero code
warning: build failed, waiting for other jobs to finish...
 * ERROR: games-util/comet-0.2.0 failed (compile phase):
 *   cargo build failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 2250:  Called cargo_src_compile
 *   environment, line  996:  Called die
 * The specific snippet of code:
 *       cargo_env "${@}" || die "cargo build failed"
 *
 * If you need support, post the output of `emerge --info '=games-util/comet-0.2.0'`,
 * the complete build log and the output of `emerge -pqv '=games-util/comet-0.2.0'`.
 * The complete build log is located at '/var/tmp/portage/games-util/comet-0.2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/games-util/comet-0.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/games-util/comet-0.2.0/work/comet-0.2.0'
 * S: '/var/tmp/portage/games-util/comet-0.2.0/work/comet-0.2.0'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum