Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling the project fails, following instructions from readme. #168

Open
Mi605 opened this issue Jun 2, 2024 · 1 comment
Open

Compiling the project fails, following instructions from readme. #168

Mi605 opened this issue Jun 2, 2024 · 1 comment

Comments

@Mi605
Copy link

Mi605 commented Jun 2, 2024

I'm trying to build songrec v0.4.2 on antiX 23.1 full runit 64 bit, kernel 6.5.0-0.deb12.4-amd64-smp, packages build-essential libasound2-dev libpulse-dev libgtk-3-dev libssl-dev installed.

$ cargo --version
cargo 1.78.0 (54d8815d0 2024-03-26)
$ rustc --version
rustc 1.78.0 (9b00956e5 2024-04-29)

$ git clone https://github.com/marin-m/songrec
$ cd songrec
$ cargo run --release --no-default-features -F gui,ffmpeg,pulse,mpris

...

warning: method `add_song_history_records` is never used
  --> src/gui/song_history_interface.rs:14:8
   |
10 | trait SongHistoryRecordListStore {
   |       -------------------------- method in this trait
...
14 |     fn add_song_history_records(self: &mut Self, to_add: &Vec<SongHistoryRecord>);
   |        ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

How to make it build properly? Seems there is some functionality missing and the resulting executable has 8,7 MiB compared with the cargo install in home folder, which has 9,2 MiB size.

Additional note: You should possibly update your readme file:

It has been observed to work with rustc since version 1.43.0.
sudo apt install rustc cargo

None of this works.

error: failed to compile `songrec v0.4.2`, intermediate artifacts can be found at `/tmp/cargo-installc3B1lQ`

Caused by:
  package `regex-syntax v0.8.3` cannot be built because it requires rustc 1.65 or newer, while the currently active rustc version is 1.63.0

songrec v0.4.2 needs rustc 1.65 or higher, while debian stable installs 1.63 only. So also the statement about min version 1.43 is obviously wrong.

$ apt-cache policy rustc
rustc:
  Installiert:           (keine)
  Installationskandidat: 1.63.0+dfsg1-2
  Versionstabelle:
     1.63.0+dfsg1-2 500
        500 http://ftp.de.debian.org/debian bookworm/main amd64 Packages

$ apt-cache policy cargo
cargo:
  Installiert:           (keine)
  Installationskandidat: 0.66.0+ds1-1
  Versionstabelle:
     0.66.0+ds1-1 500
        500 http://ftp.de.debian.org/debian bookworm/main amd64 Packages

I had to use rustup curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh on bookworm instead of apt install.

This installs currently rustc 1.78.0 and cargo 1.78.0 which compiles at least the homefolder method without any error messages.

marin-m added a commit that referenced this issue Sep 29, 2024
Options:
    -h, --help          Display this message
        --cfg SPEC      Configure the compilation environment.
                        SPEC supports the syntax `NAME[="VALUE"]`.
        --check-cfg SPEC
                        Provide list of expected cfgs for checking
    -L [KIND=]PATH      Add a directory to the library search path. The
                        optional KIND can be one of dependency, crate, native,
                        framework, or all (the default).
    -l [KIND[:MODIFIERS]=]NAME[:RENAME]
                        Link the generated crate(s) to the specified native
                        library NAME. The optional KIND can be one of
                        static, framework, or dylib (the default).
                        Optional comma separated MODIFIERS
                        (bundle|verbatim|whole-archive|as-needed)
                        may be specified each with a prefix of either '+' to
                        enable or '-' to disable.
        --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
                        Comma separated list of types of crates
                        for the compiler to emit
        --crate-name NAME
                        Specify the name of the crate being built
        --edition 2015|2018|2021|2024
                        Specify which edition of the compiler to use when
                        compiling code. The default is 2015 and the latest
                        stable edition is 2021.
        --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
                        Comma separated list of types of output for the
                        compiler to emit
        --print [crate-name|file-names|sysroot|target-libdir|cfg|check-cfg|calling-conventions|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|all-target-specs-json|native-static-libs|stack-protector-strategies|link-args|deployment-target]
                        Compiler information to print on stdout
    -g                  Equivalent to -C debuginfo=2
    -O                  Equivalent to -C opt-level=2
    -o FILENAME         Write output to <filename>
        --out-dir DIR   Write output to compiler-chosen filename in <dir>
        --explain OPT   Provide a detailed explanation of an error message
        --test          Build a test harness
        --target TARGET Target triple for which the code is compiled
    -A, --allow LINT    Set lint allowed
    -W, --warn LINT     Set lint warnings
        --force-warn LINT
                        Set lint force-warn
    -D, --deny LINT     Set lint denied
    -F, --forbid LINT   Set lint forbidden
        --cap-lints LEVEL
                        Set the most restrictive lint level. More restrictive
                        lints are capped at this level
    -C, --codegen OPT[=VALUE]
                        Set a codegen option
    -V, --version       Print version info and exit
    -v, --verbose       Use verbose output

Additional help:
    -C help             Print codegen options
    -W help             Print 'lint' options and default settings
    -Z help             Print unstable compiler options
    --help -v           Print the full set of options rustc accepts version in the root README.md (issue #168)
@marin-m
Copy link
Owner

marin-m commented Sep 29, 2024

Hello,

Thank you for noticing, anyway the cpal crate dependency has been bumped and now requires rustc 1.70 as a minimal version, so the README has been fixed accordingly now.

The dead code warning has been fixed at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants