jblindsay / whitebox-tools

An advanced geospatial data analysis platform
https://www.whiteboxgeo.com/
MIT License
946 stars 161 forks source link

/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./whitebox_tools) #112

Closed eccc-Antoine closed 4 years ago

eccc-Antoine commented 4 years ago

Hi,

I just downloaded and installed the new WTB linux release and installed Python module via with pip.

When I try to run a simple tool such as slope within a Python script :

from WBT.whitebox_tools import WhiteboxTools wbt = WhiteboxTools()

dem='/fs/site4/eccc/oth/nhs/ama007/LAKES/Veg_model_preprocess/hub/LKE/8SPP/processing/slopes/TIF/8SPP_GRID_32617_IGLD85_masked_proj.tif'

slope='/fs/site4/eccc/oth/nhs/ama007/LAKES/Veg_model_preprocess/hub/LKE/8SPP/processing/slopes/TIF/slope.tif'

wbt.slope( dem, slope, zfactor=1.0)

or in a command:

cmd=f'/fs/site4/eccc/oth/nhs/ama007/apps/.conda/envs/py36/lib/python3.6/site-packages/WBT/whitebox_tools --run="Slope" --dem={dem} --output={slope} --zfactor=1.0 --units=degrees -v'

os.system(cmd)

I get the following error message: ./whitebox_tools: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./whitebox_tools)

Please note that before that I had some permission issues with the same commands which got solved by changing the WBT folder attributes

Thanks for your great work!

jblindsay commented 4 years ago

WhiteboxTools is generally compiled in a way where it makes a static binary that contains all of the necessary libraries. The one notable exception is the Libc, which is present in some form or another on all systems. However, this isn't to say that all systems have the same version and if a computer contains an older version, then WhiteboxTools will not work as expected. I compile the linux version of the WhiteboxTools binary using Ubuntu 20.04. It looks like you have a version of Linux that uses an older version of GLIBC than is available on Ubuntu 20.04. One relatively easy fix for this is to compile WhiteboxTools from source code for your system. There are instructions for how to compile from source, found here. This is actually quite a simple process, particularly on linux systems. Alternatively, you may wish to try one of the older releases of WhiteboxTools, which would have been compiled on an older version of Ubuntu and may work for your version.

eccc-Antoine commented 4 years ago

Great, thanks for the quick answer.

Le ven. 28 août 2020, à 16 h 11, John Lindsay notifications@github.com a écrit :

Closed #112 https://github.com/jblindsay/whitebox-tools/issues/112.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jblindsay/whitebox-tools/issues/112#event-3705484702, or unsubscribe https://github.com/notifications/unsubscribe-auth/APW5WMNS56XOZLWN2TWMGZTSDAFQFANCNFSM4QOO5OWA .

giswqs commented 4 years ago

I noticed that Google Coab is still using Ubuntu 18.04.3 LTS, which also has the GLIBC_2.29 error when running whitebox. I have recompiled WBT from source using Ubuntu 18.04.3 LTS. The binary can be downloaded from here. You can also install whitebox-python using the following command:

pip install git+https://github.com/giswqs/whitebox

eccc-Antoine commented 4 years ago

Wow, that worked like a charm, thanks a lot, greatly appreciated!

Antoine

Le ven. 28 août 2020 18 h 23, Qiusheng Wu notifications@github.com a écrit :

I noticed that Google Coab https://colab.research.google.com/ is still using Ubuntu 18.04.3 LTS, which also has the GLIBC_2.29 error when running whitebox. I have recompiled WBT from source using Ubuntu 18.04.3 LTS. The binary can be downloaded from here https://spatial.utk.edu/download/software/WhiteboxTools_linux_amd64.tar.xz. You can also install whitebox-python https://github.com/giswqs/whitebox-python using the following command:

pip install git+https://github.com/giswqs/whitebox

https://camo.githubusercontent.com/49cc0ef4aa478af816087b8c8c3586ff12214f22/68747470733a2f2f692e696d6775722e636f6d2f456f424c5a72582e676966

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jblindsay/whitebox-tools/issues/112#issuecomment-683171873, or unsubscribe https://github.com/notifications/unsubscribe-auth/APW5WMN6JRUSKKKKLWVVNK3SDAU73ANCNFSM4QOO5OWA .

mogd001 commented 3 years ago

Hi there,

I am still running into the error raised by Antoine. I have tried using Google Colab and a docker image (using tensorflow/tensorflow as the base image), both yield the same error message. In both cases I am installing whitebox as per
giswqs command above.

./whitebox_tools: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./whitebox_tools) 0

I note that the below suggests that glibc_2.29 no longer exists? https://askubuntu.com/questions/1143268/how-to-install-a-libc6-version-2-29

Any help would be greatly appreciated, I would love to get this library to work inside a docker container.
M

giswqs commented 3 years ago

Try https://githubtocolab.com/giswqs/whiteboxgui/blob/master/examples/examples.ipynb

mogd001 commented 3 years ago

Thanks for the quick reply! I am still getting the same error (see image)...

I would prefer to use the tools with the functions (opposed to the GUI, but imagine its using the same underlying whitebox library). e.g. wbt.feature_preserving_smoothing("Merged_DEM.tif","smoothed.tif", filter=9)

error_image

giswqs commented 3 years ago

Looks like Colab is using GLIBC 2.27 while WhiteboxTools requires GLIBC_2.29. In this case, you might have to build WhiteboxTools from source using GLIBC 2.27. See the notebook below.

https://colab.research.google.com/drive/15j_qNjrjuW-l1eYC19DZRHYbA8jKz4Vg?usp=sharing

mogd001 commented 3 years ago

Thanks again, that notebook example doesn't have the build from source? Are you able to provide code that achieves this. M

Current docker file: FROM tensorflow/tensorflow

RUN apt-get update RUN apt-get install build-essential -y RUN apt update RUN apt install -y git

RUN pip3 install --no-cache --upgrade pip

COPY requirements.txt /tmp/pip-tmp/ RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt

RUN pip3 install git+https://github.com/giswqs/whitebox

ARG DEBIAN_FRONTEND=noninteractive ENV TZ=Pacific/Auckland RUN apt-get install -y python3-tk

RUN python3 -c 'import whitebox' RUN rm -rf /tmp/pip-tmp

giswqs commented 3 years ago

Try out whitebox v1.4.0. It should work with GLIBC 2.27. Check out the updated Colab notebook below. If you change your docker file to RUN pip3 install whitebox==1.4.0, it should work as well.

https://colab.research.google.com/drive/15j_qNjrjuW-l1eYC19DZRHYbA8jKz4Vg?usp=sharing

mogd001 commented 3 years ago

Brilliant thanks!