Skip to content

Conversation

@satmandu
Copy link

@satmandu satmandu commented Oct 5, 2022

@kloczek
Copy link

kloczek commented Oct 5, 2022

Tested and it builds correctly with this PR.
It would be good to merge this PR.

@satmandu
Copy link
Author

satmandu commented Oct 5, 2022

I would note that this doesn't build on i686 or armv7l...

@satmandu
Copy link
Author

satmandu commented Oct 5, 2022

Build with this patch on armv7l:

[30/115] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o
FAILED: src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o 
/usr/local/bin/c++ -DIL_EXPORTS -I/usr/local/tmp/crew/devil.20221005092208.dir/DevIL/src-IL/include -I/usr/local/tmp/crew/devil.20221005092208.dir/DevIL/src-IL/../include -O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold  -flto -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o -MF src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o.d -o src-IL/CMakeFiles/IL.dir/src/il_jp2.cpp.o -c /usr/local/tmp/crew/devil.20221005092208.dir/DevIL/src-IL/src/il_jp2.cpp
In file included from /usr/local/include/jasper/jasper.h:73,
                 from /usr/local/tmp/crew/devil.20221005092208.dir/DevIL/src-IL/src/il_jp2.cpp:16:
/usr/local/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."
      |  ^~~~~~~
/usr/local/tmp/crew/devil.20221005092208.dir/DevIL/src-IL/src/il_jp2.cpp:380:9: error: invalid conversion from ‘long int (*)(jas_stream_obj_t*, char*, long unsigned int)’ {aka ‘long int (*)(void*, char*, long unsigned int)’} to ‘ssize_t (*)(jas_stream_obj_t*, char*, size_t)’ {aka ‘int (*)(void*, char*, unsigned int)’} [-fpermissive]
  380 |         iJp2_file_read,
      |         ^~~~~~~~~~~~~~
      |         |
      |         long int (*)(jas_stream_obj_t*, char*, long unsigned int) {aka long int (*)(void*, char*, long unsigned int)}
/usr/local/tmp/crew/devil.20221005092208.dir/DevIL/src-IL/src/il_jp2.cpp:381:9: error: invalid conversion from ‘long int (*)(jas_stream_obj_t*, const char*, long unsigned int)’ {aka ‘long int (*)(void*, const char*, long unsigned int)’} to ‘ssize_t (*)(jas_stream_obj_t*, const char*, size_t)’ {aka ‘int (*)(void*, const char*, unsigned int)’} [-fpermissive]
  381 |         iJp2_file_write,
      |         ^~~~~~~~~~~~~~~
      |         |
      |         long int (*)(jas_stream_obj_t*, const char*, long unsigned int) {aka long int (*)(void*, const char*, long unsigned int)}
[31/115] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_icon.cpp.o
[32/115] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_iwi.cpp.o
[33/115] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_io.cpp.o
[34/115] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_jpeg.cpp.o
[35/115] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_convbuff.cpp.o
ninja: build stopped: subcommand failed.

@satmandu
Copy link
Author

Jasper appears to build fine on armv7l w/o this patch! :)

@satmandu
Copy link
Author

So maybe there just needs to be an x86_64 ifdef added for this...

@tristanjl
Copy link

tristanjl commented Apr 17, 2023

Shouldn't the types be ssize_t and size_t instead of long int and long unsigned int to match the jas_stream_ops_t struct (and so it will compile 32/64bit)?
Also the #endif statements look like they should be higher so the end the new #if block

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.

1.8.0: build fails against jasper 3.0.x

3 participants