thp/linux-minidisc

libgcrypt not found at compile-time

mr-who2012 opened this issue · 5 comments

Hi,

I'm on ubuntu and can't compile the software:

meson build
The Meson build system
Version: 0.45.1
Source dir: /home/user/Downloads/linux-minidisc
Build dir: /home/user/Downloads/linux-minidisc/build
Build type: native build
Project name: minidisc
Native C compiler: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu118.04) 7.5.0")
Native C++ compiler: c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1
18.04) 7.5.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency libusb-1.0 found: YES 1.0.21

meson.build:5:0: ERROR: Native dependency 'libgcrypt' not found

libgcrypt is installed of course, as you can see here:

dpkg -l | grep libgcrypt
ii libgcrypt11-dev 1.5.4-3+really1.8.1-4ubuntu1.3 amd64 transitional libgcrypt11-dev package
ii libgcrypt20:amd64 1.8.1-4ubuntu1.3 amd64 LGPL Crypto library - runtime library
ii libgcrypt20:i386 1.8.1-4ubuntu1.3 i386 LGPL Crypto library - runtime library
ii libgcrypt20-dev 1.8.1-4ubuntu1.3 amd64 LGPL Crypto library - development files

and here:

apt search libgcrypt20
Sortierung... Fertig
Volltextsuche... Fertig
libgcrypt11-dev/bionic-updates,bionic-security,now 1.5.4-3+really1.8.1-4ubuntu1.3 amd64 [installiert]
Übergangspaket für libgcrypt11-dev

libgcrypt20/bionic-updates,bionic-security,now 1.8.1-4ubuntu1.3 amd64 [installiert]
Kryptografie-Bibliothek unter LGPL - Laufzeitbibliothek

libgcrypt20-dev/bionic-updates,bionic-security,now 1.8.1-4ubuntu1.3 amd64 [installiert]
LGPL-Krypto-Bibliothek – Entwicklungsdateien

libgcrypt20-doc/bionic-updates,bionic-updates,bionic-security,bionic-security 1.8.1-4ubuntu1.3 all
LGPL-Krypto-Bibliothek – Dokumentation

pkg-config indeed doesn't return anything when invoked manually:

pkg-config libgcrypt20

The readme.md reads:

Some things might have been broken during the build system transition, let me know and we can look into fixing it up.

...so...maybe this is a problem due to the transition?

thp commented

Ubuntu 18.04 is EOL (or will be in May, but the point is, it's 5 years old at this point, and nobody should really be running it at this point, and I don't plan on starting to support it in any case):
https://ubuntu.com/blog/ubuntu-18-04-eol-for-devices

More recent versions ship with the pkg-config files:
https://packages.ubuntu.com/kinetic/amd64/libgcrypt20-dev/filelist

The version in Bionic doesn't, this is why pkg-config doesn't find it even if installed:
https://packages.ubuntu.com/bionic/amd64/libgcrypt20-dev/filelist

(you want to look for /usr/lib/x86_64-linux-gnu/pkgconfig/libgcrypt.pc there)

Please upgrade to a newer version.

Thank you for the information.
I know of the bionic-status and that it still didn't reach end-of-life. The reason is simple and obvious: It's the last ubuntu-version with 32-bit-support. As a software-engineer supporting old md-devices you should care about support of old architectures. It's likely many users of md-devices also use old computers to connect them to.

thp commented

Build machine cpu family: x86_64

According to the logs, you're on a 64-bit x86 machine.

The reason is simple and obvious: It's the last ubuntu-version with 32-bit-support.

Also simple, maybe not obvious: Debian Bullseye, released in 2021 still supports i386 (plus multiarch if you need 32-bit userland on x86_64) and has up to date packages where libgcrypt20-dev:i386 has the necessary .pc file.

It's likely many users of md-devices also use old computers to connect them to.

I mostly use linux-minidisc on aarch64 and amd64 these days. The 32-bit x86 machines I keep around for fun can run Windows XP and SonicStage. linux-minidisc works just fine on Debian Sid i386 last time I checked.

As a software-engineer supporting old md-devices you should care about support of old architectures.

Same energy: As a user of open source software you should care about support of developers.

According to the logs, you're on a 64-bit x86 machine.

...with full 32-Bit-Support because of Ubuntu Bionic...

Debian Bulllseye [...] has up to date packages where libgcrypt20-dev:i386 has the necessary .pc file.

...it's not my fault, neither did I know that Ubuntu Bionic has a broken libcrypto-package. So..."sorry for that?"
You don't seriously believe a newer ubuntu-version had no packages with errors. The opposite is to be expected: Buggy new system with wayland on top and lacking 32-bit-support. I tried it once on a different computer. Can't recommend it.

Same energy: As a user of open source software you should care about support of developers

I do. Bionic still is officially supported. So when you knew their package was broken, why didn't you report it?

I don't know how your build-system is working. I just understand that you moved from qmake to meson. The readme also reads thg qmake-way was still possible. Unfortunately it doesn't say how. So is qmake-compilation using some other way than pkg-config to check for libs present in the system? Then how do I invoke compilation it with qmake?

Obviously pkg-config is not the best way checking for dependencies, in this case. BTW, dependencies are mentioned nowhere in the readme. Would be a nice addition.

I copied the .pc-file from the ubuntu-kinetic-libgcrypt-package manually into the proper folder. The paths inside the file are all correct. However, compilation is still not possible. Now it complains:

meson.build:5:0: ERROR: Could not generate cargs for libgcrypt