Skip to content
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

Compile against newer versions of Jasper #91

Merged
merged 1 commit into from
Aug 29, 2021

Conversation

mitchblank
Copy link
Contributor

jasper changed the callback API (twice!) This is the workaround that gdal used to deal with the problem in OSGeo/gdal@9ef8e16

fixes #90

jasper changed the callback API (twice!)  This is the workaround that
gdal used to deal with the problem (reference in the code comment)

fixes DentonW#90
@kloczek
Copy link

kloczek commented May 1, 2021

Looks like that PR solve #94.
Is it possible to merge that PR and make new release?

@DentonW DentonW merged commit 6f3d5e9 into DentonW:master Aug 29, 2021
@DentonW DentonW mentioned this pull request Aug 29, 2021
@kloczek
Copy link

kloczek commented Jul 21, 2022

I've been trying to use this commit to compile DevIL against latest version of the Jasper and looks like it fails.

[tkloczko@devel-g2v x86_64-redhat-linux-gnu]$ make
/usr/bin/cmake -S/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL -B/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu/CMakeFiles /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu'
make  -f src-IL/CMakeFiles/IL.dir/build.make src-IL/CMakeFiles/IL.dir/depend
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu'
cd /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu/src-IL /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu/src-IL/CMakeFiles/IL.dir/DependInfo.cmake --color=
Consolidate compiler generated dependencies of target IL
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu'
make  -f src-IL/CMakeFiles/IL.dir/build.make src-IL/CMakeFiles/IL.dir/build
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu'
[  1%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o
cd /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu/src-IL && /usr/bin/g++ -DIL_EXPORTS -I/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/include -I/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/../include -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fno-rtti -DNDEBUG -fPIC -MD -MT src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o -MF CMakeFiles/IL.dir/src/il_jp2.cpp.o.d -o CMakeFiles/IL.dir/src/il_jp2.cpp.o -c /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp
In file included from /usr/include/jasper/jasper.h:73,
                 from /home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:16:
/usr/include/jasper/jas_config.h:115:2: warning: #warning "Your code is being built against an older version of the C standard than JasPer was.  Although this is supported, this may require some extra preprocessor defines when building." [-Wcpp]
  115 | #warning "Your code is being built against an older version of the C standard than JasPer was.  Although this is supported, this may require some extra preprocessor defines when building."
      |  ^~~~~~~
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp: In function ‘int iJp2_file_read(jas_stream_obj_t*, char*, unsigned int)’:
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:332:9: warning: statement has no effect [-Wunused-value]
  332 |         obj;
      |         ^~~
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp: In function ‘int iJp2_file_write(jas_stream_obj_t*, const char*, unsigned int)’:
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:344:9: warning: statement has no effect [-Wunused-value]
  344 |         obj;
      |         ^~~
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp: In function ‘long int iJp2_file_seek(jas_stream_obj_t*, long int, int)’:
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:350:9: warning: statement has no effect [-Wunused-value]
  350 |         obj;
      |         ^~~
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp: In function ‘int iJp2_file_close(jas_stream_obj_t*)’:
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:367:9: warning: statement has no effect [-Wunused-value]
  367 |         obj;
      |         ^~~
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp: At global scope:
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:372:9: error: invalid conversion from ‘int (*)(jas_stream_obj_t*, char*, unsigned int)’ {aka ‘int (*)(void*, char*, unsigned int)’} to ‘ssize_t (*)(jas_stream_obj_t*, char*, size_t)’ {aka ‘long int (*)(void*, char*, long unsigned int)’} [-fpermissive]
  372 |         iJp2_file_read,
      |         ^~~~~~~~~~~~~~
      |         |
      |         int (*)(jas_stream_obj_t*, char*, unsigned int) {aka int (*)(void*, char*, unsigned int)}
/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/src-IL/src/il_jp2.cpp:373:9: error: invalid conversion from ‘int (*)(jas_stream_obj_t*, const char*, unsigned int)’ {aka ‘int (*)(void*, const char*, unsigned int)’} to ‘ssize_t (*)(jas_stream_obj_t*, const char*, size_t)’ {aka ‘long int (*)(void*, const char*, long unsigned int)’} [-fpermissive]
  373 |         iJp2_file_write,
      |         ^~~~~~~~~~~~~~~
      |         |
      |         int (*)(jas_stream_obj_t*, const char*, unsigned int) {aka int (*)(void*, const char*, unsigned int)}
make[2]: *** [src-IL/CMakeFiles/IL.dir/build.make:541: src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:137: src-IL/CMakeFiles/IL.dir/all] Error 2
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/DevIL-1.8.0/DevIL/x86_64-redhat-linux-gnu'
make: *** [Makefile:139: all] Error 2

Are you going to try port DevIL to be able use it with Jasper 3.x?

fgsoftware1 pushed a commit to fgsoftware1/DevIL that referenced this pull request Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid conversion from int to int
3 participants