-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build failed if -DENABLE_TIFF=ON #3316
Comments
9 out of 10 times reports like these are resolved by installing the Next, you need to include more information. A snippet of error messages is not enough. Include everything you did to get to that stage. You haven't even included the call to CMake that generated this message. In other words: Help us help you. Otherwise this issue won't get much attention. |
Please provide the exact way on how to reproduce this. For example as a set of commands to be executed in a ubuntu:22.04 Docker image. My own attempt work:
|
cmake provided module FindTIFF.cmake do not handle dependencies. it just find libtiff itself. I reoslve this problem by adding my own
|
when I suggest you use |
reproduce steps
following shell code run in the docker container step1. install dependencies apt -y update
apt -y install cmake make g++ curl sqlite3 libsqlite3-dev libcurl4-gnutls-dev step2. export build environment variable export CFLAGS='-fPIC' step3. build cd
curl -LO https://zlib.net/zlib-1.2.12.tar.gz
tar vxf zlib-1.2.12.tar.gz
cd zlib-1.2.12
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$HOME/libz-installed \
-S . \
-B build.d
cmake --build build.d
cmake --install build.d step4. build cd
curl -LO https://tukaani.org/xz/xz-5.2.6.tar.gz
tar vxf xz-5.2.6.tar.gz
cd xz-5.2.6
./configure --prefix=$HOME/liblzma-installed
make
make install step5. build cd
curl -LO https://download.osgeo.org/libtiff/tiff-4.4.0.tar.gz
tar vxf tiff-4.4.0.tar.gz
cd tiff-4.4.0
cmake \
-Dzlib=ON \
-Dzstd=OFF \
-Dlzma=ON \
-Dlzw=OFF \
-Dwebp=OFF \
-Djpeg=OFF \
-Djbig=OFF \
-Dlerc=OFF \
-Dtiff-docs=OFF \
-Dtiff-tools=OFF \
-Dtiff-tests=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_ROOT_PATH="$HOME/libz-installed;$HOME/liblzma-installed" \
-DCMAKE_INSTALL_PREFIX=$HOME/libtiff-installed \
-S . \
-B build.d
cmake --build build.d
cmake --install build.d step6. build cd
curl -LO http://download.osgeo.org/proj/proj-9.1.0.tar.gz
tar xvf proj-9.1.0.tar.gz
cd proj-9.1.0
cmake -S. -B build.d -DCMAKE_FIND_ROOT_PATH=$HOME/libtiff-installed
cmake --build build.d |
Indeed. The same problem exists for Curl. vcpkg patches proj to use targets for both dependencies, and
Please don't. |
CMake: use TIFF:TIFF and CURL::libcurl targets (refs #3316)
I believe this has been fixed with #3374 |
great help tank you!!! |
Well, unfortunately I get the error below |
/~https://github.com/OSGeo/PROJ/releases/download/9.1.0/proj-9.1.0.tar.gz
report error messages:
reason:
it seems that FindTIFF can not find liblzma and libzstd, which is depended by libtiff for some reason.
cat /etc/os-release
The text was updated successfully, but these errors were encountered: