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

Add dependencies required during build process #154

Closed
wants to merge 0 commits into from

Conversation

ryanabx
Copy link

@ryanabx ryanabx commented Nov 21, 2023

This PR adds a few additional dependencies that I needed in order to build the master branch of cosmic-epoch.

It adds these packages to optional dependencies and the commands to install all dependencies and optional dependencies:

  • libpam0g-dev
  • libgtk-3-dev
  • build-essential
  • librust-atk-dev libatk1.0-dev

As an example of the issues I would run into without these dependencies, here's the reason I needed librust-atk-dev libatk1.0-dev:
image

@mmstick
Copy link
Member

mmstick commented Nov 21, 2023

Which dependency is requiring GTK?

@ryanabx
Copy link
Author

ryanabx commented Nov 21, 2023

Which dependency is requiring GTK?

From what I remember this is the build error I got that was solved with installing GTK:
image

To be frank, I'm new to this project and so it's possible that a different package would have solved this dependency issue

@wiiznokes
Copy link
Contributor

It's because of rfd crate

@andreinonea
Copy link

Hi all!

I tried to follow the cosmic-sysext example (just sysext) and I can confirm libpam0g-dev and libgtk-3-dev were missing dependencies for that task. I did not require librust-atk-dev for building the systemd extension, so probably OP tried some other task.

@jokeyrhyme
Copy link
Contributor

Looks like rfd can be used in a GTK-free way: https://docs.rs/rfd/0.12.1/rfd/#xdg-desktop-portal-backend

@ryzendew
Copy link

Tested this and confirmed these are needed

@jokeyrhyme
Copy link
Contributor

Yeah, I had to add gtk3 to the CI build in order to get cosmic-text to compile there: #158

README.md Outdated Show resolved Hide resolved
README.md Outdated
@@ -52,6 +52,10 @@ optionally (though the build-system might currently require these libraries):
- libgbm-dev
- libclang-dev
- libpipewire-0.3-dev
- librust-atk-dev
- libgtk-3-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to eliminate this dependency from the project that's depending on it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purged

@mcclure
Copy link

mcclure commented Dec 27, 2023

"Me too": On Ubuntu 23.10, I was also unable to build cosmic-epoch without libpam0g-dev (it was required by cosmic-greeter).

(libgtk-3-dev and build-essentials were already installed before I began; librust-atk-dev is not installed and for some reason turned out not to be needed, but I used a rustup rust instead of the ubuntu packaged rust which may have something to do with it.)

EDIT: Oh, sorry. I did not have librust-atk-dev but I do have libatk1.0-dev.

@Dygear
Copy link
Contributor

Dygear commented Jan 13, 2024

   Compiling glyphon v0.3.0 (https://github.com/jackpot51/glyphon.git?branch=refactor#c28dc99c)
   Compiling tiny-skia v0.8.4
error: failed to run custom build command for `gdk-sys v0.18.0`

Caused by:
  process didn't exit successfully: `/home/dygear/cosmic-epoch/cosmic-edit/target/release/build/gdk-sys-c7f637d5c86989e9/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=GDK_3.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr

  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags gdk-3.0 gdk-3.0 >= 3.22

  The system library `gdk-3.0` required by crate `gdk-sys` was not found.
  The file `gdk-3.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `gdk-3.0.pc`.

warning: build failed, waiting for other jobs to finish...
error: Recipe `build-debug` failed on line 31 with exit code 101
error: Recipe `build` failed on line 11 with exit code 101
dygear@MarkDesk:~/cosmic-epoch $

might be worth adding merging this until the dependency is dropped. needed on a raspberry pi 5.

@ryzendew
Copy link

ryzendew commented Jan 31, 2024

clang and nasm is needed also

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

Successfully merging this pull request may close these issues.

8 participants