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

Some code in decenc_openjpeg.c is now deprecated with recent version of OpenJPEG #564

Closed
AlysonStahl-NOAA opened this issue Dec 11, 2024 · 0 comments · Fixed by #565
Closed

Comments

@AlysonStahl-NOAA
Copy link
Contributor

I'm receiving the following error when -DUSE_OpenJPEG=ON

/home/runner/work/NCEPLIBS-g2c/NCEPLIBS-g2c/g2c/src/decenc_openjpeg.c: In function ‘enc_jpeg2000’:
/home/runner/work/NCEPLIBS-g2c/NCEPLIBS-g2c/g2c/src/decenc_openjpeg.c:494:5: error: ‘bpp’ is deprecated: Use prec instead [-Werror=deprecated-declarations]
  494 |     cmptparm.bpp = (OPJ_UINT32)nbits;
      |     ^~~~~~~~
In file included from /home/runner/work/NCEPLIBS-g2c/NCEPLIBS-g2c/g2c/src/decenc_openjpeg.c:21:
/usr/include/openjpeg-2.5/openjpeg.h:750:45: note: declared here
  750 |     OPJ_DEPRECATED_STRUCT_MEMBER(OPJ_UINT32 bpp, "Use prec instead");
      |                                             ^~~
/usr/include/openjpeg-2.5/openjpeg.h:80:83: note: in definition of macro ‘OPJ_DEPRECATED_STRUCT_MEMBER’
   80 | #define OPJ_DEPRECATED_STRUCT_MEMBER(memb, msg) __attribute__ ((deprecated(msg))) memb
      |                                                                                   ^~~~
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/g2c_objlib.dir/build.make:779: src/CMakeFiles/g2c_objlib.dir/decenc_openjpeg.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1200: src/CMakeFiles/g2c_objlib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@AlysonStahl-NOAA AlysonStahl-NOAA changed the title Recent version of OpenJPEG breaks some functionality in decenc_openjpeg.c Some code in decenc_openjpeg.c is now deprecated with recent version of OpenJPEG Dec 11, 2024
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 a pull request may close this issue.

1 participant