Issue
I'm running Red Hat 8, and I'm trying to install gdal 3.0.4 on it.
The commands I've excuted thus far:
wget http://download.osgeo.org/gdal/3.0.4/gdal-3.0.4.tar.gz
tar zxvf gdal-3.0.4.tar.gz
cd gdal-3.0.4
./configure
sudo make install
After I run sudo make install
, I get the following error messages:
path/to/gdal-3.0.4/.libs/libgdal.so: undefined reference to `jpeg_CreateDecompress_12`
path/to/gdal-3.0.4/.libs/libgdal.so: undefined reference to `jpeg_write_tables_12`
path/to/gdal-3.0.4/.libs/libgdal.so: undefined reference to `jpeg_start_decompress_12`
...
It continues on like this for some amount of lines all starting with jpeg
and ending with 12
and different words in between. It finally ends with:
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:82: gdalinfo] Error 1
make: *** [GNUmakefile:112: apps-target] Error 2
I'm not sure what to do or what this error even means. If anyone has any ideas, or if there is anymore information I can share, let me know.
Solution
After running my commands, if you run
sudo make clean
./configure --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-jpeg12
sudo make install
Then my error cleared up. Of course, I suspect one would need the right libjpeg packages installed as well. I may have had them installed beforehand so it's something to keep in mind.
https://trac.osgeo.org/gdal/wiki/TIFF12BitJPEG
The above link was extremely useful in solving this issue.
Answered By - drizzle123 Answer Checked By - Marie Seifert (WPSolving Admin)