Code Monkey home page Code Monkey logo

Comments (7)

henninglive avatar henninglive commented on September 17, 2024 4

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.

mitaa avatar mitaa commented on September 17, 2024 2
$ 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.

alexcrichton avatar alexcrichton commented on September 17, 2024

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.

Tenebryo avatar Tenebryo commented on September 17, 2024

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.

alexcrichton avatar alexcrichton commented on September 17, 2024

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.

gkoz avatar gkoz commented on September 17, 2024

@Tenebryo you can use procmon to find out where exactly pkg-config is looking for the .pc files.

from pkg-config-rs.

alexcrichton avatar alexcrichton commented on September 17, 2024

Sounds like this wasn't a bug with this crate, so closing.

from pkg-config-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.