Open Baraccc opened 1 year ago
I'm not familiar with those gnome projects but looking at the source code of Amberol I see that it has some meson files.
I suspect that the project cannot be built using just a standard cargo invocation and instead requires that it be built using Meson. Cargo-deb has no way of knowing how to handle non-standard build systems.
What you could do is build it as it is supposed to built, then disable compilation via --no-build when invoking cargo-deb so that cargo-deb only packages already built artifacts.
It worked, not necessarily with amberol but with Fragments, whose instruction is in the project readme in gitlab.
Cargo-deb has no way of knowing how to handle non-standard build systems.
So no plan to support meson build system right?
My brief, limited, impression of Meson is that it is intended to own the build process and so using --no-build
with Cargo-deb is the right thing to do.
Though I have contributed to Cargo-deb in the past, I'm not the maintainer of Cargo-deb so I can only give you my opinion: the most likely way in my experience to extend Cargo-deb is to submit a pull request yourself with arguments explaining why it is a good proposal.
Hi, I need some help, I'm trying to create .deb files for the apps on circle.gnome.com. A particularity of those apps is that they use src/config.rs.ini instead of src/config.rs and the cargo-deb program fails to create .deb files despite all compiling going flawlessly.
For instant I'll post the error on Amberol app, but the same happens for Fragments and Podcast apps.
Compiling amberol v0.1.0 (/home/hamza/Downloads/amberol-0.9.1) error[E0432]: unresolved imports
crate::config::APPLICATION_ID,
crate::config::VERSION` --> src/application.rs:14:14VERSION
inconfig
APPLICATION_ID
inconfig
error[E0432]: unresolved import
crate::config::APPLICATION_ID
--> src/audio/mpris_controller.rs:14:5 | 14 | config::APPLICATION_ID, | ^^^^^^^^^^^^^^^^^^^^^^ noAPPLICATION_ID
inconfig
error[E0432]: unresolved import
crate::config::APPLICATION_ID
--> src/utils.rs:11:5 | 11 | use crate::config::APPLICATION_ID; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ noAPPLICATION_ID
inconfig
error[E0432]: unresolved import
crate::config::APPLICATION_ID
--> src/window.rs:20:5 | 20 | config::APPLICATION_ID, | ^^^^^^^^^^^^^^^^^^^^^^ noAPPLICATION_ID
inconfig
config::APPLICATION_ID
,config::GETTEXT_PACKAGE
,config::LOCALEDIR
,config::PKGDATADIR
,config::PROFILE
--> src/main.rs:23:14PROFILE
inconfig
PKGDATADIR
inconfig
LOCALEDIR
inconfig
GETTEXT_PACKAGE
inconfig
APPLICATION_ID
inconfig
For more information about this error, try
rustc --explain E0432
. error: could not compileamberol
due to 5 previous errors cargo-deb: build failed hamza@surface:~/Downloads/amberol-0.9.1$ `the content of src/config.rs.ini is: `// SPDX-FileCopyrightText: 2022 Emmanuele Bassi // SPDX-License-Identifier: GPL-3.0-or-later
pub static VERSION: &str = @VERSION@; pub static GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@; pub static LOCALEDIR: &str = @LOCALEDIR@; pub static PKGDATADIR: &str = @PKGDATADIR@; pub static APPLICATION_ID: &str = @APPLICATION_ID@; pub static PROFILE: &str = @PROFILE@;
`
So I guess is pointing to somewhere, I just don't know.
I tried to create a empty src/config.rs there ended up with that error.
I tried to create a src/config.rs file with some contents trying to match those on src/config.rs.ini in fact it created the .deb file on the target, installed but the apps refused to start.
So first I think I should figure out is the best way to pass the first error i.e the app not being compiled with just it's original config.rs.ini.
So please help me on this.
I'm doing all this on Debian Testing.