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

glib <=2.7 not found #1601

Open
edgarriba opened this issue Jan 3, 2025 · 3 comments
Open

glib <=2.7 not found #1601

edgarriba opened this issue Jan 3, 2025 · 3 comments

Comments

@edgarriba
Copy link

hi! I'm attempting to build a cross docker for an old ubuntu18.04 that needs gstreamer with glib <= 2.7 and I'm getting some issue to get the container with the right configuration. This is what I'm trying

FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5

RUN apt-get update && apt-get install --assume-yes \
    cmake \
    curl \
    libglib2.0-dev \
    pkg-config \
    && \
    apt-get clean

RUN dpkg --add-architecture arm64

RUN apt-get update && apt-get install --assume-yes \
    nasm \
    libgstreamer1.0-dev:arm64 \
    libgstreamer-plugins-base1.0-dev:arm64 \
    libssl-dev:arm64 \
    libglib2.0-dev:arm64 \
    libudev-dev:arm64 \
    && \
    apt-get clean

Then during the compilation I get the following error:

  cargo:warning=
  pkg-config exited with status code 1
  > PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/: PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags glib-2.0 glib-2.0 >= 2.56

  The system library `glib-2.0` required by crate `glib-sys` was not found.
  The file `glib-2.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  PKG_CONFIG_PATH contains the following:
      - /usr/lib/aarch64-linux-gnu/pkgconfig/
      - 

  HINT: you may need to install a package such as glib-2.0, glib-2.0-dev or glib-2.0-devel.
@Emilgardis
Copy link
Member

Emilgardis commented Jan 4, 2025

Not sure why it doesn't work. After installing libglib2.0-dev:arm64 glib-2.0.pc should exist.

If you enter the image you created, does the file exist?

(also, this doesn't seem like a cross issue, but I can try to help you :) )

@edgarriba
Copy link
Author

edgarriba commented Jan 4, 2025

hi @Emilgardis, it definitely exists with pointing v2.48.2.

i'm trying to compile the same code outside of cross and it succeeds without a problem but I have the issue that I need to match with glib 2.56.4 with ubuntu 18.04 if I want to use cross (which will save me a lot of compilation time).

Tried to made explicit the version but apt it fails by not finding it.

RUN apt-get update && apt-get install --assume-yes \
    nasm \
    libgstreamer1.0-dev:arm64 \
    libgstreamer-plugins-base1.0-dev:arm64 \
    libssl-dev:arm64 \
    libglib2.0-dev:arm64=2.56.1-2ubuntu1 \
    libudev-dev:arm64 \
    && \
    apt-get clean

@Emilgardis
Copy link
Member

not sure why it can't find it, I'm not very good at ubuntu packages so not sure what else you could try :/

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