Skip to content

How to provide missing build dependencies #8

@PetrGlad

Description

@PetrGlad

// I'd prefer to edit a Wiki page for that but that does not seem to work. Maybe extending README would be an option. So I am documenting it here for now.

During build with QT enabled cargo may complain about Qt modules missing, e.g.:

--- stderr
thread 'main' panicked at 'QT5 was not found using pkg-config: `"pkg-config" "--libs" "--cflags" "Qt5Core Qt5Gui Qt5Qml Qt5Quick Qt5Svg"` did not exit successfully: exit code: 1
--- stderr
Package Qt5Svg was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Svg.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Svg' found
', /home/petr/.cargo/git/checkouts/qml-rust-717654f352823f1d/3316f54/build.rs:119:23
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Here, in Debian-like Linuxes you should install libqt5svg5-dev package.

Generally if you see "Perhaps you should add the directory containing Qt5Svg.pc " you can look up the package containing that file with apt-file like

apt-file search Qt5Svg.pc

And install a package that provides the file. Normally there's only choice and it is one of Qt5's -dev packages.
Note that apt-file is not installed in Ubuntu by default. If you do not have it yet then sudo apt install apt-file; sudo apt update.

This answer on AskUbuntu provided hints on apt-file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions