openjpeg icon indicating copy to clipboard operation
openjpeg copied to clipboard

Build fails on macOS Catalina

Open xanadu6291 opened this issue 4 years ago • 6 comments

Build fails on macOS Catalina when using the following cmake command:

cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DBUILD_SHARED_LIBS:bool=off -DCMAKE_BUILD_TYPE=Release -DBUILD_THIRDPARTY:bool=on ..

This is because zlib in thirdparty have implicit declare function. Attached patch fixes this error... openjpeg_gzguts_h.zip

xanadu6291 avatar Oct 04 '20 10:10 xanadu6291

@xanadu6291 ,

the gzguts.h patch may work for you. But not generally. Because

  • <unistd.h>

is unknown in WINDOWS.

winfried

szukw000 avatar Oct 04 '20 15:10 szukw000

So how do you fix this build error?

xanadu6291 avatar Oct 05 '20 06:10 xanadu6291

@xanadu6291 ,

I use LINUX and do not have a problem with BUILD_THIRDPARTY. As your bug report has to do with ZLIB, here are some links:

https://github.com/madler/zlib

http://madler.net/mailman/listinfo/zlib-devel_madler.net http://madler.net/pipermail/zlib-devel_madler.net/

https://stackoverflow.com/questions/62391469/installing-kaldi-on-macos-catalina-error-with-zlib

'1 Answer' is from Mark Adler.

winfried

szukw000 avatar Oct 07 '20 10:10 szukw000

@xanadu6291 ,

if you write to the list or https://github.com/madler/zlib , do not forget to mention the BUILD_INTERNAL version of ZLIB:

-  #define ZLIB_VERSION "1.2.8"

winfried

szukw000 avatar Oct 07 '20 10:10 szukw000

@rouault ,

could you update the BUILD_INTERNAL version of ZLIB to '1.2.11'? winfried

szukw000 avatar Oct 07 '20 10:10 szukw000

@rouault ,

the thirdparty libraries are a bit behind:

LCMS2 Version 2.8 LIBTIFF Version 4.0.6 LIBPNG Version 1.6.25

winfried

szukw000 avatar Oct 07 '20 10:10 szukw000