poljar / weechat-matrix-rs

Rust rewrite of the python weechat-matrix script.
Other
356 stars 27 forks source link

[placeholder/draft] compiling on & for Slitaz Linux #79

Open jwmh opened 1 year ago

jwmh commented 1 year ago

For those of you who don't know, Slitaz is a Tiny Autonomous Zone linux distro (I don't remember what the Sli is for, but iirc the company's german). The LiveCD/LiveUSB .iso file is ~80mB. (yes, megabytes.) Mind you, this is without firefox -- which easily doubles the iso size. (And firefox, and many items like gcc+, aren't up to date... ) Still, I love it.

Oh... ... it comes with an older version of WEECHAT in its pkg repo:

$ tazpkg info weechat
TazPkg information
Package    : weechat
State      : installed package
Weechat Version    : 2.6
Short desc : A fast, light and extensible chat client.
Maintainer : rocky@slitaz.org
License    : GPL3
Depends    : libgcrypt libgnutls libtasn1 ncursesw perl py3k
Build deps : cmake curl-dev gmp-dev gnutls-dev guile-dev    libgcrypt-dev libtool ncursesw-dev perl pkg-config py3k-dev
Web site   : https://weechat.org/
Size       : 1.2M/5M
Tags       : irc

.

The earlier errors in the build were due to missing libraries / *.so files.

Through some cargo -v build troubleshooting, I managed to fix these.

  1. $ tazpkg -sp [filename that cargo says is missing]

  2. $ sudo tazpkg --get --install [a package containing that .so file]

  3. find several additional slitaz-native packages to install (from the slitaz repo);

  4. copy/link the .so / library files, as needed, to /usr/local/ (so that cargo build can see+use them easily)

This got me up to nearly 100% compiling... ... (390 / 394 total!)

But it's alas now failing with libclang.so and libLLVM

error: failed to run custom build command for `weechat-sys v0.4.0 (https://github.com/poljar/rust-weechat#8209460a)`

Caused by:
  process didn't exit successfully: `/home/tux/Downloads/matrix-weechat/weechat-src/weechat-matrix-rs-main/target/debug/build/weechat-sys-39b5e463110f9ea4/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib/libclang.so could not be opened: /usr/lib/libclang.so: undefined symbol: _ZN4llvm3sys9TimeValue20PosixZeroTimeSecondsE"', /home/tux/.cargo/registry/src/github.com-1285ae84e5963aae/bindgen-0.58.1/src/lib.rs:2057:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Searching for those (libclang, and libllvm) in here finds me two issues:

The latter (#19) seems more relevant in outright technical detail.

I guess there are issues with the versions of libclang and libllvm?

(BTW, libclang is downloaded for slitaz solely in the android-build-tools pkg, v19.0.3, path:

Search result for file "libclang"
Package android-build-tools:
 /opt/android-sdk/build-tools/19.0.3/libclang.so
1 file

and libLLVM returns it in the same path:

$ tazpkg -sf libLLVM
Search result for file "libLLVM"

Package android-build-tools:
 /opt/android-sdk/build-tools/19.0.3/libLLVM.so

after I copied the latter into /usr/local/, i no longer had the 'libLLVM.so' NOT FOUND error, but instead now have:

--- stderr
  thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib/libclang.so could not be opened: /usr/lib/libclang.so: undefined symbol: _ZN4llvm3sys9TimeValue20PosixZeroTimeSecondsE"', /home/tux/.cargo/registry/src/github.com-1285ae84e5963aae/bindgen-0.58.1/src/lib.rs:2057:31
jwmh commented 1 year ago
_At some point I'd also had to install
 (either automatically as a dependency, or directly as one of the following in the list)..._
- bash (slitaz uses `ash` by default, as it's lighter-weight)
- cacerts
- curl
- git
- unzip
- libdb
- gdbm
- perl
- readline
- rust
- tcl
- rust-cargo
- tk
- py3k
- weechat
- giflib
- icedtea6
- java-jre
- android-sdk
- android-build-tools
- m4
- bison
- flex
- glibc-locale
- glibc-dev
- glibc
- binutils
- linux-api-headers
- libgomp
- libobjc
- mpfr
- mpc-library
- gcc
- make
- elfkickers
- slitaz-toolchain
- libssh
- pkg-config
- libssh-dev
- libssh2
- libssh2-dev
- bc
- ncursesw-dev
- ncurses-dev
- ncurses-extra
- patch
- python
- lz4-lib
- xxhash-lib
- zstd
- rsync
- xz
- tar
- wget
- libQtcore, ...Gui,..Network,..Xml,..Svg,..Script,..Designer,..
- QtDesigner
- libpthread-stubs
- mesa
- libglu-mesa
- libunixODBC
- freetds
- libmysqlclient
- libboost-system,..-chrono,..-date-time
- libpostgresqlclient
- libQtSql,..3Support,..Clucene,..DBus,..Webkit,..OpenGL,..ScriptTools,..Test,..Help,..Plugins
- qtconfig
- Qt4-dev
- buildroot
- nspr
- spidermonkey
- gpm
- elinks
- pkg-config
- libcrypto-dev
- openssl-dev
- llvm
- util-linux-whereis