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

Fix pkg_config::target_supported missing causing build error. #1

Merged

Conversation

OMGtechy
Copy link
Contributor

On my machine (a raspberry pi 4 running Manjaro), I get an error saying that pkg_config doesn't contain target_supported.
I'm not too familiar with rust or how to navigate it, but after a little digging it looks like it's inside the Config type.

The docs for pkg_config (https://docs.rs/pkg-config/0.3.8/pkg_config/index.html) lead me to believe
that it's fine to just new() up a Config and use that.

Testing done:

  • cargo test
  • cargo test --release

Output of uname -a:
Linux pi 5.10.81-1-MANJARO-ARM-RPI #1 SMP PREEMPT Thu Nov 25 07:43:21 CST 2021 aarch64 GNU/Linux

On my machine (a raspberry pi 4 running Manjaro), I get an error saying that pkg_config doesn't contain target_supported.
I'm not too familiar with rust or how to navigate it, but after a little digging it looks like it's inside the Config type.

The docs for pkg_config (https://docs.rs/pkg-config/0.3.8/pkg_config/index.html) lead me to believe
that it's fine to just new() up a Config and use that.

Testing done:
- cargo test
- cargo test --release

Output of uname -a:
Linux pi 5.10.81-1-MANJARO-ARM-RPI #1 SMP PREEMPT Thu Nov 25 07:43:21 CST 2021 aarch64 GNU/Linux
OMGtechy added a commit to OMGtechy/elfutils-rs that referenced this pull request Dec 10, 2021
This should make it easier to manage pull requests; you know the state of cargo test.

In this case, the build fails, but that's due to another issue fixed elsewhere (cuviper#1).
@OMGtechy OMGtechy mentioned this pull request Dec 10, 2021
Copy link
Owner

@cuviper cuviper left a comment

Choose a reason for hiding this comment

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

Thanks! That looks like a breaking change in rust-lang/pkg-config-rs#86, but we can work around it.

libdw-sys/build.rs Outdated Show resolved Hide resolved
@cuviper
Copy link
Owner

cuviper commented Dec 14, 2021

One more thing, we should require pkg-config = "0.3.15" for the new API call.
(Cargo will implicitly allow later semver-compatible versions too.)

@OMGtechy
Copy link
Contributor Author

One more thing, we should require pkg-config = "0.3.15" for the new API call.
(Cargo will implicitly allow later semver-compatible versions too.)

Ah, that explains why I was able to use it without changing the version. Makes sense to actually specify the one we need indeed. Pull request updated!

@cuviper
Copy link
Owner

cuviper commented Mar 21, 2022

Thanks!

@cuviper cuviper merged commit e00d47a into cuviper:master Mar 21, 2022
@OMGtechy OMGtechy deleted the bugfix/target-supported-build-failure branch April 9, 2022 22:30
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.

None yet

2 participants