[MacPorts] #67439: openimageio: fallback version build fails for some macOS releases: link failure, or redefinition of 'get_file'

MacPorts noreply at macports.org
Tue May 16 11:18:27 UTC 2023


#67439: openimageio: fallback version build fails for some macOS releases: link
failure, or redefinition of 'get_file'
---------------------+-------------------------
 Reporter:  mascguy  |      Owner:  mascguy
     Type:  defect   |     Status:  assigned
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.8.1
 Keywords:           |       Port:  openimageio
---------------------+-------------------------
 While the fallback version does build successfully for some older
 releases, it fails on 10.8 with a link error:

 {{{
 Undefined symbols for architecture x86_64:
   "std::__1::__get_sp_mut(void const*)", referenced from:
 __ZNSt3__111atomic_loadB7v160003IN16OpenImageIO_v2_110ImageInputEEENS_10shared_ptrIT_EEPKS5_
 in imagecache.cpp.o
 __ZNSt3__115atomic_exchangeB7v160003IN16OpenImageIO_v2_110ImageInputEEENS_10shared_ptrIT_EEPS5_S5_
 in imagecache.cpp.o
   "std::__1::__sp_mut::lock()", referenced from:
 __ZNSt3__111atomic_loadB7v160003IN16OpenImageIO_v2_110ImageInputEEENS_10shared_ptrIT_EEPKS5_
 in imagecache.cpp.o
 __ZNSt3__115atomic_exchangeB7v160003IN16OpenImageIO_v2_110ImageInputEEENS_10shared_ptrIT_EEPS5_S5_
 in imagecache.cpp.o
   "std::__1::__sp_mut::unlock()", referenced from:
 __ZNSt3__111atomic_loadB7v160003IN16OpenImageIO_v2_110ImageInputEEENS_10shared_ptrIT_EEPKS5_
 in imagecache.cpp.o
 __ZNSt3__115atomic_exchangeB7v160003IN16OpenImageIO_v2_110ImageInputEEENS_10shared_ptrIT_EEPS5_S5_
 in imagecache.cpp.o
 }}}

 While for 10.11 and others, `get_file` is being redefined by dependency
 `libfmt9`:

 {{{
 In file included from
 openimageio/work/oiio-2.1.20.0/src/include/OpenImageIO/strutil.h:48:
 /opt/local/include/libfmt9/fmt/ostream.h:78:16: error: redefinition of
 'get_file'
   friend FILE* get_file(filebuf_type& buf) { return buf.*file; }
                ^
 /opt/local/include/libfmt9/fmt/ostream.h:80:16: note: in instantiation of
 template class
 'fmt::v9::detail::filebuf_access<fmt::v9::detail::(anonymous
 namespace)::filebuf_access_tag, decltype(&filebuf_type::_Myfile),
 &filebuf_type::_Myfile>' requested here
 template class filebuf_access<filebuf_access_tag,
                ^
 /opt/local/include/libfmt9/fmt/ostream.h:78:16: note: previous definition
 is here
   friend FILE* get_file(filebuf_type& buf) { return buf.*file; }
                ^
 }}}

 The latter is likely related to the header directory search order, since
 we have to tweak that to ensure that `openexr2` is picked up - via it's
 segregated location - rather than `openexr`. So perhaps it's a matter of
 ensuring that `libfmt9` - also segregated - is added to the end of the
 search path. (Or earlier, depending on what the order is.)

-- 
Ticket URL: <https://trac.macports.org/ticket/67439>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list