wofferl / proxmox-backup-arm64

Script for building Proxmox Backup Server 3.x (Bookworm) for Armbian64
151 stars 12 forks source link

unresolved import `zstd_sys::ZSTD_strategy` #19

Closed Christoph-Wagner closed 1 year ago

Christoph-Wagner commented 1 year ago

I have another issue now ;)

Compiling proxmox-backup-banner v0.1.0 (/root/proxmox-backup-arm64/sources/proxmox-backup/proxmox-backup-banner)
error[E0432]: unresolved import `zstd_sys::ZSTD_strategy`
  --> /root/proxmox-backup-arm64/sources/proxmox-backup/vendor/zstd-safe/src/lib.rs:31:9
   |
31 | pub use zstd_sys::ZSTD_strategy as Strategy;
   |         ^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^ no `ZSTD_strategy` in the root

[… snipped hundreds of similar lines, see errorlog.txt …]

Some errors have detailed explanations: E0412, E0422, E0425, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `zstd-safe` due to 141 previous errors
make[2]: *** [Makefile:172: .do-cargo-build] Error 101
make[2]: Leaving directory '/root/proxmox-backup-arm64/sources/proxmox-backup'
dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" PROXY_USER=backup LIBDIR=/usr/lib/aarch64-linux-gnu returned exit code 2
make[1]: *** [debian/rules:24: override_dh_auto_build] Error 2
make[1]: Leaving directory '/root/proxmox-backup-arm64/sources/proxmox-backup'
make: *** [debian/rules:18: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

errorlog.txt

While I’m here, as the compilation up to here took over an hour, is there a way not to start the process from the beginning and instead continue where the error happened, if it’s fixable?

MAFLO321 commented 1 year ago

Not 100% sure, but try appending -nc to the dpkg-buildpackage command in the build.sh for debugging propose.

Christoph-Wagner commented 1 year ago

That does indeed work for getting to the error within minutes :) Now I just hope someone knows what actually causes it ;)

wofferl commented 1 year ago

Can you tell me your rust and cargo version, libzstd-dev version (dpkg -s libzstd-dev) and which version of zstd_sys your build has downloaded (look at sources/proxmox-backup/vendor/zstd-sys/Cargo.toml)?

Christoph-Wagner commented 1 year ago

libzstd-dev: Was also missing, installed: 1.4.8+dfsg-3build1 cargo 1.65.0 (4bc8f24d3 2022-10-20) rustc 1.65.0 (897e37553 2022-11-02) zstd-sys: version = "1.4.20+zstd.1.4.9"

The version with -nc still had the same error, so I’m currently running the whole thing without it again. But I feel like I’m missing a bunch of packages, this was the 2nd already. Any other packages that should be installed but for some reason aren’t on my system, I should check for? ;)

edit: Still the same error after running it without -nc

wofferl commented 1 year ago

Thats strange. From the version number there seems no conflict, except libzstd-dev is slightly newer in ubuntu jammy than debian bullseye (Version: 1.4.8+dfsg-3build1 vs 1.4.8+dfsg-2.1). Did you tried this on a clean system (chroot,etc)?

Can you still check if zstd-safe is the same version. My version: name = "zstd-safe" version = "3.0.1+zstd.1.4.9"

Maybe I find some time to build it on a jammy arm64 by myself.

Christoph-Wagner commented 1 year ago

Did you tried this on a clean system (chroot,etc)?

I did nothing on the server than install Armbian and run the scripts ;)

Can you still check if zstd-safe is the same version.

name = "zstd-safe" version = "3.0.1+zstd.1.4.9"

There is nothing else on there, should I simply fresh install Ubuntu Server 22.04.1 for the Pi instead?

wofferl commented 1 year ago

I don't think that the problem is solved, but you can try. I think it would be easier and cleaner to use a chroot environment for building the packages, if you plan to use this pi also for the backup server itself.

Christoph-Wagner commented 1 year ago

Went ahead and did both (fresh jammy server install, chrooted). None of the issues encountered.

Just wondering, do you know how long is this expected to take on a pi4 with only 2 GB memory?

Compiling proxmox-backup v2.3.1 (/proxmox-backup-arm64/sources/proxmox-backup)
  Building [======================>  ] 369/389: pbs-client, proxmox-openid, proxmox-backup, proxmox-rest-server

This has been the state for 5-6 hours by now, and I’m wondering if it’s a slow process, or if it died and isn’t telling me.

wofferl commented 1 year ago

The whole process takes some time. On a VM with 6 cores (i7-4790K CPU @ 4.00GHz) and 8 GB ram the proxmox-backup build uses about 4 1/2 hours. The progress bar looks good. :)

wofferl commented 1 year ago

Did it now work? I was able to compile it myself here on an Ubuntu 22.04.1 LTS (jammy/aarch64), so it shouldn't be a general problem.

Christoph-Wagner commented 1 year ago

Right, yeah, I left it running for 48 hours, but sadly nothing else happened until Ubuntu decided to restart the system for some snap update (wow, Ubuntu has become as crappy as Windows with unwanted behavior).

I decided to use the slightly outdated binaries from the raspberry docker image for now.