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

Ungrib build fails when jasper version > 3. #207

Open
bakamotokatas opened this issue Jun 27, 2022 · 8 comments
Open

Ungrib build fails when jasper version > 3. #207

bakamotokatas opened this issue Jun 27, 2022 · 8 comments

Comments

@bakamotokatas
Copy link
Contributor

bakamotokatas commented Jun 27, 2022

/usr/bin/ld: ./ngl/libg2_4.a(dec_jpeg2000.o): in function dec_jpeg2000_': dec_jpeg2000.c:(.text+0x61): undefined reference to jpc_decode'
collect2: error: ld returned 1 exit status
make[1]: [Makefile:19: ungrib.exe] Error 1 (ignored)

/usr/bin/ld: ./ngl/libg2_4.a(dec_jpeg2000.o): in function dec_jpeg2000_': dec_jpeg2000.c:(.text+0x61): undefined reference to jpc_decode'
collect2: error: ld returned 1 exit status
make[1]: [Makefile:41: g2print.exe] Error 1 (ignored)

Also there is similar problem with NCEPLIBS;
NOAA-EMC/NCEPLIBS-g2#236

@andrewsoong
Copy link

Which compiler was used ?

@bakamotokatas
Copy link
Contributor Author

hello @andrewsoong, I used GCC and gfortran version 12.1.1

@andrewsoong
Copy link

@bakamotokatas I am using Intel Compilers(V2018.1.48), It can compiled WPS v4.4 succussfully, but the geogrid.exe could not run.
The WPS v4.3.1 is OK.

@bakamotokatas
Copy link
Contributor Author

@andrewsoong We're talking about other issues, I'm talking about a WPS compilation issue with the new jasper version. I can compile WPS with old jasper versions, jasper 1.900.1 or version 2 variants. There is a problem with compiling with the newly released jasper version 3. I just wrote to report a problem.

@WillTrojak
Copy link

I recently encountered this issue and the fix was to change the jpc_decode and jpc_encode functions over to jas_image_decode and jas_image_encode. It seems that the former were undocumented internal functions of Jasper which have now been removed. You have to make an additional call to jas_image_getfmt to get the fmt int.

@WillTrojak
Copy link

Is there any plan to fix this issue in a future release? The fix I made seems to work fine, I could make a PR if you like.

@weiwangncar
Copy link
Collaborator

@WillTrojak Does your problem also exist with --build-grib2-libs compile option? This option builds the jasper and other required grib 2 libraries at the WPS compile time.

@mgduda
Copy link
Collaborator

mgduda commented Jul 5, 2023

@WillTrojak If your changes work with older Jasper library versions (e.g., 1.900.X) and if they work when using the option that @weiwangncar mentioned to build an embedded copy of the Jasper library, then we'd be glad to receive a PR with your fixes. If you have any questions about the PR process, please don't hesitate to let me know and I'll be glad to help!

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

No branches or pull requests

5 participants