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

Examples fail to run #264

Closed
nebrelbug opened this issue Jul 18, 2020 · 10 comments
Closed

Examples fail to run #264

nebrelbug opened this issue Jul 18, 2020 · 10 comments
Labels

Comments

@nebrelbug
Copy link

Describe the bug

When running cargo run --example widgets --release, the build fails with

error: failed to run custom build command for `xkbcommon-sys v0.7.4`
...
Caused by:
  process didn't exit successfully: `/home/nebrelbug/Coding/orbtk-tests/orbtk/target/release/build/xkbcommon-sys-6ca975e3b9f6478a/build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=XKBCOMMON_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
...

To Reproduce
Steps to reproduce the behavior:

  1. Clone the OrbTK repository
  2. Run cargo run --example widgets --release inside the repository

Expected behavior
Examples would run.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Pop!_OS 20.04

Additional context
Problem occurs when using nightly or stable Rust.

@nebrelbug nebrelbug added the bug label Jul 18, 2020
@FloVanGH
Copy link
Contributor

You first need to install

sudo apt install libxkbcommon-dev libwayland-cursor0 libwayland-dev

@FloVanGH
Copy link
Contributor

Does is worked?

@FloVanGH
Copy link
Contributor

I close this now if you have still that issue you could reopen it.

@nebrelbug
Copy link
Author

This fixed it! Is this anywhere in the docs? Might be helpful for other users.

@kivimango
Copy link
Contributor

It's in the README

@nebrelbug
Copy link
Author

@kivimango oops, don't know how I missed that. Thanks!

Are those packages required in order to run OrbTK in general?

@kivimango
Copy link
Contributor

I'm not sure, I would say yes, I'm on win 10 currently.

@darkcharmander
Copy link

darkcharmander commented Aug 4, 2020

Installing the packages that @FloVanGH mentioned didn't work: they were already installed on my computer but I still have problems,

The 'image' example doesn't work. It compiles fine but after you try to start it, you get this in the console:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  1 (X_CreateWindow)
  Value in failed request:  0x0
  Serial number of failed request:  85
  Current serial number in output stream:  92

Other examples like e.g. the calculator do work fine. It 'could' be a driver issue since I am running this machine in VirtualBox.
OS: Kubuntu 20.04 x64
Crate version: 0.3.1-alpha3

@shadiakiki1986
Copy link

shadiakiki1986 commented Aug 6, 2020

In my case it turned out that the pkg-config program was not installed. Installed it with sudo apt-get install -y pkg-config. It turns out that there's an open issue for it in pkg-config-rs/issues/103, which in its turn is used by rust-xkbcommon-sys

I think this should be added to the list of dependencies to be installed for orbtk, especially that pkg-config does not come pre-installed on fresh ubuntu server 20.04, which would make "development-sense" if it gets some desktop GUI like lxde.

@darkcharmander
Copy link

I don't know why, but I re-downloaded orbtk and recompiled everything, and the image sample works now. Disregard my previous post!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants