iron261 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

OPJViewer fails to build #213

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.install openjpeg-2.0.0 or openjpeg-readonly svn sources
2.configure with BUILD_VIEWER=ON
3.make

What is the expected output? What do you see instead?
I expect that the libraries and binaries will be build, including OPJViewer.
Instead I get build error messages:

[ 44%] Built target openjp2
[ 46%] Built target t1_generate_luts
[ 58%] Built target opj_compress
[ 69%] Built target opj_decompress
[ 81%] Built target opj_dump
[ 83%] Building CXX object 
src/bin/wx/OPJViewer/CMakeFiles/opjviewer.dir/source/imagjpeg2000.cpp.o
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
: In memberfunctie ‘virtual bool wxJPEG2000Handler::LoadFile(wxImage*, 
wxInputStream&, bool, int)’:
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:672:2: fout: ‘opj_event_mgr_t’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:672:18: fout: expected ‘;’ before ‘event_mgr’
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:693:2: fout: ‘opj_dinfo_t’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:693:15: fout: ‘dinfo’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:694:2: fout: ‘opj_cio_t’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:694:13: fout: ‘cio’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:697:10: fout: ‘event_mgr’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:726:33: fout: ‘CODEC_JP2’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:728:33: fout: ‘CODEC_J2K’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:775:21: fout: ‘opj_common_ptr’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:775:61: fout: ‘opj_set_event_mgr’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:782:38: fout: expected ‘)’ before ‘dinfo’
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:782:92: fout: ‘opj_cio_open’ was not declared in this scope
/home/joep/Build/openjpeg-read-only/src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
:784:38: fout: expected ‘)’ before ‘dinfo’
.... MORE ...

What version of the product are you using? On what operating system?

This happens on Ubuntu 12.04 + openjpeg-2.0.0 or svn.

Please provide any additional information below.

Original issue reported on code.google.com by joep.w.j...@gmail.com on 15 Mar 2013 at 3:52

GoogleCodeExporter commented 9 years ago
The OPJViewer program must fail in the TRUNK: is has been copied from the
BRANCH to the TRUNK; and nothing more.

E.g. the 'opj_dinfo_t' structure or 'opj_cio_open()' are part of the BRANCH,
not the TRUNK.

I have tried to run the BRANCH-viewer on SLACKWARE Linux: it fails. This 
should perhaps be the same on UBUNTU. But if you want to try yourself:
download the openjpeg-branch15 from SVN, compile and run it.

winfried

Original comment by szukw...@arcor.de on 16 Mar 2013 at 10:54

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 24 Feb 2014 at 1:37

GoogleCodeExporter commented 9 years ago
I checked out 1.5 using;
svn checkout http://openjpeg.googlecode.com/svn/branches/openjpeg-1.5 .

did a cmake;
cmake . -DBUILD_THIRDPARTY:BOOL=ON -DBUILD_VIEWER:BOOL=O

But ......... when I do make, all other stuff compiles ... but ....
The OPJViewer program fails in branch 1.5 also with errors;

[100%] Building C object 
applications/OPJViewer/CMakeFiles/opjviewer.dir/__/codec/index.c.o
/home/user/VDSU/openjpeg-2.1.0-Linux-i386/ojp-br15/applications/codec/index.c:32
:22: fatal error: openjpeg.h: No such file or directory
compilation terminated.
make[2]: *** 
[applications/OPJViewer/CMakeFiles/opjviewer.dir/__/codec/index.c.o] Error 1
make[1]: *** [applications/OPJViewer/CMakeFiles/opjviewer.dir/all] Error 2
make: *** [all] Error 2

Original comment by kha...@gmail.com on 29 Oct 2014 at 3:54

GoogleCodeExporter commented 9 years ago
BTW, 2.0 gives the same error as 2.1.

Original comment by kha...@gmail.com on 29 Oct 2014 at 3:58

GoogleCodeExporter commented 9 years ago
It seems that you use LINUX.
But which WX version do you use? Wich compiler version do you use?

First you have to apply the attached patch.

Then - depending on the WX version - compilation may stop with:

openjpeg-1.5.x-branch-r2918-1/applications/OPJViewer/source/imagjpeg2000.cpp: 
In member function 'virtual bool wxJPEG2000Handler::SaveFile(wxImage*, 
wxOutputStream&, bool)':
/sources/LIB/IMAGE_FORMATS/OPENJPEG/BRANCH/openjpeg-1.5.x-branch-r2918-1/applica
tions/OPJViewer/source/imagjpeg2000.cpp:1099:51: error: invalid cast from type 
'wxCStrData' to type 'char*'
                 char *s = (char *) m_prsize.c_str();
                                                   ^
make[2]: *** 
[applications/OPJViewer/CMakeFiles/opjviewer.dir/source/imagjpeg2000.cpp.o] 
Error 1
make[1]: *** [applications/OPJViewer/CMakeFiles/opjviewer.dir/all] Error 2
make: *** [all] Error 2

It seems that the last working WX version was 2.8; later
versions may fail.

winfried

Original comment by szukw...@arcor.de on 29 Oct 2014 at 5:35

Attachments: