openframeworks / apothecary

This is the OpenFrameworks library apothecary. It mixes formulas and potions to build and update the C/C++ lib dependencies.
Other
56 stars 51 forks source link

[update emscripten] FreeImage does not compile for emscripten with > c++11 #244

Closed themancalledjakob closed 1 year ago

themancalledjakob commented 1 year ago

lot's of errors due to removed types/semantics in c++17 such as auto_ptr and register. Possibly more, but since the fix worked I didn't investigate further.

fix: #243

danoli3 commented 1 year ago

FreeImage patched with C++17 support - https://github.com/danoli3/FreeImage

Need to actually properly get them to update it though - dependancies

themancalledjakob commented 1 year ago

is there a disadvantage compiling it with -std=c++11 compared to a patched c++17 version?

ofTheo commented 1 year ago

Hi!

Is it possible to describe the problem a bit clearer? Are you trying to use emscripten with C++17 or C++11 ?

In general we are moving the main OF project to C++17 but if things are erroring for C++11 users ( as in you build your OF app with C++11 because your compiler can't do C++17 ), then that is good to address.

Thanks!!

themancalledjakob commented 1 year ago

Sure! Sorry this wasn't clear enough. I will do my best to lay it out :)

emsdk compiled back in the days with c++14 standard, and switched to c++17. When compiling FreeImage with apothecary for emscripten using the latest emsdk, it will be therefore compiled with c++17. Problem is, FreeImage is not c++17 compatible, as it uses auto_ptr, register and dynamic exceptions, etc, which were first deprecated and then finally removed in c++17. So, attempting to compile it out of the box will result in tons of errors. It can be fixed by forcing to compile it with c++11 using the --std=c++11 flag as is done in the mentioned PR #243 , or by patching FreeImage as @danoli3 suggested.

In either case, I can still compile my project and openFrameworks with c++17, it is just about precompiling FreeImage. It does not affect the c++ standard which a user might want to compile their project/oF with.

For clarity here the em++ version, and the default c++ standard used:

jrkb@nature:~$ em++ --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.24 (68a9f990429e0bcfb63b1cde68bad792554350a5)
[...]

jrkb@nature:~$ em++ -dM -E -x c++  /dev/null | grep -F __cplusplus
#define __cplusplus 201703L

compared to an older version of emsdk, which does default to c++14, where the old syntax/types are deprecated, but not removed (this will compile FreeImage with deprecated warnings but no errors):

(venv2) jrkb@nature:~$ em++ --version
emcc (Emscripten gcc/clang-like replacement) 2.0.6 (09d80521f5666431f01e2fa58ef25f3e827409b2)
[...]

(venv2) jrkb@nature:~$ em++ -dM -E -x c++  /dev/null | grep -F __cplusplus
#define __cplusplus 201402L

and here the output when compiling FreeImage out of the box with emsdk 3.1.24, leading to errors:

jrkb@nature:~/openFrameworks_master/scripts/apothecary$ ./apothecary/apothecary -t emscripten update FreeImage
OF: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary/../../../
APOTHECARY: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary
FORMULAS: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary/formulas
BUILD: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary/build
LIBS_DIR: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary/../
ADDONS: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary/../../../addons
REL_ADDONS_DIR: /home/jrkb/openFrameworks_master/scripts/apothecary/apothecary/../../../addons

 ----- FreeImage -----

 Downloading "FreeImage"

Downloading from https://github.com/danoli3/FreeImage for OSX/iOS
https://github.com/danoli3/FreeImage
2022-11-10 07:19:44 URL:https://codeload.github.com/danoli3/FreeImage/tar.gz/refs/heads/3.17.0-header-changes [6335890] -> "FreeImage-3.17.0-header-changes.tar.gz" [1]

 Preparing "FreeImage"

 Building "FreeImage"

make: make clean -f Makefile.gnu
rm -f core Dist/*.* u2dtmp* ./Source/FreeImage/BitmapAccess.o ./Source/FreeImage/ColorLookup.o ./Source/FreeImage/FreeImage.o ./Source/FreeImage/FreeImageC.o ./Source/FreeImage/FreeImageIO.o ./Source/FreeImage/GetType.o ./Source/FreeImage/MemoryIO.o ./Source/FreeImage/PixelAccess.o ./Source/FreeImage/J2KHelper.o ././Source/FreeImage/MNGHelper.o ./Source/FreeImage/Plugin.o ./Source/FreeImage/PluginBMP.o ./Source/FreeImage/PluginCUT.o ./Source/FreeImage/PluginDDS.o ./Source/FreeImage/PluginEXR.o ./Source/FreeImage/PluginG3.o ./Source/FreeImage/PluginGIF.o ./Source/FreeImage/PluginHDR.o ./Source/FreeImage/PluginICO.o ./Source/FreeImage/PluginIFF.o ./Source/FreeImage/PluginJ2K.o ././Source/FreeImage/PluginJNG.o ./Source/FreeImage/PluginJP2.o ./Source/FreeImage/PluginJPEG.o ././Source/FreeImage/PluginJXR.o ./Source/FreeImage/PluginKOALA.o ./Source/FreeImage/PluginMNG.o ./Source/FreeImage/PluginPCD.o ./Source/FreeImage/PluginPCX.o ./Source/FreeImage/PluginPFM.o ./Source/FreeImage/PluginPICT.o ./Source/FreeImage/PluginPNG.o ./Source/FreeImage/PluginPNM.o ./Source/FreeImage/PluginPSD.o ./Source/FreeImage/PluginRAS.o ./Source/FreeImage/PluginRAW.o ./Source/FreeImage/PluginSGI.o ./Source/FreeImage/PluginTARGA.o ./Source/FreeImage/PluginTIFF.o ./Source/FreeImage/PluginWBMP.o ././Source/FreeImage/PluginWebP.o ./Source/FreeImage/PluginXBM.o ./Source/FreeImage/PluginXPM.o ./Source/FreeImage/PSDParser.o ./Source/FreeImage/TIFFLogLuv.o ./Source/FreeImage/Conversion.o ./Source/FreeImage/Conversion16_555.o ./Source/FreeImage/Conversion16_565.o ./Source/FreeImage/Conversion24.o ./Source/FreeImage/Conversion32.o ./Source/FreeImage/Conversion4.o ./Source/FreeImage/Conversion8.o ./Source/FreeImage/ConversionFloat.o ./Source/FreeImage/ConversionRGB16.o ././Source/FreeImage/ConversionRGBA16.o ././Source/FreeImage/ConversionRGBAF.o ./Source/FreeImage/ConversionRGBF.o ./Source/FreeImage/ConversionType.o ./Source/FreeImage/ConversionUINT16.o ./Source/FreeImage/Halftoning.o ./Source/FreeImage/tmoColorConvert.o ./Source/FreeImage/tmoDrago03.o ./Source/FreeImage/tmoFattal02.o ./Source/FreeImage/tmoReinhard05.o ./Source/FreeImage/ToneMapping.o ././Source/FreeImage/LFPQuantizer.o ./Source/FreeImage/NNQuantizer.o ./Source/FreeImage/WuQuantizer.o ./Source/DeprecationManager/Deprecated.o ./Source/DeprecationManager/DeprecationMgr.o ./Source/FreeImage/CacheFile.o ./Source/FreeImage/MultiPage.o ./Source/FreeImage/ZLibInterface.o ./Source/Metadata/Exif.o ./Source/Metadata/FIRational.o ./Source/Metadata/FreeImageTag.o ./Source/Metadata/IPTC.o ./Source/Metadata/TagConversion.o ./Source/Metadata/TagLib.o ./Source/Metadata/XTIFF.o ./Source/FreeImageToolkit/Background.o ./Source/FreeImageToolkit/BSplineRotate.o ./Source/FreeImageToolkit/Channels.o ./Source/FreeImageToolkit/ClassicRotate.o ./Source/FreeImageToolkit/Colors.o ./Source/FreeImageToolkit/CopyPaste.o ./Source/FreeImageToolkit/Display.o ./Source/FreeImageToolkit/Flip.o ./Source/FreeImageToolkit/JPEGTransform.o ./Source/FreeImageToolkit/MultigridPoissonSolver.o ./Source/FreeImageToolkit/Rescale.o ./Source/FreeImageToolkit/Resize.o Source/LibJPEG/./jaricom.o Source/LibJPEG/jcapimin.o Source/LibJPEG/jcapistd.o Source/LibJPEG/./jcarith.o Source/LibJPEG/jccoefct.o Source/LibJPEG/jccolor.o Source/LibJPEG/jcdctmgr.o Source/LibJPEG/jchuff.o Source/LibJPEG/jcinit.o Source/LibJPEG/jcmainct.o Source/LibJPEG/jcmarker.o Source/LibJPEG/jcmaster.o Source/LibJPEG/jcomapi.o Source/LibJPEG/jcparam.o Source/LibJPEG/jcprepct.o Source/LibJPEG/jcsample.o Source/LibJPEG/jctrans.o Source/LibJPEG/jdapimin.o Source/LibJPEG/jdapistd.o Source/LibJPEG/./jdarith.o Source/LibJPEG/jdatadst.o Source/LibJPEG/jdatasrc.o Source/LibJPEG/jdcoefct.o Source/LibJPEG/jdcolor.o Source/LibJPEG/jddctmgr.o Source/LibJPEG/jdhuff.o Source/LibJPEG/jdinput.o Source/LibJPEG/jdmainct.o Source/LibJPEG/jdmarker.o Source/LibJPEG/jdmaster.o Source/LibJPEG/jdmerge.o Source/LibJPEG/jdpostct.o Source/LibJPEG/jdsample.o Source/LibJPEG/jdtrans.o Source/LibJPEG/jerror.o Source/LibJPEG/jfdctflt.o Source/LibJPEG/jfdctfst.o Source/LibJPEG/jfdctint.o Source/LibJPEG/jidctflt.o Source/LibJPEG/jidctfst.o Source/LibJPEG/jidctint.o Source/LibJPEG/jmemmgr.o Source/LibJPEG/jmemnobs.o Source/LibJPEG/jquant1.o Source/LibJPEG/jquant2.o Source/LibJPEG/jutils.o Source/LibJPEG/transupp.o Source/LibPNG/./png.o Source/LibPNG/./pngerror.o Source/LibPNG/./pngget.o Source/LibPNG/./pngmem.o Source/LibPNG/./pngpread.o Source/LibPNG/./pngread.o Source/LibPNG/./pngrio.o Source/LibPNG/./pngrtran.o Source/LibPNG/./pngrutil.o Source/LibPNG/./pngset.o Source/LibPNG/./pngtrans.o Source/LibPNG/./pngwio.o Source/LibPNG/./pngwrite.o Source/LibPNG/./pngwtran.o Source/LibPNG/./pngwutil.o Source/LibTIFF4/./tif_aux.o Source/LibTIFF4/./tif_close.o Source/LibTIFF4/./tif_codec.o Source/LibTIFF4/./tif_color.o Source/LibTIFF4/./tif_compress.o Source/LibTIFF4/./tif_dir.o Source/LibTIFF4/./tif_dirinfo.o Source/LibTIFF4/./tif_dirread.o Source/LibTIFF4/./tif_dirwrite.o Source/LibTIFF4/./tif_dumpmode.o Source/LibTIFF4/./tif_error.o Source/LibTIFF4/./tif_extension.o Source/LibTIFF4/./tif_fax3.o Source/LibTIFF4/./tif_fax3sm.o Source/LibTIFF4/./tif_flush.o Source/LibTIFF4/./tif_getimage.o Source/LibTIFF4/./tif_jpeg.o Source/LibTIFF4/./tif_luv.o Source/LibTIFF4/./tif_lzma.o Source/LibTIFF4/./tif_lzw.o Source/LibTIFF4/./tif_next.o Source/LibTIFF4/./tif_ojpeg.o Source/LibTIFF4/./tif_open.o Source/LibTIFF4/./tif_packbits.o Source/LibTIFF4/./tif_pixarlog.o Source/LibTIFF4/./tif_predict.o Source/LibTIFF4/./tif_print.o Source/LibTIFF4/./tif_read.o Source/LibTIFF4/./tif_strip.o Source/LibTIFF4/./tif_swab.o Source/LibTIFF4/./tif_thunder.o Source/LibTIFF4/./tif_tile.o Source/LibTIFF4/./tif_version.o Source/LibTIFF4/./tif_warning.o Source/LibTIFF4/./tif_write.o Source/LibTIFF4/./tif_zip.o Source/ZLib/./adler32.o Source/ZLib/./compress.o Source/ZLib/./crc32.o Source/ZLib/./deflate.o Source/ZLib/./gzclose.o Source/ZLib/./gzlib.o Source/ZLib/./gzread.o Source/ZLib/./gzwrite.o Source/ZLib/./infback.o Source/ZLib/./inffast.o Source/ZLib/./inflate.o Source/ZLib/./inftrees.o Source/ZLib/./trees.o Source/ZLib/./uncompr.o Source/ZLib/./zutil.o Source/LibOpenJPEG/bio.o Source/LibOpenJPEG/cio.o Source/LibOpenJPEG/dwt.o Source/LibOpenJPEG/event.o Source/LibOpenJPEG/./function_list.o Source/LibOpenJPEG/image.o Source/LibOpenJPEG/./invert.o Source/LibOpenJPEG/j2k.o Source/LibOpenJPEG/jp2.o Source/LibOpenJPEG/mct.o Source/LibOpenJPEG/mqc.o Source/LibOpenJPEG/openjpeg.o Source/LibOpenJPEG/./opj_clock.o Source/LibOpenJPEG/pi.o Source/LibOpenJPEG/raw.o Source/LibOpenJPEG/t1.o Source/LibOpenJPEG/t2.o Source/LibOpenJPEG/tcd.o Source/LibOpenJPEG/tgt.o Source/OpenEXR/./IlmImf/b44ExpLogTable.o Source/OpenEXR/./IlmImf/ImfAcesFile.o Source/OpenEXR/./IlmImf/ImfAttribute.o Source/OpenEXR/./IlmImf/ImfB44Compressor.o Source/OpenEXR/./IlmImf/ImfBoxAttribute.o Source/OpenEXR/./IlmImf/ImfChannelList.o Source/OpenEXR/./IlmImf/ImfChannelListAttribute.o Source/OpenEXR/./IlmImf/ImfChromaticities.o Source/OpenEXR/./IlmImf/ImfChromaticitiesAttribute.o Source/OpenEXR/./IlmImf/ImfCompositeDeepScanLine.o Source/OpenEXR/./IlmImf/ImfCompressionAttribute.o Source/OpenEXR/./IlmImf/ImfCompressor.o Source/OpenEXR/./IlmImf/ImfConvert.o Source/OpenEXR/./IlmImf/ImfCRgbaFile.o Source/OpenEXR/./IlmImf/ImfDeepCompositing.o Source/OpenEXR/./IlmImf/ImfDeepFrameBuffer.o Source/OpenEXR/./IlmImf/ImfDeepImageStateAttribute.o Source/OpenEXR/./IlmImf/ImfDeepScanLineInputFile.o Source/OpenEXR/./IlmImf/ImfDeepScanLineInputPart.o Source/OpenEXR/./IlmImf/ImfDeepScanLineOutputFile.o Source/OpenEXR/./IlmImf/ImfDeepScanLineOutputPart.o Source/OpenEXR/./IlmImf/ImfDeepTiledInputFile.o Source/OpenEXR/./IlmImf/ImfDeepTiledInputPart.o Source/OpenEXR/./IlmImf/ImfDeepTiledOutputFile.o Source/OpenEXR/./IlmImf/ImfDeepTiledOutputPart.o Source/OpenEXR/./IlmImf/ImfDoubleAttribute.o Source/OpenEXR/./IlmImf/ImfDwaCompressor.o Source/OpenEXR/./IlmImf/ImfEnvmap.o Source/OpenEXR/./IlmImf/ImfEnvmapAttribute.o Source/OpenEXR/./IlmImf/ImfFastHuf.o Source/OpenEXR/./IlmImf/ImfFloatAttribute.o Source/OpenEXR/./IlmImf/ImfFloatVectorAttribute.o Source/OpenEXR/./IlmImf/ImfFrameBuffer.o Source/OpenEXR/./IlmImf/ImfFramesPerSecond.o Source/OpenEXR/./IlmImf/ImfGenericInputFile.o Source/OpenEXR/./IlmImf/ImfGenericOutputFile.o Source/OpenEXR/./IlmImf/ImfHeader.o Source/OpenEXR/./IlmImf/ImfHuf.o Source/OpenEXR/./IlmImf/ImfInputFile.o Source/OpenEXR/./IlmImf/ImfInputPart.o Source/OpenEXR/./IlmImf/ImfInputPartData.o Source/OpenEXR/./IlmImf/ImfIntAttribute.o Source/OpenEXR/./IlmImf/ImfIO.o Source/OpenEXR/./IlmImf/ImfKeyCode.o Source/OpenEXR/./IlmImf/ImfKeyCodeAttribute.o Source/OpenEXR/./IlmImf/ImfLineOrderAttribute.o Source/OpenEXR/./IlmImf/ImfLut.o Source/OpenEXR/./IlmImf/ImfMatrixAttribute.o Source/OpenEXR/./IlmImf/ImfMisc.o Source/OpenEXR/./IlmImf/ImfMultiPartInputFile.o Source/OpenEXR/./IlmImf/ImfMultiPartOutputFile.o Source/OpenEXR/./IlmImf/ImfMultiView.o Source/OpenEXR/./IlmImf/ImfOpaqueAttribute.o Source/OpenEXR/./IlmImf/ImfOutputFile.o Source/OpenEXR/./IlmImf/ImfOutputPart.o Source/OpenEXR/./IlmImf/ImfOutputPartData.o Source/OpenEXR/./IlmImf/ImfPartType.o Source/OpenEXR/./IlmImf/ImfPizCompressor.o Source/OpenEXR/./IlmImf/ImfPreviewImage.o Source/OpenEXR/./IlmImf/ImfPreviewImageAttribute.o Source/OpenEXR/./IlmImf/ImfPxr24Compressor.o Source/OpenEXR/./IlmImf/ImfRational.o Source/OpenEXR/./IlmImf/ImfRationalAttribute.o Source/OpenEXR/./IlmImf/ImfRgbaFile.o Source/OpenEXR/./IlmImf/ImfRgbaYca.o Source/OpenEXR/./IlmImf/ImfRle.o Source/OpenEXR/./IlmImf/ImfRleCompressor.o Source/OpenEXR/./IlmImf/ImfScanLineInputFile.o Source/OpenEXR/./IlmImf/ImfStandardAttributes.o Source/OpenEXR/./IlmImf/ImfStdIO.o Source/OpenEXR/./IlmImf/ImfStringAttribute.o Source/OpenEXR/./IlmImf/ImfStringVectorAttribute.o Source/OpenEXR/./IlmImf/ImfSystemSpecific.o Source/OpenEXR/./IlmImf/ImfTestFile.o Source/OpenEXR/./IlmImf/ImfThreading.o Source/OpenEXR/./IlmImf/ImfTileDescriptionAttribute.o Source/OpenEXR/./IlmImf/ImfTiledInputFile.o Source/OpenEXR/./IlmImf/ImfTiledInputPart.o Source/OpenEXR/./IlmImf/ImfTiledMisc.o Source/OpenEXR/./IlmImf/ImfTiledOutputFile.o Source/OpenEXR/./IlmImf/ImfTiledOutputPart.o Source/OpenEXR/./IlmImf/ImfTiledRgbaFile.o Source/OpenEXR/./IlmImf/ImfTileOffsets.o Source/OpenEXR/./IlmImf/ImfTimeCode.o Source/OpenEXR/./IlmImf/ImfTimeCodeAttribute.o Source/OpenEXR/./IlmImf/ImfVecAttribute.o Source/OpenEXR/./IlmImf/ImfVersion.o Source/OpenEXR/./IlmImf/ImfWav.o Source/OpenEXR/./IlmImf/ImfZip.o Source/OpenEXR/./IlmImf/ImfZipCompressor.o Source/OpenEXR/./Imath/ImathBox.o Source/OpenEXR/./Imath/ImathColorAlgo.o Source/OpenEXR/./Imath/ImathFun.o Source/OpenEXR/./Imath/ImathMatrixAlgo.o Source/OpenEXR/./Imath/ImathRandom.o Source/OpenEXR/./Imath/ImathShear.o Source/OpenEXR/./Imath/ImathVec.o Source/OpenEXR/./Iex/IexBaseExc.o Source/OpenEXR/./Iex/IexThrowErrnoExc.o Source/OpenEXR/./Half/half.o Source/OpenEXR/./IlmThread/IlmThread.o Source/OpenEXR/./IlmThread/IlmThreadMutex.o Source/OpenEXR/./IlmThread/IlmThreadPool.o Source/OpenEXR/./IlmThread/IlmThreadSemaphore.o Source/OpenEXR/./IexMath/IexMathFloatExc.o Source/OpenEXR/./IexMath/IexMathFpu.o Source/LibRawLite/./internal/dcraw_common.o Source/LibRawLite/./internal/dcraw_fileio.o Source/LibRawLite/./internal/demosaic_packs.o Source/LibRawLite/./src/libraw_c_api.o Source/LibRawLite/./src/libraw_cxx.o Source/LibRawLite/./src/libraw_datastream.o Source/LibWebP/./src/dec/dec.alpha.o Source/LibWebP/./src/dec/dec.buffer.o Source/LibWebP/./src/dec/dec.frame.o Source/LibWebP/./src/dec/dec.idec.o Source/LibWebP/./src/dec/dec.io.o Source/LibWebP/./src/dec/dec.quant.o Source/LibWebP/./src/dec/dec.tree.o Source/LibWebP/./src/dec/dec.vp8.o Source/LibWebP/./src/dec/dec.vp8l.o Source/LibWebP/./src/dec/dec.webp.o Source/LibWebP/./src/dsp/dsp.alpha_processing.o Source/LibWebP/./src/dsp/dsp.alpha_processing_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.alpha_processing_sse2.o Source/LibWebP/./src/dsp/dsp.argb.o Source/LibWebP/./src/dsp/dsp.argb_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.argb_sse2.o Source/LibWebP/./src/dsp/dsp.cost.o Source/LibWebP/./src/dsp/dsp.cost_mips32.o Source/LibWebP/./src/dsp/dsp.cost_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.cost_sse2.o Source/LibWebP/./src/dsp/dsp.cpu.o Source/LibWebP/./src/dsp/dsp.dec.o Source/LibWebP/./src/dsp/dsp.dec_clip_tables.o Source/LibWebP/./src/dsp/dsp.dec_mips32.o Source/LibWebP/./src/dsp/dsp.dec_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.dec_neon.o Source/LibWebP/./src/dsp/dsp.dec_sse2.o Source/LibWebP/./src/dsp/dsp.enc.o Source/LibWebP/./src/dsp/dsp.enc_avx2.o Source/LibWebP/./src/dsp/dsp.enc_mips32.o Source/LibWebP/./src/dsp/dsp.enc_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.enc_neon.o Source/LibWebP/./src/dsp/dsp.enc_sse2.o Source/LibWebP/./src/dsp/dsp.filters.o Source/LibWebP/./src/dsp/dsp.filters_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.filters_sse2.o Source/LibWebP/./src/dsp/dsp.lossless.o Source/LibWebP/./src/dsp/dsp.lossless_mips32.o Source/LibWebP/./src/dsp/dsp.lossless_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.lossless_neon.o Source/LibWebP/./src/dsp/dsp.lossless_sse2.o Source/LibWebP/./src/dsp/dsp.rescaler.o Source/LibWebP/./src/dsp/dsp.rescaler_mips32.o Source/LibWebP/./src/dsp/dsp.rescaler_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.upsampling.o Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.upsampling_neon.o Source/LibWebP/./src/dsp/dsp.upsampling_sse2.o Source/LibWebP/./src/dsp/dsp.yuv.o Source/LibWebP/./src/dsp/dsp.yuv_mips32.o Source/LibWebP/./src/dsp/dsp.yuv_mips_dsp_r2.o Source/LibWebP/./src/dsp/dsp.yuv_sse2.o Source/LibWebP/./src/enc/enc.alpha.o Source/LibWebP/./src/enc/enc.analysis.o Source/LibWebP/./src/enc/enc.backward_references.o Source/LibWebP/./src/enc/enc.config.o Source/LibWebP/./src/enc/enc.cost.o Source/LibWebP/./src/enc/enc.filter.o Source/LibWebP/./src/enc/enc.frame.o Source/LibWebP/./src/enc/enc.histogram.o Source/LibWebP/./src/enc/enc.iterator.o Source/LibWebP/./src/enc/enc.near_lossless.o Source/LibWebP/./src/enc/enc.picture.o Source/LibWebP/./src/enc/enc.picture_csp.o Source/LibWebP/./src/enc/enc.picture_psnr.o Source/LibWebP/./src/enc/enc.picture_rescale.o Source/LibWebP/./src/enc/enc.picture_tools.o Source/LibWebP/./src/enc/enc.quant.o Source/LibWebP/./src/enc/enc.syntax.o Source/LibWebP/./src/enc/enc.token.o Source/LibWebP/./src/enc/enc.tree.o Source/LibWebP/./src/enc/enc.vp8l.o Source/LibWebP/./src/enc/enc.webpenc.o Source/LibWebP/./src/utils/utils.bit_reader.o Source/LibWebP/./src/utils/utils.bit_writer.o Source/LibWebP/./src/utils/utils.color_cache.o Source/LibWebP/./src/utils/utils.filters.o Source/LibWebP/./src/utils/utils.huffman.o Source/LibWebP/./src/utils/utils.huffman_encode.o Source/LibWebP/./src/utils/utils.quant_levels.o Source/LibWebP/./src/utils/utils.quant_levels_dec.o Source/LibWebP/./src/utils/utils.random.o Source/LibWebP/./src/utils/utils.rescaler.o Source/LibWebP/./src/utils/utils.thread.o Source/LibWebP/./src/utils/utils.utils.o Source/LibWebP/./src/mux/mux.anim_encode.o Source/LibWebP/./src/mux/mux.muxedit.o Source/LibWebP/./src/mux/mux.muxinternal.o Source/LibWebP/./src/mux/mux.muxread.o Source/LibWebP/./src/demux/demux.demux.o Source/LibJXR/./image/decode/decode.o Source/LibJXR/./image/decode/JXRTranscode.o Source/LibJXR/./image/decode/postprocess.o Source/LibJXR/./image/decode/segdec.o Source/LibJXR/./image/decode/strdec.o Source/LibJXR/./image/decode/strdec_x86.o Source/LibJXR/./image/decode/strInvTransform.o Source/LibJXR/./image/decode/strPredQuantDec.o Source/LibJXR/./image/encode/encode.o Source/LibJXR/./image/encode/segenc.o Source/LibJXR/./image/encode/strenc.o Source/LibJXR/./image/encode/strenc_x86.o Source/LibJXR/./image/encode/strFwdTransform.o Source/LibJXR/./image/encode/strPredQuantEnc.o Source/LibJXR/./image/sys/adapthuff.o Source/LibJXR/./image/sys/image.o Source/LibJXR/./image/sys/strcodec.o Source/LibJXR/./image/sys/strPredQuant.o Source/LibJXR/./image/sys/strTransform.o Source/LibJXR/./jxrgluelib/JXRGlue.o Source/LibJXR/./jxrgluelib/JXRGlueJxr.o Source/LibJXR/./jxrgluelib/JXRGluePFC.o Source/LibJXR/./jxrgluelib/JXRMeta.o libfreeimage.a libfreeimage-3.17.0.so libfreeimage.so
make: make -j1 -f Makefile.gnu libfreeimage.a
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/BitmapAccess.cpp -o Source/FreeImage/BitmapAccess.o
Source/FreeImage/BitmapAccess.cpp:691:10: warning: 8 enumeration values not handled in switch: 'FIT_UNKNOWN', 'FIT_BITMAP', 'FIT_INT16'... [-Wswitch]
                switch(image_type) {
                       ^~~~~~~~~~
1 warning generated.
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/ColorLookup.cpp -o Source/FreeImage/ColorLookup.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/FreeImage.cpp -o Source/FreeImage/FreeImage.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/emcc -O3 -fPIC -fexceptions -fvisibility=hidden -DOPJ_STATIC -DNO_LCMS -DDISABLE_PERF_MEASUREMENT -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/FreeImageC.c -o Source/FreeImage/FreeImageC.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/FreeImageIO.cpp -o Source/FreeImage/FreeImageIO.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/GetType.cpp -o Source/FreeImage/GetType.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/MemoryIO.cpp -o Source/FreeImage/MemoryIO.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/PixelAccess.cpp -o Source/FreeImage/PixelAccess.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/J2KHelper.cpp -o Source/FreeImage/J2KHelper.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/MNGHelper.cpp -o Source/FreeImage/MNGHelper.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/Plugin.cpp -o Source/FreeImage/Plugin.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/PluginBMP.cpp -o Source/FreeImage/PluginBMP.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/PluginCUT.cpp -o Source/FreeImage/PluginCUT.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/PluginDDS.cpp -o Source/FreeImage/PluginDDS.o
/home/jrkb/git/tools/emsdk/upstream/emscripten/em++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/PluginEXR.cpp -o Source/FreeImage/PluginEXR.o
In file included from Source/FreeImage/PluginEXR.cpp:33:
In file included from Source/FreeImage/../OpenEXR/IlmImf/ImfOutputFile.h:46:
In file included from Source/OpenEXR/IlmImf/ImfHeader.h:51:
Source/OpenEXR/Imath/ImathVec.h:228:34: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    const Vec2 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:228:34: note: use 'noexcept(false)' instead
    const Vec2 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                        noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:232:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    Vec2<T>             normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:232:37: note: use 'noexcept(false)' instead
    Vec2<T>             normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                               noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:440:34: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    const Vec3 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:440:34: note: use 'noexcept(false)' instead
    const Vec3 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                        noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:444:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    Vec3<T>             normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:444:37: note: use 'noexcept(false)' instead
    Vec3<T>             normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                               noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:622:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    const Vec4 &    normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:622:37: note: use 'noexcept(false)' instead
    const Vec4 &    normalizeExc () throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:626:44: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
    Vec4<T>         normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:626:44: note: use 'noexcept(false)' instead
    Vec4<T>         normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:714:30: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec2<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:714:30: note: use 'noexcept(false)' instead
Vec2<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:723:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec2<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:723:37: note: use 'noexcept(false)' instead
Vec2<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:738:28: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec2<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:738:28: note: use 'noexcept(false)' instead
Vec2<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:747:35: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec2<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:747:35: note: use 'noexcept(false)' instead
Vec2<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:762:30: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec3<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:762:30: note: use 'noexcept(false)' instead
Vec3<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:771:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec3<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:771:37: note: use 'noexcept(false)' instead
Vec3<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:786:28: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec3<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:786:28: note: use 'noexcept(false)' instead
Vec3<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:795:35: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec3<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:795:35: note: use 'noexcept(false)' instead
Vec3<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:809:30: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec4<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:809:30: note: use 'noexcept(false)' instead
Vec4<short>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:818:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec4<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:818:37: note: use 'noexcept(false)' instead
Vec4<short>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:833:28: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec4<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:833:28: note: use 'noexcept(false)' instead
Vec4<int>::normalizeExc () throw (IEX_NAMESPACE::MathExc);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:842:35: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec4<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:842:35: note: use 'noexcept(false)' instead
Vec4<int>::normalizedExc () const throw (IEX_NAMESPACE::MathExc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:1212:26: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec2<T>::normalizeExc () throw (IEX_NAMESPACE::MathExc)
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:1212:26: note: use 'noexcept(false)' instead
Vec2<T>::normalizeExc () throw (IEX_NAMESPACE::MathExc)
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         noexcept(false)
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
em++: error: '/home/jrkb/git/tools/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -I/home/jrkb/git/tools/emsdk/upstream/emscripten/cache/sysroot/include/SDL --sysroot=/home/jrkb/git/tools/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/FreeImage/PluginEXR.cpp -o Source/FreeImage/PluginEXR.o' failed (returned 1)
make: *** [Makefile.gnu:64: Source/FreeImage/PluginEXR.o] Error 1
emmake: error: 'make -j1 -f Makefile.gnu libfreeimage.a' failed (returned 2)

 ^ Received error ^

using the --std=c++11 flag is used also for tvos here. When using it, FreeImage will compile smoothly like a baby's butt - even using the latest emsdk.

I hope that this clears it up!

danoli3 commented 1 year ago

use the 3.18.0 or main branch ! ILM code needs to be removed as is in 3.18.0 I'll check in with freeiage devs soon

themancalledjakob commented 1 year ago

I thought simply adding the --std=c++11 flag would be helpful for making the latest emsdk work with minimal effort, but I don't want to interfere if you prefer avoiding it or have already other solutions lined up. Should I close this issue and PR then?

Are you trying to use emscripten with C++17 or C++11 ?

I am compiling FreeImage with C++11, but oF and my projects with C++17. This works fine.

use the 3.18.0 or main branch ! ILM code needs to be removed as is in 3.18.0

Yep, with GIT_TAG=3.18.0_cpp17 or GIT_TAG=master it does indeed compile fine, when commenting out this line. Probably the formula would have to be slightly adjusted for other platforms as well in that case.

By the way, with the --std=c++11 flag, also the original FreeImage 3.18.0 from sourceforge compiles and runs fine for emscripten, though the binary is twice the size compared with compiling from your repo. Is that weird?

danoli3 commented 1 year ago

3.18.0 / master on the github clone should be significantly smaller as it removes LibRAWLite and OpenEXR. Both removed for SECURITY reasons I have reported to Unity, Unreal and FreeImage countless times.

themancalledjakob commented 1 year ago

that makes sense. alright, then I guess the way to go is to use your 3.18.0_cpp17 branch, and check all platforms if the formula has to be adjusted?

ofTheo commented 1 year ago

@themancalledjakob - wow, thanks for the really detailed explanation. That is super clear!

I totally agree then, def feel free to switch it to c++11 ( if it works with @danoli3's branch that's great, but if it causes other platforms to fail, we can keep the branch as is ).

@danoli3 Does the recent changes to use LibRaw 0.20.2 fix your concerns? https://sourceforge.net/p/freeimage/svn/1903/

danoli3 commented 1 year ago

That definitely gets the big ones on lib raw, may more https://sourceforge.net/p/freeimage/discussion/36111/thread/c3c2300793/

Looks like other Devs at Nvidia and Google are trying to patching FreeImage themselves internally https://sourceforge.net/p/freeimage/discussion/36109/thread/2018fdc6e7/

That project needs GitHub

themancalledjakob commented 1 year ago

hey @ofTheo very happy it was clear! i find it super hard to explain these things with words :)

I noticed that other platforms definitely fail, e.g. due to trying to patch some removed files. So I did hand in one PR #254 which fixes the issue by only targeting the emscripten build type, and leaves the rest as before. Should this feel like cluttering or complicating the formula too much, I also added a second PR #255 with the cpp11-fix. Is that a good way of doing this, or do you prefer to have a single PR and the contributor makes the decision?

@danoli3 can you confirm, that the 3.18.0_cpp17 branch is correct? btw, thanks for your input! super interesting, didn't know about these issues.