This is related to PR 196712 and blocks updating the default version of GCC from 4.8 to 4.9. I believe what is happening here is that OpenEXR uses GCC on older versions of FreeBSD and when linking with the OpenEXR libraries we then fail to pull in the proper NEWER GCC run-time libraries. This can be fixed by building (or at least linking) with the same compiler that OpenEXR is built with. See OpenEXR/Makefile for how this is done there. http://package18.nyi.freebsd.org/data/93i386-default-PR196712/2015-01-18_16h49m19s/logs/errors/openimageio-1.4.14_2.log /usr/bin/c++ -O2 -pipe -fno-strict-aliasing -march=i586 -O2 -pipe -fno-strict-aliasing CMakeFiles/iconvert.dir/iconvert.cpp.o -o iconvert -L/usr/local/lib ../libOpenImageIO/libOpenImageIO.so.1.4.14 /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_thread.so /usr/local/lib/libHalf.so /usr/local/lib/libIex.so /usr/local/lib/libImath.so /usr/local/lib/libIlmThread.so -pthread -lopencv_core -lopencv_highgui -lssl -lcrypto /usr/local/lib/libHalf.so /usr/local/lib/libIex.so /usr/local/lib/libImath.so /usr/local/lib/libIlmThread.so /usr/local/lib/libpng.so -lz /usr/local/lib/libtiff.so /usr/local/lib/libjpeg.so -lz /usr/local/lib/libtiff.so /usr/local/lib/libjpeg.so /usr/local/lib/libopenjpeg.so /usr/local/lib/libwebp.so /usr/local/lib/libIlmImf.so /usr/local/lib/libgif.so -Wl,-rpath,/usr/local/lib:/wrkdirs/usr/ports/graphics/openimageio/work/.build/src/libOpenImageIO: /usr/local/lib/libIlmImf.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' *** [src/iconvert/iconvert] Error code 1
Maintainer CC'd
Created attachment 153568 [details] update for gcc4.9 as default version I see no problem adding USE_GCC=yes when gcc is being used. This also cascades into graphics/opencolorio (as master port for opencolorio-tools) and graphics/openshadinglanguage which also link with openimageio. graphics/blender also uses these ports but already has the USE_GCC in place. One consolidated patch for all three ports - similar change to each.
Created attachment 153569 [details] update for gcc4.9 as default version small adjustment to opencolorio patch. Need to use both options.mk and pre.mk to pickup cmake and pkgconf as dependencies.
Cool, thanks for this patch! I applied the one to graphics/openimageio. Did you observe the other two ports -- graphics/opencolorio and graphics/openshadinglanguage -- fail? They did not show up in the full ports rebuild report in PR 196712, hence this question. If you want these two change as well, I will be happy to commit them for you. I just wanted to double check.
Yes I did, only reason I updated them as well - as openimageio is a dependency graphics/opencolorio-tools and graphics/openshadinglanguage won't start to build until openimageio completes, which is why they haven't shown up yet.
This duplicates needless conditional compiler selection logic from OpenEXR. As I suggested in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196712, it'd be better to use compiler:c++11-lib everywhere instead, which essentially does the same thing (noop on 10.x, recent gcc on pre-10), but is shorter, more flexible and future-proof.
Created attachment 153817 [details] update for gcc4.9 as default version USES=compiler:c++11-lib works fine in my tests. Update patch to use that instead of USES_GCC
Now that OpenEXR was fixed, there's no longer need for any hacks, so I suggest to just rollback original change. Patch follows.
Created attachment 155360 [details] Patch
A commit references this bug: Author: amdmi3 Date: Sat Jun 27 13:27:10 UTC 2015 New revision: 390701 URL: https://svnweb.freebsd.org/changeset/ports/390701 Log: - Remove compiler tampering This is no longer needed after the same thing was removed from OpenEXR, and moreover it breaks opencolorio-tools on 9.x PR: 197907 Approved by: portmgr blanket, maitainer timeout Changes: head/graphics/openimageio/Makefile