Problems compiling PBS v3.3.2

Lephisto

Well-Known Member
Jun 22, 2019
177
18
58
47
Hello,

since the thread patch that adresses this https://forum.proxmox.com/threads/low-zfs-read-performance-disk-tape.139494/ still didn't make it upstream I am forced to maintain my own patched Version of PBS, so I have to build my own debian packages. I usually take a clean bookworm vm for this and follow this: https://git.proxmox.com/?p=proxmox-backup.git;a=blob_plain;f=README.rst;hb=HEAD

Still I have to manually adjust some things because the patch at https://lists.proxmox.com/pipermail/pbs-devel/2024-April/009162.html doesn't apply cleanly anymore. However, when trying to "make deb" I get:

Code:
root@promox-build:~/proxmox-backup# make deb
rm -rf build
mkdir build
git rev-parse HEAD > build/.repoid
cp -a debian \
  Cargo.toml src \
  pbs-api-types pbs-buildcfg pbs-client pbs-datastore pbs-config pbs-key-config pbs-tools pbs-fuse-loop pbs-pxar-fuse pbs-tape proxmox-backup-banner proxmox-backup-client proxmox-file-restore proxmox-restore-daemon pxar-bin \
  docs etc examples tests www zsh-completions templates \
  defines.mk Makefile \
  ./build/
rm -f build/Cargo.lock
find build/debian -name "*.hint" -delete
make -C build/etc clean ;  make -C build/www clean ;  make -C build/docs clean ;  make -C build/templates clean ;
make[1]: Entering directory '/root/proxmox-backup/build/etc'
rm -f proxmox-backup-banner.service proxmox-backup-daily-update.service proxmox-backup.service proxmox-backup-proxy.service
make[1]: Leaving directory '/root/proxmox-backup/build/etc'
make[1]: Entering directory '/root/proxmox-backup/build/www'
find . -name '*~' -exec rm {} ';'
rm -rf js .lint-incremental
make[1]: Leaving directory '/root/proxmox-backup/build/www'
make[1]: Entering directory '/root/proxmox-backup/build/docs'
rm -r -f *~ *.1 output config/acl/roles.rst config/datastore/config.rst config/domains/config.rst config/media-pool/config.rst config/notifications-priv/config.rst config/notifications/config.rst config/remote/config.rst config/sync/config.rst config/tape-job/config.rst config/tape/config.rst config/user/config.rst config/verification/config.rst pmt/synopsis.rst pmtx/synopsis.rst proxmox-backup-client/catalog-shell-synopsis.rst proxmox-backup-client/synopsis.rst proxmox-backup-debug/synopsis.rst proxmox-backup-manager/synopsis.rst proxmox-file-restore/synopsis.rst proxmox-tape/synopsis.rst pxar/synopsis.rst  api-viewer/apidata.js
rm -f api-viewer/apidoc.js lto-barcode/lto-barcode-generator.js prune-simulator/prune-simulator.js
make[1]: Leaving directory '/root/proxmox-backup/build/docs'
make[1]: Entering directory '/root/proxmox-backup/build/templates'
make[1]: Nothing to be done for 'clean'.
make[1]: Leaving directory '/root/proxmox-backup/build/templates'
cd build; dpkg-buildpackage -b -us -uc
dpkg-buildpackage: info: source package rust-proxmox-backup
dpkg-buildpackage: info: source version 3.3.2-1
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by Proxmox Support Team <support@proxmox.com>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: librust-proxmox-schema-3+api-macro-dev librust-proxmox-schema-3+default-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
make: *** [Makefile:123: deb] Error 3

Can somebody help me out? I am not a pro when it comes to rust and it's toolchains.
 
Last edited:
Hey,

did you apt-get build-dep .?
 
Hi Hannes,

yeah:

Code:
root@promox-build:~/proxmox-backup# apt-get build-dep .
Note, using directory '.' to get the build dependencies
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:. : Depends: librust-proxmox-schema-3+api-macro-dev
               Depends: librust-proxmox-schema-3+default-dev
E: Unable to correct problems, you have held broken packages.
 
your git checkout is outdated, please pull..
 
Yeah well I am forced to checkout v3.3.2 because in the current master the patch won't apply at all because pbs-api-types is missing.

Code:
root@promox-build:~/proxmox-backup# patch -p1 <../pbs.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
|index 31767417a..2ad2ae063 100644
|--- a/pbs-api-types/src/datastore.rs
|+++ b/pbs-api-types/src/datastore.rs
--------------------------

really, without this patch LTO9 isn't usable with PBS, because its too slow.
 
then you need to manually downgrade all the dependencies to match the repo state you have. or port the patch forward to apply again
 
Yeah i tried that: checked out v3.3.2, then I get:

Code:
Preparing to unpack rust-proxmox-backup-build-deps_3.3.2-1_all.deb ...
Unpacking rust-proxmox-backup-build-deps (3.3.2-1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) rust-proxmox-backup-build-deps:amd64 < 3.3.2-1 @iU K Nb Ib >
Broken rust-proxmox-backup-build-deps:amd64 Depends on librust-bitflags-2+default-dev:amd64 < none @un H > (>= 2.4-~~)
  Removing rust-proxmox-backup-build-deps:amd64 because I can't find librust-bitflags-2+default-dev:amd64
Done
 Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done

Somehow the build-deps package doesn't resolve anymore. How can I fix this?
 
you need to manually downgrade each build dependency it complains about ("apt install librust-XXX-dev=VERSION") and anything that might require to be downgraded in turn.

I am not sure what the current plans regarding that patch are - @dcsapak ?
 
Without the Patch it's simply not usable for 100's of TB to backup, so it would really be nice to have this patch and not be forced to patch manually.
 
Thanks for the ping, since the planned queuing system takes seemingly longer than I expected, I'll see that i send a variation of the patch again. I'll probably make the worker count configurable on the tape-backup job instead though, so you'd have to adapt your config then.
i'll ping this thread when i sent a new patch
 
FYI: i sent a new version of the patch today: https://lore.proxmox.com/pbs-devel/20250221150631.3791658-1-d.csapak@proxmox.com/

it now also includes the 'proxmox' repository (where we store most of our crates) so you'd have to build the pbs-api-types crate first there with

Code:
make pbs-api-types-deb
install that and then compile proxmox-backup

if you get this working and it still works as intended, it would be great if you could reply on the pbs-devel list with a 'works' or 'tested-by' :)
 
  • Like
Reactions: Johannes S
I just found the time to dig into the Topic again, but this time there's another broken dependency, when trying to compile the latest PBS on a Debian Bookworm.

Code:
root@promox-build:~/proxmox-backup# mk-build-deps -ir
dpkg-buildpackage: info: source package rust-proxmox-backup-build-deps
dpkg-buildpackage: info: source version 3.3.4-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator <root@promox-build.fan>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 debian/rules clean
dh clean
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   create-stamp debian/debhelper-build-stamp
   dh_prep
   dh_auto_install --destdir=debian/rust-proxmox-backup-build-deps/
   dh_install
   dh_installdocs
   dh_installchangelogs
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_missing
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'rust-proxmox-backup-build-deps' in '../rust-proxmox-backup-build-deps_3.3.4-1_all.deb'.
 dpkg-genbuildinfo --build=binary -O../rust-proxmox-backup-build-deps_3.3.4-1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../rust-proxmox-backup-build-deps_3.3.4-1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
(Reading database ... 69606 files and directories currently installed.)
Preparing to unpack rust-proxmox-backup-build-deps_3.3.4-1_all.deb ...
Unpacking rust-proxmox-backup-build-deps (3.3.4-1) over (3.3.4-1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) rust-proxmox-backup-build-deps:amd64 < 3.3.4-1 @iU K Nb Ib >
Broken rust-proxmox-backup-build-deps:amd64 Depends on librust-env-logger-0.11+default-dev:amd64 < none @un H >
  Removing rust-proxmox-backup-build-deps:amd64 because I can't find librust-env-logger-0.11+default-dev:amd64
Done
 Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages were automatically installed and are no longer required:
  libgit2-1.5 libhttp-parser2.9 libstd-rust-1.63 linux-image-6.1.0-29-amd64
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  rust-proxmox-backup-build-deps
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 10.2 kB disk space will be freed.
Do you want to continue? [Y/n]

Can someone help me out?
 
should work now!
 
Do you have a CI pipeline?

//btw: it's building now. fingers crossed. :)
 
Last edited:
yes, but it runs against an internal staging repository, and the public one sometimes lags behind a bit while the master git branch is visible instantly.
 
FYI: i sent a new version of the patch today: https://lore.proxmox.com/pbs-devel/20250221150631.3791658-1-d.csapak@proxmox.com/

it now also includes the 'proxmox' repository (where we store most of our crates) so you'd have to build the pbs-api-types crate first there with

Code:
make pbs-api-types-deb
install that and then compile proxmox-backup

if you get this working and it still works as intended, it would be great if you could reply on the pbs-devel list with a 'works' or 'tested-by' :)

I have it running now. I removed the old tuning params from the datastore.cfg. How are the worker-threads defined now?
 
it's now defined on the tape backup job.