Comments (7)
Duplicate of #12, fixed by installing mingw-w64-x86_64-pkg-config
or mingw-w64-i686-pkg-config
instead of pkg-config
.
from pkg-config-rs.
$ echo $PKG_CONFIG_PATH
/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
Thanks for the pointer @gkoz, it seems like pkg-config looks only within /mingw64/share/pkgconfig
Changing the order of the two $PKG_CONFIG_PATH
entries "fixes" the immediate problem for me.
PKG_CONFIG_PATH=/mingw64/share/pkgconfig:/mingw64/lib/pkgconfig
from pkg-config-rs.
Hm I wonder if perhaps $PKG_CONFIG_PATH
was different at build time and in the shell? I don't think this does anything strange with respect to paths...
from pkg-config-rs.
I don't think $PKG_CONFIG_PATH
was different - it is set in .bash_profile
. I tried cargo build
and the corresponding pkg-config
call again just to make sure, and I get the same error with cargo build
while the plain pkg-config
still works.
Sam@sam-laptop MSYS /d/dev/Rust/src/gtk_test
$ echo $PKG_CONFIG_PATH
/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/mingw64/lib/pkgconfig
Sam@sam-laptop MSYS /d/dev/Rust/src/gtk_test
$ cargo build
Compiling cairo-sys-rs v0.3.0
Compiling glib-sys v0.3.0
Build failed, waiting for other jobs to finish...
failed to run custom build command for `cairo-sys-rs v0.3.0`
Process didn't exit successfully: `D:\dev\Rust\src\gtk_test\target\debug\build\cairo-sys-rs-45a32580d0558aa8\build-script-build` (exit code: 1)
--- stderr
`"pkg-config" "--libs" "--cflags" "cairo >= 1.10"` did not exit successfully: exit code: 1
--- stdout
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
Sam@sam-laptop MSYS /d/dev/Rust/src/gtk_test
$ pkg-config --libs --cflags "glib-2.0 >= 2.32"
-mms-bitfields -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -L/mingw64/lib -lglib-2.0 -lintl -pthread -lws2_32 -lole32 -lwinmm -lshlwapi -lintl
Sam@sam-laptop MSYS /d/dev/Rust/src/gtk_test
$ pkg-config --libs --cflags "cairo >= 1.10"
-mms-bitfields -I/mingw64/include/cairo -I/mingw64/include/pixman-1 -I/mingw64/include -I/mingw64/include/freetype2 -I/mingw64/include/libpng16 -I/mingw64/include/harfbuzz -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include -I/mingw64/include/freetype2 -I/mingw64/include -I/mingw64/include/harfbuzz -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include/libpng16 -L/mingw64/lib -LC:/building/msys64/mingw64/lib/../lib -L/mingw64/lib -lcairo -lz -lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -liconv -lexpat -lfreetype -lz -lbz2 -lharfbuzz -lglib-2.0 -lintl -pthread -lws2_32 -lole32 -lwinmm -lshlwapi -lintl -lpng16 -lz
from pkg-config-rs.
Hm can you try building a Rust program that just does something like:
Command::new("pkg-config").arg("--libs").arg("--cflags").arg("cairo >= 1.10").status();
and see what happens? If that works I'd be surprised, but may help isolate the problem.
from pkg-config-rs.
@Tenebryo you can use procmon to find out where exactly pkg-config
is looking for the .pc
files.
from pkg-config-rs.
Sounds like this wasn't a bug with this crate, so closing.
from pkg-config-rs.
Related Issues (20)
- Should we parse -isystem Cflags? HOT 2
- customized pkg-config is incomplete? HOT 1
- Bug: Missing support for `pkgconf` for Fedora HOT 3
- v0.3.21 raised MSRV to 1.47.0 HOT 4
- Placing pkg-config.exe file to this git if possible HOT 3
- Libraries linked in incorrect order HOT 3
- Incorrect parse result for raw archive path HOT 3
- [Feature Request] Add configurable linking modifiers HOT 6
- `PKG_CONFIG_PATH_FOR_BUILD` env var HOT 4
- Allow disabling pkg-config altogether HOT 7
- static-nobundle option
- Unable to correctly identify a type of Windows static library name, such as `foo.lib` HOT 7
- Cargo build say "library name must not be empty" while using statik(true) HOT 4
- fails with pkgconf 2.0.0 breaking changes HOT 1
- Cannot link static libraries on Windows MinGW because the Libs.private flags are ignored
- Reduce -L flag pollution by resolving -L -l flags to on-disk files
- Rustdoc docs are missing information about environment variables present in README HOT 2
- Cannot link statically against `alsa` library HOT 2
- Add tag for 0.3.30 release? HOT 2
- Never pick up strawberry perl's pkg-config as a valid pkg-config HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pkg-config-rs.