installation procedure openJpeg

309 views
Skip to first unread message

Resnow

unread,
Jul 18, 2018, 5:50:03 AM7/18/18
to OpenJPEG
Hi,

I have lot of difficulties for installing OpenJpeg on my Centos 7 machine.
I am trying to follow this procedure : https://wiki.orfeo-toolbox.org/index.php/JPEG2000_with_GDAL_OpenJpeg_plugin  in order to use a python script which needs Gdal and OpenJpeg.

I downloaded OpenJpeg from this link : https://github.com/uclouvain/openjpeg/releases/tag/v2.3.0

on the wiki.orfeo-toolbox page, It is written "

Once you have finished the configure step of CMake, run :

make
make install



here are the commands i used for the configuration

tar xvf /path/to/openjpeg-v2.3.0-linux-x86_64.tar.gz
cd openjpeg
-v2.3.0-linux-x86_64
sudo
./configure

but the outpout of the last command is :
sudo: ./configure: command not found


I also tried the steps described here : https://github.com/uclouvain/openjpeg/blob/master/INSTALL.md
but I don't really understand where i have to create the "build" folder and there is no reference to the OpenJpeg package dowloaded ...

Please Help me, I missed something ?

thanks a lot for your help.

szuk...@arcor.de

unread,
Jul 18, 2018, 9:26:06 AM7/18/18
to OpenJPEG
Resnow,

first you must have installed the CMAKE program. Try 'cmake --version' to test whether it exists
on your system.

If not, you must download it from


Calling 'configure' is useless, because CMAKE does not know 'configure'.
You can use the following shell script 'cmake-openjpeg.sh' for a test installation:

```
#!/bin/sh
cmake -DBUILD_DOC:bool=off -DBUILD_PKGCONFIG_FILES:bool=on -DCMAKE_BUILD_TYPE:string="Release"  -DBUILD_JAVA:bool=off
-DBUILD_SHARED_LIBS:bool=on -DCMAKE_INSTALL_PREFIX=/usr/local/opj2 ..

If you have a '/usr/lib64' directory you should add '-DOPENJPEG_INSTALL_LIB_DIR=lib64'

```

1. tar xvf openjpeg-xyz.tar.gz
2. cd openjpeg-xyz
3. mkdir BUILD
4. cp FROM_ANYWHERE/cmake-openjpeg.sh .
5. cd BUILD
6. cp ../cmake-openjpeg.sh .
7. ./cmake-openjpeg.sh
8. In case there is no error:
    make
9. In case there is no error:
    make install 1> installed.to

Then you can inspect '/usr/local/opj2' to see what has been installed.

Usually you can find in the LIB/LIB64 directory a 'pkgconfig' directory.


CMAKE does NOT know the command 'make uninstall'. Therefore you
you should either use a separate directory e.g. '/usr/local/opj2' ; or inspect
the file 'installed.to'.

I have a slackware64 system. So I use the directory '/usr/local/opj2' and have
added the line '/usr/local/opj2/lib64' in the file '/etc/ld.so.conf'.

winfried

szuk...@arcor.de

unread,
Jul 18, 2018, 9:41:52 AM7/18/18
to OpenJPEG
Resnow,

I have missed something.

The archive 'openjpeg-v2.3.0-linux-x86_64.tar.gz' is NOT a source archive. It is compiled archive:
```
szukw000: tar xvf openjpeg-v2.3.0-linux-x86_64.tar.gz

openjpeg-v2.3.0-linux-x86_64/lib/libopenjp2.so
openjpeg-v2.3.0-linux-x86_64/lib/pkgconfig/libopenjp2.pc
openjpeg-v2.3.0-linux-x86_64/lib/libopenjp2.a
openjpeg-v2.3.0-linux-x86_64/lib/openjpeg-2.3/OpenJPEGConfig.cmake
openjpeg-v2.3.0-linux-x86_64/lib/openjpeg-2.3/OpenJPEGTargets.cmake
openjpeg-v2.3.0-linux-x86_64/lib/openjpeg-2.3/OpenJPEGTargets-release.cmake
openjpeg-v2.3.0-linux-x86_64/lib/libopenjp2.so.2.3.0
openjpeg-v2.3.0-linux-x86_64/lib/libopenjp2.so.7
openjpeg-v2.3.0-linux-x86_64/bin/opj_dump
openjpeg-v2.3.0-linux-x86_64/bin/opj_compress
openjpeg-v2.3.0-linux-x86_64/bin/opj_decompress
openjpeg-v2.3.0-linux-x86_64/include/openjpeg-2.3/opj_stdint.h
openjpeg-v2.3.0-linux-x86_64/include/openjpeg-2.3/opj_config.h
openjpeg-v2.3.0-linux-x86_64/include/openjpeg-2.3/openjpeg.h
 ```

If you want to use a source archive you must download 'openjpeg-v2.3.0.tar.gz'.
Then and only then you should follow the above mentioned advices.

winfried

Resnow

unread,
Jul 18, 2018, 10:22:59 AM7/18/18
to OpenJPEG
Hi, 
many thanks for this precise answer. I don't have acces to my Linux machine until monday, but i will follow your instruction and will give you a feedback (positive or nagative).

Thanks
Message has been deleted
Message has been deleted

Resnow

unread,
Jul 25, 2018, 8:40:46 AM7/25/18
to OpenJPEG
winfried,

I finally managed to install OpenJpeg !
I hed some new difficulties but your advices really helped me to understand the different steps.

thanks a lot.
Reply all
Reply to author
Forward
0 new messages