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

libgeneral from source ends up as wrong version while building usbmuxd2? #30

Open
voltagex opened this issue Sep 2, 2023 · 1 comment

Comments

@voltagex
Copy link

voltagex commented Sep 2, 2023

FROM debian:bookworm
ENV NOCONFIGURE=1
RUN apt update && apt install -y --no-install-recommends pkgconf automake autoconf g++ libtool git ca-certificates make
RUN git clone --depth=1 https://github.com/tihmstar/libgeneral /usr/src/libgeneral
WORKDIR /usr/src/libgeneral
RUN libtoolize && ./autogen.sh && ./configure --prefix=/output && make -j$(nproc) && make install


ENV PKG_CONFIG_PATH=/output/lib/pkgconfig/
RUN git clone --depth=1 https://github.com/tihmstar/usbmuxd2 /usr/src/usbmuxd2
WORKDIR /usr/src/usbmuxd2
RUN libtoolize && ./autogen.sh && ./configure --prefix=/output && make -j$(nproc) && make install

...

 > [8/8] RUN libtoolize && ./autogen.sh && ./configure --prefix=/output && make -j$(nproc) && make install:
7.087
7.087 Package dependency requirement 'libgeneral >= 39' could not be satisfied.
7.087 Package 'libgeneral' has version '1', required version is '>= 39'
7.087
7.087 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7.087 installed software in a non-standard prefix.
7.087
7.087 Alternatively, you may set the environment variables libgeneral_CFLAGS
7.087 and libgeneral_LIBS to avoid the need to call pkg-config.
7.087 See the pkg-config man page for more details.

Looking at https://github.com/tihmstar/libgeneral and taking a guess, I need to be using a tagged version of libgeneral.

@tihmstar
Copy link
Owner

tihmstar commented Jan 3, 2024

The issue is

RUN git clone --depth=1 https://github.com/tihmstar/libgeneral /usr/src/libgeneral

The versioning is based on the number of commits to the repo. If you clone with depth=1, then your number of commits in the backlog is 1 and thus the version is set to 1.

Using the number of commits in a repo isn't ideal, but it is a quick and lazy approach which works "good enough" considering my aim was never to be a package maintainer.

I think if people re-package my tools into package managers, they should take care of correct versioning themselves if needed.

For now, to fix your issue, don't clone with depth=1

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