-
Notifications
You must be signed in to change notification settings - Fork 72
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
Error linking TIFF on Ubuntu #20
Comments
I'm still facing the same problem on Ubuntu 18.04. Any ideas? |
Oookaay, here is my solution for now: In the main CMakeLists.txt I commented out lines 179-189. |
I think this can be fixed by adding this line to
Specifically, the CMake checks don't seem to honor the |
Another option is to pass |
For me this happened because cmake was looking for libtiff using FIND_PACKAGE and found it, but only the variables TIFF_FOUND, TIFF_DIR, TIFF_VERSION were set, the variable TIFF_LIBRARIES was not, but was needed. I actually had to explicitly set the libraries in the |
Yes, the CMake package generated by libtiff upstream does not provide if (NOT TIFF_LIBRARIES AND TARGET TIFF::tiff)
get_property(TIFF_LIBRARIES TARGET TIFF::tiff PROPERTY LOCATION)
# request a `STATIC` library in `try_compile` as dependent libraries are not provided this way?
endif () |
I use libgeotiff 1.5.1 and libtiff 4.0.10.
To build everything I use CMake and make.
TIFF:
cmake -G 'Unix Makefiles' ../../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/nikita/OSG/test_osg/install/libtiff/Release -DZLIB_INCLUDE_DIR=/home/nikita/OSG/test_osg/install/zlib/Release/include/ -DZLIB_LIBRARY_RELEASE=/home/nikita/OSG/test_osg/install/zlib/Release/lib/libz.so -DJPEG_INCLUDE_DIR=/home/nikita/OSG/test_osg/install/libjpeg/Release/include/ -DJPEG_LIBRARY=/home/nikita/OSG/test_osg/install/libjpeg/Release/lib/libjpeg.so
libgeotiff:
cmake -G 'Unix Makefiles' ../../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/nikita/OSG/test_osg/install/libgeotiff/Release -DWITH_UTILITIES=OFF -DWITH_JPEG=ON -DWITH_TIFF=ON -DWITH_ZLIB=ON -DPROJ_INCLUDE_DIR=/home/nikita/OSG/test_osg/install/proj/Release/include/ -DPROJ_LIBRARY=/home/nikita/OSG/test_osg/install/proj/Release/lib/libproj.so -DZLIB_INCLUDE_DIR=/home/nikita/OSG/test_osg/install/zlib/Release/include/ -DZLIB_LIBRARY_RELEASE=/home/nikita/OSG/test_osg/install/zlib/Release/lib/libz.so -DJPEG_INCLUDE_DIR=/home/nikita/OSG/test_osg/install/libjpeg/Release/include/ -DJPEG_LIBRARY=/home/nikita/OSG/test_osg/install/libjpeg/Release/lib/libjpeg.so -DTIFF_INCLUDE_DIR=/home/nikita/OSG/test_osg/install/libtiff/Release/include/ -DTIFF_LIBRARY_RELEASE=/home/nikita/OSG/test_osg/install/libtiff/Release/lib/libtiff.so
And while configuring CMake for geotiff I get the following error:
The same sources on Windows with CMake and MSVC 2015 are built properly with no errors.
The text was updated successfully, but these errors were encountered: