Closed Arnold1 closed 9 years ago
i set the following env variable:
export PKG_CONFIG_PATH=/home/Arnold/Qt5.4.2/5.4/gcc_64/lib/pkgconfig
after that i get this error:
src/lib.rs:59:1: 59:10 error: The attribute `packed` is currently unknown to the compiler and may have meaning added to it in the future
src/lib.rs:59 #[packed]
^~~~~~~~~
src/lib.rs:59:1: 59:10 help: add #![feature(custom_attribute)] to the crate attributes to enable
error: aborting due to previous error
Could not compile `qmlrs`.
than i added the following at the top of src/lib.rs:
#![feature(custom_attribute)]
this results in the following error, any idea how to fix it?
s$ cargo build --verbose
Fresh libc v0.1.8
Fresh pkg-config v0.3.4 (https://github.com/alexcrichton/pkg-config-rs#9c3ba519)
Compiling qmlrs v0.0.1 (file:///home/Arnold/qmlrs)
Running `/home/Arnold/qmlrs/target/debug/build/qmlrs-0a6bb7a1b746b935/build-script-build`
Running `rustc src/lib.rs --crate-name qmlrs --crate-type lib -g --out-dir /home/Arnold/qmlrs/target/debug --emit=dep-info,link -L dependency=/home/Arnold/qmlrs/target/debug -L dependency=/home/Arnold/qmlrs/target/debug/deps --extern libc=/home/Arnold/qmlrs/target/debug/deps/liblibc-ef5cbad4ef5c7a1e.rlib -L native=/home/Arnold/qmlrs/ext/libqmlrswrapper/build -L native=/home/Arnold/Qt5.4.2/5.4/gcc_64/lib -l static=qmlrswrapper -l dylib=stdc++ -l Qt5Quick -l Qt5Gui -l Qt5Qml -l Qt5Network -l Qt5Core`
src/lib.rs:61:1: 61:10 warning: unused attribute, #[warn(unused_attributes)] on by default
src/lib.rs:61 #[packed]
^~~~~~~~~
error: could not find native static library `qmlrswrapper`, perhaps an -L flag is missing?
Could not compile `qmlrs`.
Caused by:
Process didn't exit successfully: `rustc src/lib.rs --crate-name qmlrs --crate-type lib -g --out-dir /home/Arnold/qmlrs/target/debug --emit=dep-info,link -L dependency=/home/Arnold/qmlrs/target/debug -L dependency=/home/Arnold/qmlrs/target/debug/deps --extern libc=/home/Arnold/qmlrs/target/debug/deps/liblibc-ef5cbad4ef5c7a1e.rlib -L native=/home/Arnold/qmlrs/ext/libqmlrswrapper/build -L native=/home/Arnold/Qt5.4.2/5.4/gcc_64/lib -l static=qmlrswrapper -l dylib=stdc++ -l Qt5Quick -l Qt5Gui -l Qt5Qml -l Qt5Network -l Qt5Core` (exit code: 101)
Make sure you've installed all relevant Qt packages (I do not use ubuntu, but you should be able to compile other Qt/QML projects examples from source). And if you use Rust stable, you do not need "#![feature(custom_attribute)]".
I think this issue is safe to be closed.
Cheers, Ismail
i installed: http://download.qt.io/official_releases/qt/5.4/5.4.2/qt-opensource-linux-x64-5.4.2.run this also includes qml... any idea?
Nope no idea. And this problem is not related to this project at all, but on howto install packages on ubuntu. Ask someone on the ubuntu forums etc. They have a wonderful and helpful community.
cc: @cyndis Please close this issue.
Cheers, Ismail
what package is missing to be installed? this is not clear from the compile error...
You are funny, I can only repeat myself: "this problem is not related to this project at all, but on howto install packages on ubuntu. Ask someone on the ubuntu forums etc. " Obviously, you won't get any help here.
Have a look here for instance https://askubuntu.com/ and consult you favorite search engine before.
i dont talk to you funny monkey! if you are not able to give useful error messages than its related to your project.
Are you talking to me? ;-)
Nope, it is not the task of a compiler to tell you which ubuntu packages you need to install. You could easily search for that yourself. And after that, you could help others and contribute to this project by adding it to the documentation.
Besides that: Your last two error messages aren't even related to missing packages. But as I've already told you they are related to using rust nightly. If you use Rust stable they'll disappear.
Sorry, for the harsh tone and good luck to you (probably on askubuntu.com) and besides that: it is not my project, I was just trying to help
fixed, here the solution: 1.) download and install qt from here: http://download.qt.io/official_releases/qt/5.4/5.4.2/qt-opensource-linux-x64-5.4.2.run 2.) set CMAKE_PREFIX_PATH to make cmake happy $ export CMAKE_PREFIX_PATH=/home/Arnold/Qt5.4.2/5.4/gcc_64 3.) install opengl $ sudo apt-get install libglu1-mesa-dev 4.) set LD_LIBRARY_PATH so that it finds libicui18n.so.53 and stuff $ export LD_LIBRARY_PATH=/home/Arnold/Qt5.4.2/5.4/gcc_64/lib/
can you add those to the doc? with friendly greets from Arnold!?
Had the same issue, same resolution with minor changes for local environment and qt version. I agree this should be part of the documentation. This issue is related to this project as it has to do with dependency installation. The associated environment variable changes are not part of standard ubuntu package installation, and the project error message is quasi-tangential to this solution.
Note: If Qt is installed from source rather than using the installer like this the solution is probably different as well.
On Ubuntu 16.04 with stock Qt5 install, you only need to install a few non-default packages:
sudo apt install qt5-qmake qtdeclarative5-dev qtquick1-5-dev qml-module-qtquick-controls
On Ubuntu 16.04 with stock Qt5 install, you only need to install a few non-default packages:
sudo apt install qt5-qmake qtdeclarative5-dev qtquick1-5-dev qml-module-qtquick-controls
It would be nice to add this to the README, so people can get started quickly.
hi,
i use ubuntu with rustc 1.2.0-nightly (764877650 2015-06-12) and qt: http://download.qt.io/official_releases/qt/5.4/5.4.2/qt-opensource-linux-x64-5.4.2.run any idea what is missing causing the build to fail?