Package Details: whitebox-tools 2.4.0-1

Git Clone URL: https://aur.archlinux.org/whitebox-tools.git (read-only, click to copy)
Package Base: whitebox-tools
Description: WhiteboxTools is an advanced geospatial data analysis platform developed by Prof. John Lindsay
Upstream URL: https://www.whiteboxgeo.com/
Licenses: MIT
Submitter: geosam
Maintainer: geosam
Last Packager: geosam
Votes: 3
Popularity: 0.000000
First Submitted: 2019-11-06 18:06 (UTC)
Last Updated: 2025-03-28 03:50 (UTC)

Latest Comments

hadallen commented on 2025-07-18 22:43 (UTC)

for some reason this appears to be missing some tools after building. I tried to run the IndividualTreeDetection tool, and it was missing. However if I get the pre-built version from https://www.whiteboxgeo.com/, it works as expected. not sure what's going on since it is building fine. I'll try building with the build.py script that is included and see if there are differences

geosam commented on 2025-03-28 03:55 (UTC)

Thanks @bcb

bcb commented on 2024-04-28 10:20 (UTC) (edited on 2024-04-28 10:26 (UTC) by bcb)

When trying to build this in a clean chroot, I had the following problems:

  • cmake needs to be in makedepends

  • The packages fontconfig, at-spi2-core and gtk3 are needed to build. They do not seem to be linked into the final binary so I think they can go into makedepends.

  • The install function hard-codes the Python path. This means it does not install to the correct place for the system Python (currently 3.12, PKGBUILD is hard-coded to 3.9). As per https://wiki.archlinux.org/title/Python_package_guidelines#Using_site-packages please update to get the correct path during install.

Additionally, the following changes should be made:

  • For an MIT-licensed package, a specific license needs to be placed in /usr/share/licenses/whitebox-tools, see https://wiki.archlinux.org/title/PKGBUILD#license

  • Currently, the source file is downloaded as v2.3.0.tar.gz; the general recommendation is to use a more specific name like whitebox-tools-v2.3.0.tar.gz

The following diff takes care of all this and can be applied by copying it to a file and running git apply <filename>

Edit: if you have trouble applying the patch it might be due to whitespace errors when copying. I have also uploaded a copy to https://0x0.st/XHYF.diff

diff --git a/PKGBUILD b/PKGBUILD
index 9ba3046..40dac9f 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@

 pkgname=whitebox-tools
 pkgver=2.3.0
-pkgrel=1
+pkgrel=2
 pkgdesc="WhiteboxTools is an advanced geospatial data analysis platform developed by Prof. John Lindsay"
 arch=(i686 x86_64)
 url="https://www.whiteboxgeo.com/"
 license=('MIT')
-makedepends=('rust')
+makedepends=('rust' 'cmake' 'fontconfig' 'at-spi2-core' 'gtk3')
 depends=('python')
-source=("https://github.com/jblindsay/whitebox-tools/archive/v${pkgver}.tar.gz")
+source=("whitebox-tools-v${pkgver}.tar.gz::https://github.com/jblindsay/whitebox-tools/archive/v${pkgver}.tar.gz")
    sha256sums=('295698debe203b6b61092d267e8e57021bb61941422a5432cd830b3ba2cd5ee8')

 build() {
@@ -22,8 +22,10 @@ build() {
 package() {
     cd "${pkgname}-${pkgver}"

-    mkdir -p "${pkgdir}"/{usr/bin,usr/lib/python3.9/site-packages}
     install -D -m755 "target/release/whitebox_tools" "${pkgdir}/usr/bin/whitebox_tools"
-    install -D -m755 "whitebox_tools.py" "${pkgdir}/usr/lib/python3.9/site-packages/whitebox_tools.py"
-    install -D -m755 "wb_runner.py" "${pkgdir}/usr/lib/python3.9/site-packages/wb_runner.py"
+    install -D -m644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+    local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+    install -D -m755 "whitebox_tools.py" "${pkgdir}/${site_packages}/whitebox_tools.py"
+    install -D -m755 "wb_runner.py" "${pkgdir}/${site_packages}/wb_runner.py"
 }

gds506 commented on 2023-10-14 14:56 (UTC)

Got error when building:

==> Validating source files with sha256sums...
    v2.3.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting v2.3.0.tar.gz with bsdtar
==> Starting build()...
error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
==> ERROR: A failure occurred in build().
    Aborting...

giswqs commented on 2020-01-12 03:03 (UTC)

Compiling error:

Compiling statrs v0.9.0 error[E0502]: cannot borrow *curr as immutable because curr.right is also borrowed as mutable --> /home/qiusheng/.cargo/registry/src/github.com-1ecc6299db9ec823/kdtree-0.6.0/src/kdtree.rs:457:20 | 457 | while !curr.is_leaf() { | ^^^^ immutable borrow occurs here ... 460 | candidate = curr.right.as_mut().unwrap(); | ---------- mutable borrow occurs here ... 483 | } | - mutable borrow ends here

...

error: aborting due to 8 previous errors

Some errors occurred: E0499, E0502, E0506. For more information about an error, try rustc --explain E0499. error: Could not compile kdtree. warning: build failed, waiting for other jobs to finish... error: failed to compile whitebox_tools v1.1.0 (/var/tmp/pamac-build-qiusheng/whitebox-tools/src/whitebox-tools-1.1.0), intermediate artifacts can be found at /var/tmp/pamac-build-qiusheng/whitebox-tools/src/whitebox-tools-1.1.0/target