Make sure a fresh SFDK installation can follow instructions to compile Whisperfish
I tried to install sfdk + patched rust-1.52 to another laptop of mine, and I wasn't able to get Whisperfish compiled successfully. The packages get installed, and the compilation starts, but it fails:
error[E0463]: can't find crate for `std`
error[E0463]: can't find crate for `core`
The flow has worked like this:
- Install sfdk
- Compile the example application (optional)
- Install Rust following steps in README
- Compile Whisperfish ( ← this fails )
The existing setup I have works, and I can do QML-only work on any computer, but this effectively blocks newcomers from joining the workforce (unless they utilize CI, which takes quite a long time to finish). Luckily, CI/CD is intact for now, due to the way they are set up.
Here's the full log of an failed attempt:
sfdk -c target=SailfishOS-4.4.0.58-aarch64 build
NOTICE: Using the 'SailfishOS-4.4.0.58-aarch64.default' snapshot of the build target
Setting version: 0.6.0.beta.12+fix.some.bugs.20221112091931.a67efe06
sh: release: command not found
Loading repository data...
Reading installed packages...
'coreutils' not found in package names. Trying capabilities.
'gnu-coreutils' providing 'coreutils' is already installed.
'automake' is already installed.
No update candidate for 'automake-1.16.1+git1-1.6.13.jolla.noarch'. The highest available version is already installed.
'zlib-devel' is already installed.
No update candidate for 'zlib-devel-1.2.11+git1-1.6.15.jolla.aarch64'. The highest available version is already installed.
'gcc-c++' is already installed.
No update candidate for 'gcc-c++-8.3.0-1.7.13.jolla.aarch64'. The highest available version is already installed.
'git' is already installed.
No update candidate for 'git-2.26.2+git1-1.2.2.jolla.aarch64'. The highest available version is already installed.
'openssl-devel' is already installed.
No update candidate for 'openssl-devel-1.1.1l+git1-1.10.17.jolla.aarch64'. The highest available version is already installed.
'rust' is already installed.
No update candidate for 'rust-1.61.0+git1-1.aarch64'. The highest available version is already installed.
'tcl' is already installed.
No update candidate for 'tcl-8.5.8-1.6.1.jolla.aarch64'. The highest available version is already installed.
'cargo' is already installed.
No update candidate for 'cargo-1.61.0+git1-1.aarch64'. The highest available version is already installed.
'meego-rpm-config' is already installed.
No update candidate for 'meego-rpm-config-0.18-1.7.1.jolla.noarch'. The highest available version is already installed.
'rust-std-static' not found in package names. Trying capabilities.
'rust-std-static-aarch64-unknown-linux-gnu' providing 'rust-std-static' is already installed.
'dbus-devel' is already installed.
No update candidate for 'dbus-devel-1.13.12+git6-1.6.10.jolla.aarch64'. The highest available version is already installed.
'nemo-qml-plugin-notifications-qt5-devel' is already installed.
No update candidate for 'nemo-qml-plugin-notifications-qt5-devel-1.2.16-1.8.2.jolla.aarch64'. The highest available version is already installed.
'protobuf-compiler' is already installed.
No update candidate for 'protobuf-compiler-3.18.0+git1-1.7.1.jolla.aarch64'. The highest available version is already installed.
'qtmozembed-qt5-devel' is already installed.
No update candidate for 'qtmozembed-qt5-devel-1.53.20-1.31.5.jolla.aarch64'. The highest available version is already installed.
'qt5-qtwebsockets-devel' is already installed.
No update candidate for 'qt5-qtwebsockets-devel-5.5.1-1.6.1.jolla.aarch64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
sh: release: command not found
Building target platforms: aarch64-meego-linux-gnu
Building for target aarch64-meego-linux-gnu
sh: release: command not found
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.VMWcfT
+ umask 022
+ cd /home/matti/SFOS/whisperfish
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ LD_AS_NEEDED=1
+ export LD_AS_NEEDED
+ rustc --version
rustc 1.52.1-dev
+ cargo --version
cargo 1.52.0-dev
+ export SB2_RUST_TARGET_TRIPLE=aarch64-unknown-linux-gnu
+ SB2_RUST_TARGET_TRIPLE=aarch64-unknown-linux-gnu
+ export 'CFLAGS_aarch64_unknown_linux_gnu=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a'
+ CFLAGS_aarch64_unknown_linux_gnu='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a'
+ export 'CXXFLAGS_aarch64_unknown_linux_gnu=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a'
+ CXXFLAGS_aarch64_unknown_linux_gnu='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -march=armv8-a'
+ export 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0'
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0'
+ export 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0'
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0'
+ export HOST_CC=host-cc
+ HOST_CC=host-cc
+ export HOST_CXX=host-cxx
+ HOST_CXX=host-cxx
+ export CC_i686_unknown_linux_gnu=host-cc
+ CC_i686_unknown_linux_gnu=host-cc
+ export CXX_i686_unknown_linux_gnu=host-cxx
+ CXX_i686_unknown_linux_gnu=host-cxx
+ export PATH=/opt/cross/bin/:/home/mersdk/.mb2/wrappers/whisperfish:/home/mersdk/.mb2/user-wrappers/whisperfish:/usr/local/bin:/bin:/usr/bin
+ PATH=/opt/cross/bin/:/home/mersdk/.mb2/wrappers/whisperfish:/home/mersdk/.mb2/user-wrappers/whisperfish:/usr/local/bin:/bin:/usr/bin
+ export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=armv7hl-meego-linux-gnueabi-gcc
+ CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=armv7hl-meego-linux-gnueabi-gcc
+ export CC_armv7_unknown_linux_gnueabihf=armv7hl-meego-linux-gnueabi-gcc
+ CC_armv7_unknown_linux_gnueabihf=armv7hl-meego-linux-gnueabi-gcc
+ export CXX_armv7_unknown_linux_gnueabihf=armv7hl-meego-linux-gnueabi-g++
+ CXX_armv7_unknown_linux_gnueabihf=armv7hl-meego-linux-gnueabi-g++
+ export AR_armv7_unknown_linux_gnueabihf=armv7hl-meego-linux-gnueabi-ar
+ AR_armv7_unknown_linux_gnueabihf=armv7hl-meego-linux-gnueabi-ar
+ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-meego-linux-gnu-gcc
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-meego-linux-gnu-gcc
+ export CC_aarch64_unknown_linux_gnu=aarch64-meego-linux-gnu-gcc
+ CC_aarch64_unknown_linux_gnu=aarch64-meego-linux-gnu-gcc
+ export CXX_aarch64_unknown_linux_gnu=aarch64-meego-linux-gnu-g++
+ CXX_aarch64_unknown_linux_gnu=aarch64-meego-linux-gnu-g++
+ export AR_aarch64_unknown_linux_gnu=aarch64-meego-linux-gnu-ar
+ AR_aarch64_unknown_linux_gnu=aarch64-meego-linux-gnu-ar
+ export PKG_CONFIG_ALLOW_CROSS_i686_unknown_linux_gnu=1
+ PKG_CONFIG_ALLOW_CROSS_i686_unknown_linux_gnu=1
+ export PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf=1
+ PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf=1
+ export PKG_CONFIG_ALLOW_CROSS_aarch64_unknown_linux_gnu=1
+ PKG_CONFIG_ALLOW_CROSS_aarch64_unknown_linux_gnu=1
+ FEATURES=sailfish
+ export RUSTFLAGS=
+ RUSTFLAGS=
++ git describe --exclude release,tag --dirty=-dirty
+ export GIT_VERSION=v0.6.0-beta.12-83-g234db82c-dirty
+ GIT_VERSION=v0.6.0-beta.12-83-g234db82c-dirty
+ cat /home/matti/SFOS/whisperfish/rpm/../Cargo.toml
cargo-features = ["strip"]
[package]
name = "harbour-whisperfish"
version = "0.6.0-dev"
authors = ["Ruben De Smet <ruben.de.smet@rubdos.be>"]
edition = "2018"
build = "build.rs"
license = "AGPL-3.0-or-later"
description = "Private messaging using Signal for SailfishOS."
[[bench]]
name = "storage"
harness = false
[dependencies]
async-trait = "0.1"
bincode = "1.2.1"
actix = "0.12"
rand = "0.7"
parking_lot = "0.12"
dbus = "0.9"
uuid = { version = "1", features=["v4"] }
mime = "0.3.16"
mime_guess = "2.0"
mime_classifier = "0.0.1"
actix-rt = "2.7.0"
chrono = "0.4"
tokio = { version="1.17.0", features=["time", "io-util", "net", "sync"] }
futures = "0.3"
fs_extra = "1.2.0"
# 1.9.1 requires Rust 2021
indexmap = "=1.8.1"
# 3.0.0-rc.1 requires Rist 1.54
actix-http = "=3.0.0-beta.19"
libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", branch = "master" }
libsignal-service-actix = { git = "https://github.com/whisperfish/libsignal-service-rs", branch = "master" }
libsignal-protocol = { git = "https://github.com/signalapp/libsignal", tag = "v0.20.0" }
zkgroup = { git = "https://github.com/signalapp/libsignal", tag = "v0.20.0" }
# Newer versions break MSRV in patch version
proc-macro2 = "=1.0.26"
quote = "=1.0.10"
# Newer versions don't compile with Rust 1.52 (nightly-2021-05-06),
# which is what Sailfish SDK 3.9.3 (4.4.0.58) comes with
# Due to that, we need to pin the sha2 and sha-1 versions too.
pbkdf2 = { version = "=0.9.0", default-features = false }
hmac = "=0.11"
sha2 = "=0.9"
sha-1 = "=0.9"
aes = "0.7"
block-modes = "0.8"
qttypes = "=0.2.6"
qmetaobject = { version = "=0.2.5" }
qmeta-async = { git = "https://gitlab.com/rubdos/qmeta-async.git" }
time = "=0.3.5"
scrypt = { version = "=0.8.1", default-features = false, features=["std"] }
getrandom = "0.2"
cpp = "0.5"
dirs = "4.0"
anyhow = "1.0"
thiserror = "1"
log = "0.4"
env_logger = "0.9"
single-instance = "0.3.3"
hex = "0.4"
phonenumber = "0.3"
itertools = "0.10.3"
qrcode = "0.12"
image = { version = "0.23", default-features = false, features=["png"] }
# Diesel 2.0.0 should fix the Clippy lint failure;
# please see .gitlab.ci.yml for details.
diesel = { version = "1.4", features = ["sqlite", "chrono"] }
diesel_migrations = "1.4"
libsqlite3-sys = { version = "0.22.2", features = ["sqlcipher"] }
serde = {version = "1.0", features = ["derive"]}
# Serde 0.8.26 requires Rust 1.56 (aka edition 2021)
serde_yaml = "=0.8.25"
base64 = "0.13"
prost = "0.9"
tempdir = "0.3"
structopt = "0.3"
rpassword = "5.0"
secrecy = "0.7"
regex = "1.5"
sailors = { git = "https://gitlab.com/whisperfish/sailo-rs.git", optional = true }
[build-dependencies]
cpp_build = "0.5"
cc = "1.0"
anyhow = "1.0"
prost-build = "0.9"
[dev-dependencies]
# Git version for async tests. 0.6.5 will contain this feature,
# so revert to crates.io on release
criterion = "0.3"
rstest = { version = "0.10" }
rstest_reuse = { version = "0.1.0" }
# Smart dev mode: Compile most stuff in release mode, except for the things
# that are actually maintained by our community
[profile.dev.package."*"]
opt-level = 3
[profile.dev.package.libsignal-protocol]
opt-level = 0
[profile.dev.package.libsignal-service]
opt-level = 0
[profile.dev.package.libsignal-service-actix]
opt-level = 0
[profile.dev.package.qmetaobject]
opt-level = 0
[profile.release]
# This flag is set in CI using CARGO_PROFILE_RELEASE_LTO=thin
# lto = "thin"
debug = true
[features]
bundled-sqlcipher = ["libsqlite3-sys/bundled-sqlcipher"]
sailfish = ["bundled-sqlcipher", "sailors", "libsignal-protocol/whisperfork", "zkgroup/whisperfork"]
harbour = ["sailfish"]
[patch."https://github.com/signalapp/libsignal"]
libsignal-protocol = { git = "https://gitlab.com/whisperfish/libsignal-client", branch = "whisperfork" }
zkgroup = { git = "https://gitlab.com/whisperfish/libsignal-client", branch = "whisperfork" }
# [patch.crates-io]
# qmetaobject = { path="../qmetaobject-rs/qmetaobject" }
[patch.crates-io]
curve25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', branch = 'lizard2' }
libsqlite3-sys = { git = "https://github.com/rusqlite/rusqlite", rev = "8770e7d4433de942122d37f073dd80519a8d67c0" }
# [patch."https://github.com/whisperfish/libsignal-service-rs"]
# libsignal-service = { path = "/home/rsmet/src/libsignal-service-rs/libsignal-service" }
# libsignal-service-actix = { path = "/home/rsmet/src/libsignal-service-rs/libsignal-service-actix/" }
+ BINS='--bin harbour-whisperfish'
+ '[' -z '' ']'
++ grep VERSION_ID /etc/sailfish-release
++ cut -d = -f2
+ TARGET_VERSION=4.4.0.58
++ echo 4.4.0.58
++ awk -F. '{print $1 FS $2}'
+ MAJOR_VERSION=4.4
+ cargo build -j 1 --release --no-default-features --bin harbour-whisperfish --features sailfish --manifest-path /home/matti/SFOS/whisperfish/rpm/../Cargo.toml
Compiling libc v0.2.126
error[E0463]: can't find crate for `std`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
Compiling proc-macro2 v1.0.26
error[E0463]: can't find crate for `std`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
Compiling unicode-xid v0.2.3
error: could not compile `libc`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `core`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: build failed
error: Bad exit status from /var/tmp/rpm-tmp.VMWcfT (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.VMWcfT (%build)