marin-m / SongRec

An open-source Shazam client for Linux, written in Rust.
GNU General Public License v3.0
1.36k stars 102 forks source link

building on OpenBSD 7.0 fails because of too new version #77

Open hboetes opened 2 years ago

hboetes commented 2 years ago

I don't think this problem can't be fixed by anything but a simple version bump, but I didn't find the string 3.3.1 with grep.

error: failed to run custom build command for `openssl-sys v0.9.60`                    
[snip]
  This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
  through 3.3.1, but a different version of OpenSSL was found. The build is now aborting
  due to this version mismatch.

% openssl version
LibreSSL 3.4.1

What am I missing here?

marin-m commented 2 years ago

Hello,

It seems that even if we update the minor version of the openssl-sys crate, the upstream currently only supports LibreSSL up to version 3.4.0, version 3.4.1 is not accepted by the build system: https://github.com/sfackler/rust-openssl/blob/66635f/openssl-sys/build/main.rs#L297

See the following issue regarding upstream tracking: https://github.com/sfackler/rust-openssl/pull/1528

When this be fixed, we may try to change/update the Cargo.lock file in order to reflect the related changes, if no crate used in SongRec require a smaller version of the openssl-sys crate.

Regards,

hboetes commented 2 years ago

OK, thanks for the heads-up

marin-m commented 2 years ago

Hello,

It should be fixed by commit 2cf3dd1.

Regards,

hboetes commented 2 years ago

Thanks, the build progresses beyond this problem, on to the next problem:

work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/gnulib-lib/term-styled-ostream.c~)
  /bin/sh ../libtool  --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\"  -DEXEEXT=\"\"  -I. -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/gnulib-lib -I..  -I../intl -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/intl  -I.. -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools -DDEPENDS_ON_LIBICONV=1  -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC     -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/gnulib-lib/libcroco     -O3 -ffunction-sections -fdata-sections -fPIC -m64 -O2 -pipe -fno-common  -c -o term-styled-ostream.lo term-styled-ostream.c
  libtool: compile:  cc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/gnulib-lib -I.. -I../intl -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/intl -I.. -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I/usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/gettext/gettext-tools/gnulib-lib/libcroco -O3 -ffunction-sections -fdata-sections -fPIC -m64 -O2 -pipe -fno-common -c term-styled-ostream.c -o term-styled-ostream.o
  *** Error 1 in target 'term-styled-ostream.lo'

  --- stderr
  configure: WARNING: libacl development library was not found or not usable.
  configure: WARNING: gettext-tools will be built without ACL support.
  cc: error: no such file or directory: 'term-styled-ostream.c'
  cc: error: no input files
  *** Error 1 in gettext-tools/gnulib-lib (Makefile:2962 'term-styled-ostream.lo')
  *** Error 2 in gettext-tools/gnulib-lib (Makefile:2618 'all')
  *** Error 1 in gettext-tools (Makefile:2051 'all-recursive')
  *** Error 2 in gettext-tools (Makefile:1892 'all')
  *** Error 1 in . (Makefile:439 'all-recursive')
  *** Error 2 in /usr/obj/work/songrec/src/songrec/target/release/build/gettext-sys-32b01b3e1d850fae/out/build (Makefile:370 'all')
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

  build script failed, must exit now', /home/han/.cargo/registry/src/github.com-1ecc6299db9ec823/gettext-sys-0.19.9/build.rs:251:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Hummer12007 commented 2 years ago

Getting ALSA errors with 2cf3dd1

fuji@antonovka /tmp/SongRec $ cargo run
   Compiling songrec v0.2.1 (/tmp/SongRec)
    Finished dev [unoptimized + debuginfo] target(s) in 12.57s
     Running `target/debug/songrec`
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: BackendSpecific { err: BackendSpecificError { description: "ALSA function 'snd_pcm_sw_params' failed with error 'EINVAL: Invalid argument'" } }', src/gui/microphone_thread.rs:100:330
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Hummer12007 commented 2 years ago

Pinning cpal to 0.13.3 fixes the issue. Added this to my PR.

Hummer12007 commented 2 years ago

Reported upstream https://github.com/RustAudio/cpal/issues/617

danboid commented 2 years ago

@hboetes

Did you get songrec to build under OpenBSD? I'm going to try building it under FreeBSD soon.

hboetes commented 2 years ago

@danboid

Did you get songrec to build under OpenBSD? I'm going to try building it under FreeBSD soon.

No I didn't, and since I just uninstalled OpenBSD, I can't check any more. :-/