Skip to content

xx-cargo: fix vendor for pkg-config and clang#108

Open
jprendes wants to merge 1 commit intotonistiigi:masterfrom
jprendes:master
Open

xx-cargo: fix vendor for pkg-config and clang#108
jprendes wants to merge 1 commit intotonistiigi:masterfrom
jprendes:master

Conversation

@jprendes
Copy link
Copy Markdown

This should fix #107 .

@tonistiigi
Copy link
Copy Markdown
Owner

Does https://github.com/tonistiigi/xx/pull/90/files#diff-569650ba88094e023d2e66147417439ceeba349a6925868177e4628758830d3e do the same thing or are the functional differences?

This XX_VENDOR, XX_RUSTUP switching is generally a bit of a mess and would need some docs that make the behavior clear in some follow-up.

@thaJeztah
Copy link
Copy Markdown
Contributor

@milas
Copy link
Copy Markdown

milas commented Oct 8, 2023

I ran into this today while trying to build something that uses the openssl-sys crate, which wants to use pkg-config. (Going from amd64 -> aarch64 in my case.)

Swapping to @jprendes fork worked, while #90 did not (the Rust/WASM PR branch fails with "pkg-config has not been configured to support cross-compilation" and has $TARGET = aarch64-unknown-linux-gnu).

@tonistiigi
Copy link
Copy Markdown
Owner

Discussed this with @crazy-max and he will work on a regression test for this. Without regression tests it is very hard for any change in these XX_VENDOR overrides not to break some combination of the triples that clang/rust/pkg-config expect.

@dfunkt
Copy link
Copy Markdown

dfunkt commented Jul 4, 2025

This still appears to be an issue for the openssl-sys crate, has there been any progress in this regard?

@AlexTMjugador
Copy link
Copy Markdown

I just ran into the issue addressed by this PR while cross-compiling the openssl-sys crate, during work on ViViDboarder/vaultwarden_ldap#241.

In that PR, I worked around this issue by invoking xx-cargo after manually setting the PKG_CONFIG environment variable to the value this PR intends:

PKG_CONFIG="$(command -v "$(xx-info)-pkg-config")" xx-cargo build --release

Hopefully, my two cents will help someone, somewhere, with the task of getting their project built 🤞

dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Dec 31, 2025
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
dfunkt added a commit to dfunkt/vaultwarden that referenced this pull request Jan 2, 2026
- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
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.

xx-cargo fails with crates using pkg-config in build scripts

6 participants