Hi there,
I’m using OpenImageIO in a cross platform application without issues (macOS,
CentOS, Windows)
I just started building the parts that use OpenImageIO for iOS and I have run
into this issue when I try to run it on devices, it runs fine on the simulator
under arch x86_64 but crashes with assertion failure under arm64.
It’s a bit weird, I might be completely wrong but I think that this used to
work last year or the year before, so I’m wondering if it could be an arm64
thing since previous years I was testing with armv7 and never tested on device
an arm4 build...
I’m using llvm/clang c++ (*not* gnu++ compatibility mode) and libc++ (looking
at ustring.cpp looks like the tests are different for different stdlibs)
I’ve added the following to print the output and looks like both address & size
are off
std::cout << (void*) str.c_str() <<" "<< (void*)c_str() << " "<< str.size() <<
" " << length << std::endl; // just before assert
>>> 0x14e4ac808 0x14e4ac838 0 101
DASSERT (str.c_str() == c_str() && str.size() == length); //original oiio assert
>>> oiio/src/libutil/ustring.cpp:359: failed assertion 'str.c_str() ==
c_str() && str.size() == length’
Actually as I was writing this, I remembered that I had a “working” build of
v1.6.16 from last year (although built with c++11 and stdlib++) which used to
work, I just tested linking against it and I get some visibility warnings but
the build works great on arm64. I’m even more confused now.
I guess that my question is, is there anything that I should account for when
building OIIO for arm64? It’s probably only ustring that doesn’t work. I would
like to use the latest, in a cleaner state, this hack is more of a proof of
concept to confirm that I haven’t gone mad and it did work at some point.
I must say that the way I’m building it is far from ideal, I’m basically:
grabbing all sources, sticking them into a project, and making a fat static lib
that includes all possible architectures and the image formats I’m after.
Unfortunately that’s the only way for iOS since it only supports static
libraries for AppStore apps. Or does anyone have another way around it?
Cheers!
-Javier.
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org