Flutter doctor did not show any issues. What could be wrong?
executing: flutter run -d linux
Shows the following:
CMake Error at /snap/flutter/81/usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler
"/snap/flutter/current/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/work/AndroidStudioProjects/myapp/build/linux/x64/debug/CMakeFiles/CMakeTmp
Run Build Command:"/snap/flutter/current/usr/bin/ninja" "cmTC_0475b"
[1/2] Building CXX object CMakeFiles/cmTC_0475b.dir/testCXXCompiler.cxx.o
[2/2] Linking CXX executable cmTC_0475b
FAILED: cmTC_0475b
: && /snap/flutter/current/usr/bin/clang++ -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/8 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -lblkid -lgcrypt -llzma -lpthread -L/snap/flutter/current/usr/lib/ -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/8 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -lblkid -lgcrypt -llzma -lpthread -L/snap/flutter/current/usr/lib/ CMakeFiles/cmTC_0475b.dir/testCXXCompiler.cxx.o -o cmTC_0475b && :
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libgcrypt.so: undefined reference to `gpgrt_get_syscall_clamp#GPG_ERROR_1.0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)
In Linux Mint 20.2 Cinnamon with Flutter 2.5.2 and snap 2.51.7
I fixed by doing
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
flutter clean
flutter run -d linux
There is an issue with snap version of Flutter (https://snapcraft.io/flutter) April 15th 2021 release.
The solution is to do a manual install (https://flutter.dev/docs/get-started/install/linux#install-flutter-manually)
I had the same issue on ubuntu 22.04 use the flutter documentation for building and releasing linux app and install snapcraft here https://docs.flutter.dev/deployment/linux
Related
I'm getting this error on Manjaro when trying to run cmake .. in a folder:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
cmake version 3.25.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
I've installed cmake through sudo pamac install base-devel and I normally use clion, pointing to /usr/bin/cmake instead of the bundled cmake. I've tried using export CMAKE_ROOT=/usr/share/cmake as well as export CMAKE_ROOT=/usr/bin/cmake and sourcing my bashrc file and it still shows the same error. I've uninstalled cmake and reinstalled it, and still no-go. I've tried to run the command using /usr/bin/cmake and it doesn't work.
As I understand, Cinnamon repository uses Meson as a build system. I'm using WSL to build it from sources, in the hope that I will get a bootable disc image (like an ISO). I had to manually install some requirements as needed when running meson build at the root of the repository. The Cinnamon repository doesn't have any guide on how to build the repository.
When I run meson build, right now I'm stuck with the dependency cjs-1.0. I've ran sudo apt install cjs. I've googled and nothing unfortunately. What else can I consider?
The Meson build system
Version: 0.53.2
Source dir: /home/matheus/cinnamon
Build dir: /home/matheus/cinnamon/build
Build type: native build
Project name: Cinnamon
Project version: 5.4.11
C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the host machine: cc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency dbus-1 found: YES 1.12.16
Found CMake: /usr/bin/cmake (3.16.3)
Run-time dependency cjs-1.0 found: NO (tried pkgconfig and cmake)
meson.build:24:0: ERROR: Dependency "cjs-1.0" not found, tried pkgconfig and cmake
It should be available after installing libcjs-dev package:
$ sudo apt install libcjs-dev
...
$ pkg-config --list-all | grep cjs
cjs-1.0 cjs-1.0 - Cinnamon JS bindings for GObjects
I have installed mcrypt on my apple m1 chip using a brew and pecl
$ which mcrypt
/opt/homebrew/bin/mcrypt
$ pecl list
Installed packages, channel pecl.php.net:
=========================================
Package Version State
mcrypt 1.0.4 stable
However, when I build my personal Rust project locally, it fails to link libraries as follows. Is there some configuration that I am doing wrong or is there a parameter that I need to specify during the build?
= note: ld: library not found for -lmcrypt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Cargo version
cargo -V
cargo 1.60.0 (d1fd9fe2c 2022-03-01)
ld -v
#(#)PROGRAM:ld PROJECT:ld64-762
BUILD 06:28:58 Feb 18 2022
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 13.1.6, (clang-1316.0.21.2) (static support for 28, runtime is 28)
TAPI support using: Apple TAPI version 13.1.6 (tapi-1316.0.7.3)
sw_vers
ProductName: macOS
ProductVersion: 12.3.1
BuildVersion: 21E258
I solved this issue.
Just needed to export the $LIBRARY_PATH explicitly by typing:
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/opt/mcrypt/lib/
I am developing my Rust project on Ubuntu 20.04.2 LTS 64bit. I have setup the project to compile for the host architecture (using cargo build) and to cross-compile for the target archicture of ARM 64bit (using cargo build --target=aarch64-unknown-linux-gnu). The project has been cross-compiling fine up until now. On the target hardware platform there are serial ports that the application will be interacting with so I have added the Serial Port crate to my project. The project still compiles fine for the Ubuntu host architecture but I can no longer get it to cross-compile for the aarch64 taget.
I have added the target to rustup:
$ rustup target list
...
aarch64-fuchsia
aarch64-linux-android
aarch64-pc-windows-msvc
aarch64-unknown-linux-gnu (installed)
aarch64-unknown-linux-musl
aarch64-unknown-none
aarch64-unknown-none-softfloat
...
And I have installed the toolchain to rustup:
$ rustup toolchain list
stable-aarch64-unknown-linux-gnu
stable-x86_64-unknown-linux-gnu (default)
When I run the cargo build command of cargo build --target=aarch64-unknown-linux-gnu I get the following error during compiling:
$ cargo build --target=aarch64-unknown-linux-gnu
Compiling libudev-sys v0.1.4
error: failed to run custom build command for `libudev-sys v0.1.4`
Caused by:
process didn't exit successfully: `/mnt/hgfs/trunk/src/application/target/debug/build/libudev-sys-c6234f1891f55461/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=LIBUDEV_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "pkg-config has not been configured to support cross-compilation.\n\n Install a sysroot for the target platform and configure it via\n PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\n cross-compiling wrapper for pkg-config and set it via\n PKG_CONFIG environment variable."', /home/nocker/.cargo/registry/src/github.com-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
I have installed pkg-config and libudev-dev. From the terminal I can get this output to confirm that pkg-config is installed:
$ pkg-config --version
0.29.1
but when I try to check that libudev is installed I get an error response:
$ libudev
libudev: command not found
$ libudev-dev
libudev-dev: command not found
When I try to install libudev again I get:
$ sudo apt install libudev-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libudev-dev is already the newest version (245.4-4ubuntu3.4).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
When I try to install libudev-sys I get:
$ sudo apt install libudev-sys
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libudev-sys
I'm suspecting the reason that I cannot cross-compile is because of libudev but cannot figure this out. I have been trying to research how to solve this issue for a few days now but no luck with a solution. Any assistance or direction will be greatly appreciated. TIA.
If you are not dependent on some extra features you can disable the default libudev feature. Adapt the Cargo.toml this way:
serialport = {version = "4.0.1", default-features = false}
See also the description here: https://crates.io/crates/serialport
Otherwise you have to install a sysroot or wrapper. But I was not able to figure out how to do this (the solution above works fine for me). The error message I got is a little bit more meaningful:
pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via PKG_CONFIG
environment variable.
This is the first time for me to install sqliteman on Linux , I faced the following error and I don't know how to solve it , any ideas ?
root#kali:~# cmake --version
cmake version 2.8.9
root#kali:~# qmake --version
QMake version 2.01a
Using Qt version 4.8.2 in /usr/lib/i386-linux-gnu
root#kali:~# cd ~/mydownloads/sqliteman-1.2.2
root#kali:~/mydownloads/sqliteman-1.2.2# cmake .
-- Sqliteman 1.2.2 will be installed into /usr/local
-- *** Release build (use -DWANT_DEBUG=1 for debug one) ***
-- Qt4version:4.8.2
-- Qt4includes:/usr/include/qt4/QtDesigner/usr/include/qt4/QtDeclarative/usr/include/qt4/QtScriptTools/usr/include/qt4/QtDBus/usr/include/qt4/QtDesigner/usr/include/qt4/QtXml/usr/include/qt4/QtSql/usr/include/qt4/QtOpenGL/usr/include/qt4/QtNetwork/usr/include/qt4/QtXmlPatterns/usr/include/qt4/QtWebKit/usr/include/qt4/QtHelp/usr/include/qt4/QtUiTools/usr/include/qt4/QtTest/usr/include/qt4/QtScript/usr/include/qt4/QtSvg/usr/include/qt4/Qt3Support/usr/include/qt4/QtGui/usr/include/qt4/QtCore/usr/share/qt4/mkspecs/default/usr/include/qt4/usr/include/qt4/QtCore
-- Qt4libs:/usr/lib/i386-linux-gnu
CMake Error at cmake/modules/FindQScintilla.cmake:53 (MESSAGE):
Could not find QScintilla library
Call Stack (most recent call first):
CMakeLists.txt:132 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
What I found for Ubuntu Trusty 14.04 is to install all qscintilla2 packages as in here:
http://www.ubuntuupdates.org/package/core/trusty/main/base/qscintilla2
then it works.
In this case your friend is apt-get:
sudo apt-get install libqscintilla2-12v5