LGFae / swww

A Solution to your Wayland Wallpaper Woes
GNU General Public License v3.0
2.37k stars 70 forks source link

Trying to get it compiled on ARM Linux #102

Closed neofeo closed 6 months ago

neofeo commented 1 year ago

Hi!! I am getting this error: any clue? maybe it's just my vendor kernel....

rock-5b:swww:% cargo build --release                                     <main>

    Updating crates.io index
  Downloaded autocfg v1.1.0
  Downloaded lebe v0.5.2
  Downloaded color_quant v1.1.0
  Downloaded half v2.2.1
  Downloaded jobserver v0.1.25
  Downloaded libloading v0.7.4
  Downloaded log v0.4.17
  Downloaded lock_api v0.4.9
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded crossbeam-channel v0.5.6
  Downloaded xml-rs v0.8.4
  Downloaded terminal_size v0.2.5
  Downloaded termcolor v1.1.3
  Downloaded weezl v0.1.7
  Downloaded wayland-sys v0.29.5
  Downloaded memoffset v0.7.1
  Downloaded nanorand v0.7.0
  Downloaded miniz_oxide v0.6.2
  Downloaded minimal-lexical v0.2.1
  Downloaded num_threads v0.1.6
  Downloaded num-rational v0.4.1
  Downloaded os_str_bytes v6.4.1
  Downloaded pkg-config v0.3.26
  Downloaded proc-macro-error v1.0.4
  Downloaded wayland-protocols v0.29.5
  Downloaded proc-macro2 v1.0.51
  Downloaded strsim v0.10.0
  Downloaded time-core v0.1.0
  Downloaded spin v0.9.5
  Downloaded smallvec v1.10.0
  Downloaded slotmap v1.0.6
  Downloaded scopeguard v1.1.0
  Downloaded scoped_threadpool v0.1.9
  Downloaded num_cpus v1.15.0
  Downloaded png v0.17.7
  Downloaded rand_chacha v0.3.1
  Downloaded ppv-lite86 v0.2.17
  Downloaded pin-project-internal v1.0.12
  Downloaded once_cell v1.17.1
  Downloaded adler v1.0.2
  Downloaded rand_core v0.6.4
  Downloaded clap_lex v0.3.1
  Downloaded downcast-rs v1.2.0
  Downloaded dlib v0.5.0
  Downloaded crossbeam-utils v0.8.14
  Downloaded is-terminal v0.4.3
  Downloaded heck v0.4.1
  Downloaded vec_map v0.8.2
  Downloaded itoa v1.0.5
  Downloaded io-lifetimes v1.0.5
  Downloaded memmap2 v0.5.8
  Downloaded version_check v0.9.4
  Downloaded num-traits v0.2.15
  Downloaded lazy_static v1.4.0
  Downloaded flume v0.10.14
  Downloaded futures-sink v0.3.26
  Downloaded getrandom v0.2.8
  Downloaded libm v0.2.6
  Downloaded either v1.8.1
  Downloaded pin-project v1.0.12
  Downloaded crossbeam-deque v0.8.2
  Downloaded num-integer v0.1.45
  Downloaded mint v0.5.9
  Downloaded clap v4.1.6
  Downloaded futures-core v0.3.26
  Downloaded crossbeam-epoch v0.9.13
  Downloaded crc32fast v1.3.2
  Downloaded cc v1.0.79
  Downloaded cfg-if v1.0.0
  Downloaded byteorder v1.4.3
  Downloaded bitflags v1.3.2
  Downloaded flate2 v1.0.25
  Downloaded xcursor v0.3.4
  Downloaded nom v7.1.3
  Downloaded wayland-scanner v0.29.5
  Downloaded rayon v1.6.1
  Downloaded serde v1.0.152
  Downloaded simplelog v0.12.0
  Downloaded thiserror v1.0.38
  Downloaded serde_derive v1.0.152
  Downloaded smithay-client-toolkit v0.16.0
  Downloaded threadpool v1.8.1
  Downloaded unicode-ident v1.0.6
  Downloaded time v0.3.19
  Downloaded rayon-core v1.10.2
  Downloaded wayland-cursor v0.29.5
  Downloaded memoffset v0.6.5
  Downloaded clap_derive v4.1.0
  Downloaded bit_field v0.10.1
  Downloaded bincode v1.3.3
  Downloaded bytemuck v1.13.0
  Downloaded wayland-client v0.29.5
  Downloaded memchr v2.5.0
  Downloaded thiserror-impl v1.0.38
  Downloaded rand v0.8.5
  Downloaded quote v1.0.23
  Downloaded libc v0.2.139
  Downloaded zune-inflate v0.2.50
  Downloaded calloop v0.10.5
  Downloaded wayland-commons v0.29.5
  Downloaded gif v0.11.4
  Downloaded nix v0.24.3
  Downloaded nix v0.25.1
  Downloaded jpeg-decoder v0.3.0
  Downloaded image v0.24.5
  Downloaded simd-adler32 v0.3.4
  Downloaded keyframe v1.1.1
  Downloaded linux-raw-sys v0.1.4
  Downloaded tiff v0.8.1
  Downloaded time-macros v0.2.7
  Downloaded clap_complete v4.1.2
  Downloaded lzzzz v1.0.4
  Downloaded fast_image_resize v2.5.0
  Downloaded syn v1.0.107
  Downloaded rustix v0.36.8
  Downloaded exr v1.5.3
  Downloaded 116 crates (9.9 MB) in 2.42s (largest was `tiff` at 1.4 MB)
   Compiling libc v0.2.139
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.51
   Compiling unicode-ident v1.0.6
   Compiling quote v1.0.23
   Compiling cfg-if v1.0.0
   Compiling syn v1.0.107
   Compiling version_check v0.9.4
   Compiling bitflags v1.3.2
   Compiling io-lifetimes v1.0.5
   Compiling rustix v0.36.8
   Compiling scopeguard v1.1.0
   Compiling pkg-config v0.3.26
   Compiling memoffset v0.6.5
   Compiling crossbeam-utils v0.8.14
   Compiling memoffset v0.7.1
   Compiling proc-macro-error-attr v1.0.4
   Compiling xml-rs v0.8.4
   Compiling libm v0.2.6
   Compiling serde_derive v1.0.152
   Compiling serde v1.0.152
   Compiling num-traits v0.2.15
   Compiling crossbeam-epoch v0.9.13
   Compiling proc-macro-error v1.0.4
   Compiling wayland-scanner v0.29.5
   Compiling smallvec v1.10.0
   Compiling num_cpus v1.15.0
   Compiling getrandom v0.2.8
   Compiling wayland-sys v0.29.5
   Compiling once_cell v1.17.1
   Compiling jobserver v0.1.25
   Compiling lock_api v0.4.9
   Compiling linux-raw-sys v0.1.4
   Compiling crc32fast v1.3.2
   Compiling heck v0.4.1
   Compiling rayon-core v1.10.2
   Compiling thiserror v1.0.38
   Compiling memchr v2.5.0
   Compiling adler v1.0.2
   Compiling miniz_oxide v0.6.2
   Compiling wayland-client v0.29.5
   Compiling crossbeam-deque v0.8.2
   Compiling cc v1.0.79
   Compiling nix v0.24.3
   Compiling crossbeam-channel v0.5.6
   Compiling futures-core v0.3.26
   Compiling log v0.4.17
   Compiling os_str_bytes v6.4.1
   Compiling clap_lex v0.3.1
   Compiling lzzzz v1.0.4
   Compiling is-terminal v0.4.3
   Compiling num-integer v0.1.45
   Compiling slotmap v1.0.6
   Compiling termcolor v1.1.3
   Compiling either v1.8.1
   Compiling minimal-lexical v0.2.1
   Compiling wayland-commons v0.29.5
   Compiling strsim v0.10.0
   Compiling downcast-rs v1.2.0
   Compiling nom v7.1.3
   Compiling rayon v1.6.1
   Compiling thiserror-impl v1.0.38
   Compiling clap_derive v4.1.0
   Compiling pin-project-internal v1.0.12
   Compiling flate2 v1.0.25
   Compiling pin-project v1.0.12
   Compiling spin v0.9.5
   Compiling clap v4.1.6
   Compiling wayland-protocols v0.29.5
   Compiling nanorand v0.7.0
   Compiling num-rational v0.4.1
   Compiling lazy_static v1.4.0
   Compiling time-core v0.1.0
   Compiling futures-sink v0.3.26
   Compiling simd-adler32 v0.3.4
   Compiling weezl v0.1.7
   Compiling zune-inflate v0.2.50
   Compiling flume v0.10.14
   Compiling time-macros v0.2.7
   Compiling xcursor v0.3.4
   Compiling jpeg-decoder v0.3.0
   Compiling rand_core v0.6.4
   Compiling clap_complete v4.1.2
   Compiling threadpool v1.8.1
   Compiling nix v0.25.1
   Compiling smithay-client-toolkit v0.16.0
   Compiling libloading v0.7.4
   Compiling color_quant v1.1.0
   Compiling bit_field v0.10.1
   Compiling vec_map v0.8.2
   Compiling ppv-lite86 v0.2.17
   Compiling num_threads v0.1.6
   Compiling lebe v0.5.2
   Compiling half v2.2.1
   Compiling itoa v1.0.5
   Compiling time v0.3.19
   Compiling rand_chacha v0.3.1
   Compiling exr v1.5.3
   Compiling bincode v1.3.3
   Compiling gif v0.11.4
   Compiling swww v0.7.2 (/home/salva/DEV/swww)
   Compiling calloop v0.10.5
   Compiling dlib v0.5.0
   Compiling tiff v0.8.1
   Compiling wayland-cursor v0.29.5
   Compiling png v0.17.7
   Compiling terminal_size v0.2.5
   Compiling memmap2 v0.5.8
   Compiling scoped_threadpool v0.1.9
   Compiling mint v0.5.9
   Compiling bytemuck v1.13.0
   Compiling byteorder v1.4.3
   Compiling image v0.24.5
   Compiling keyframe v1.1.1
warning: generated shell completion file: "completions/swww.bash"
warning: generated shell completion file: "completions/_swww"
warning: generated shell completion file: "completions/swww.fish"
warning: generated shell completion file: "completions/swww.elv"
   Compiling simplelog v0.12.0
   Compiling rand v0.8.5
   Compiling fast_image_resize v2.5.0
   Compiling utils v0.1.0 (/home/salva/DEV/swww/utils)
   Compiling swww-daemon v0.1.0 (/home/salva/DEV/swww/daemon)
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x67bb08)[0x7fba14bb08]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7fbd4137d8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0xe89b54)[0x7fb43e9b54]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0xe898c8)[0x7fb43e98c8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x278cac4)[0x7fb5cecac4]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x10cf7fc)[0x7fb462f7fc]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x26c)[0x7fb44d06e8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x3c)[0x7fb44d72c8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x7b4)[0x7fb44d10f0]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x90e9f0)[0x7fba3de9f0]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x88fd38)[0x7fba35fd38]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x89516c)[0x7fba36516c]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x811394)[0x7fba2e1394]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x80c6cc)[0x7fba2dc6cc]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x8b1e38)[0x7fba381e38]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x8b2dd0)[0x7fba382dd0]
/lib/aarch64-linux-gnu/libstd-ad464b9814031709.so(rust_metadata_std_37e3012fa4f8996a+0x78354)[0x7fb9998354]
/lib/aarch64-linux-gnu/libc.so.6(+0x7d5c8)[0x7fb97ed5c8]
/lib/aarch64-linux-gnu/libc.so.6(+0xe5d1c)[0x7fb9855d1c]
The following warnings were emitted during compilation:

warning: generated shell completion file: "completions/swww.bash"
warning: generated shell completion file: "completions/_swww"
warning: generated shell completion file: "completions/swww.fish"
warning: generated shell completion file: "completions/swww.elv"

error: could not compile `swww`

Caused by:
  process didn't exit successfully: `rustc --crate-name swww --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C codegen-units=1 -C debuginfo=0 -C metadata=c38164561f484a37 -C extra-filename=-c38164561f484a37 --out-dir /home/salva/DEV/swww/target/release/deps -C strip=symbols -L dependency=/home/salva/DEV/swww/target/release/deps --extern clap=/home/salva/DEV/swww/target/release/deps/libclap-e5ab822c4b0d8714.rlib --extern fast_image_resize=/home/salva/DEV/swww/target/release/deps/libfast_image_resize-eeebc3626b3e567d.rlib --extern image=/home/salva/DEV/swww/target/release/deps/libimage-acf6a7db9c2290ee.rlib --extern rand=/home/salva/DEV/swww/target/release/deps/librand-282e7581bc413917.rlib --extern utils=/home/salva/DEV/swww/target/release/deps/libutils-e7468b73c292479f.rlib -L native=/home/salva/DEV/swww/target/release/build/lzzzz-db9c269fb9fbcd35/out` (signal: 11, SIGSEGV: invalid memory reference)
rock-5b:swww:%                                                                                                                                                                                                    <rock-5b:swww:% cargo build --release                                                                                                                                                                        <main>

warning: generated shell completion file: "completions/swww.bash"
warning: generated shell completion file: "completions/_swww"
warning: generated shell completion file: "completions/swww.fish"
warning: generated shell completion file: "completions/swww.elv"
   Compiling swww v0.7.2 (/home/salva/DEV/swww)
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x67bb08)[0x7faf77bb08]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7fb2a487d8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0xe89b54)[0x7fa9a19b54]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0xe898c8)[0x7fa9a198c8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x278cac4)[0x7fab31cac4]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(+0x10cf7fc)[0x7fa9c5f7fc]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x26c)[0x7fa9b006e8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x3c)[0x7fa9b072c8]
/lib/aarch64-linux-gnu/libLLVM-14.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x7b4)[0x7fa9b010f0]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x90e9f0)[0x7fafa0e9f0]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x88fd38)[0x7faf98fd38]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x89516c)[0x7faf99516c]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x811394)[0x7faf911394]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x80c6cc)[0x7faf90c6cc]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x8b1e38)[0x7faf9b1e38]
/lib/aarch64-linux-gnu/librustc_driver-21e4007552c15a12.so(+0x8b2dd0)[0x7faf9b2dd0]
/lib/aarch64-linux-gnu/libstd-ad464b9814031709.so(rust_metadata_std_37e3012fa4f8996a+0x78354)[0x7faefc8354]
/lib/aarch64-linux-gnu/libc.so.6(+0x7d5c8)[0x7faee1d5c8]
/lib/aarch64-linux-gnu/libc.so.6(+0xe5d1c)[0x7faee85d1c]
The following warnings were emitted during compilation:

warning: generated shell completion file: "completions/swww.bash"
warning: generated shell completion file: "completions/_swww"
warning: generated shell completion file: "completions/swww.fish"
warning: generated shell completion file: "completions/swww.elv"

error: could not compile `swww`

Caused by:
  process didn't exit successfully: `rustc --crate-name swww --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C codegen-units=1 -C debuginfo=0 -C metadata=c38164561f484a37 -C extra-filename=-c38164561f484a37 --out-dir /home/salva/DEV/swww/target/release/deps -C strip=symbols -L dependency=/home/salva/DEV/swww/target/release/deps --extern clap=/home/salva/DEV/swww/target/release/deps/libclap-e5ab822c4b0d8714.rlib --extern fast_image_resize=/home/salva/DEV/swww/target/release/deps/libfast_image_resize-eeebc3626b3e567d.rlib --extern image=/home/salva/DEV/swww/target/release/deps/libimage-acf6a7db9c2290ee.rlib --extern rand=/home/salva/DEV/swww/target/release/deps/librand-282e7581bc413917.rlib --extern utils=/home/salva/DEV/swww/target/release/deps/libutils-e7468b73c292479f.rlib -L native=/home/salva/DEV/swww/target/release/build/lzzzz-db9c269fb9fbcd35/out` (signal: 11, SIGSEGV: invalid memory reference)
rock-5b:swww:%                                                                                                                                                                                              <m
xbb commented 1 year ago

Maybe you have solved it already but I can cross compile it with cross

Add to Cargo.toml:

[package.metadata.cross.target.aarch64-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes libxkbcommon-dev:arm64"]

And then build with:

cross build --target aarch64-unknown-linux-gnu --release
LGFae commented 6 months ago

I don't really know what could be causing this, and it shouldn't really be a problem with swww directly, since we aren't using any weird inline assembly or anything.

In any case, a lot of things have changed since this was opened. Closing now; if the issue remains, you can feel free to reopen it.