Aha, I was aware that they changed the internal layout of std::string, so I 
knew this would pop its head up one of these days.  Lots of us use clang, but 
perhaps you're the first to try with libc++ (rather than using clang with the 
regular gnu libraries).  I think I have a quick fix, stay tuned.

        -- lg


On Oct 11, 2013, at 1:54 AM, Shane Ambler wrote:

> Hi all.
> 
> I am attempting to get ocio oiio and osl building on FreeBSD 10.0. For
> those that don't know 10.0 has recently gone alpha aiming for release in
> a few months. The main change would be clang 3.2 and the new libc++ from
> libcxx.llvm.org while removing the old gcc compiler and libs from a base
> install. These build and run fine on freebsd 9.2 using clang 3.2 which
> still has the gcc libs.
> 
> I adjusted ocio to test for _LIBCPP_VERSION and use std::shared_ptr
> instead of tr1::shared_ptr
> 
> To get oiio 1.2.2 compiling I updated to pugixml 1.2 (external)
> 
> While oiio then compiles ok, when building osl I get oslc triggering the
> DASSERT on line 137 of libutil/ustring.cpp when it tries to compile the
> contained osl scripts.
> 
> I have tried the non-gcc fallback in ustring.cpp without luck.
> 
> The libc++ string file includes a _LIBCPP_ALTERNATE_STRING_LAYOUT option
> that also doesn't help.
> 
> I am guessing that an adjustment needs to be made with ustring to work
> with libc++ but I'm not sure where to start.
> 
> 
> thanks.
> 
> 
> Running the osl compile step in gdb I get the following backtrace --
> 
> /usr/ports/graphics/openimageio/work/OpenImageIO-oiio-f9d8f1b/src/libutil/ustring.cpp:137:
>  failed assertion 'str.c_str() == c_str()'
> 
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 819406400 (LWP 100230/oslc)]
> 0x000000080344998a in thr_kill () from /lib/libc.so.7
> (gdb) bt
> #0  0x000000080344998a in thr_kill () from /lib/libc.so.7
> #1  0x0000000803518259 in abort () from /lib/libc.so.7
> #2  0x000000080196d120 in TableRep (this=0x81943c3d0, s=0x801bb50b8 
> "resolution", len=10)
>    at 
> /usr/ports/graphics/openimageio/work/OpenImageIO-oiio-f9d8f1b/src/libutil/ustring.cpp:137
> #3  0x000000080196d607 in OpenImageIO::v1_2::ustring::make_unique 
> (str=0x801bb50b8 "resolution")
>    at 
> /usr/ports/graphics/openimageio/work/OpenImageIO-oiio-f9d8f1b/src/libutil/ustring.cpp:196
> #4  0x000000080110118f in ustring (this=0x801f21e20, str=0x801bb50b8 
> "resolution") at ustring.h:166
> #5  0x000000080110114d in ustring (this=0x801f21e20, str=0x801bb50b8 
> "resolution") at ustring.h:167
> #6  0x00000008019ae35b in __cxx_global_var_init16 ()
>    at 
> /usr/ports/graphics/openimageio/work/OpenImageIO-oiio-f9d8f1b/src/libtexture/imagecache.cpp:80
> #7  0x00000008019c8a39 in global constructors keyed to a ()
>    at 
> /usr/ports/graphics/openimageio/work/OpenImageIO-oiio-f9d8f1b/src/libtexture/imagecache.cpp:229
> #8  0x0000000801ba83b2 in __do_global_ctors_aux () from 
> /usr/local/lib/libOpenImageIO.so.1.2
> #9  0x00000008015a7d0e in _init () from /usr/local/lib/libOpenImageIO.so.1.2
> #10 0x00007fffffffccc0 in ?? ()
> #11 0x0000000800616701 in objlist_call_init () from /libexec/ld-elf.so.1
> #12 0x0000000800615c97 in _rtld () from /libexec/ld-elf.so.1
> #13 0x0000000800614089 in .text () from /libexec/ld-elf.so.1
> #14 0x0000000000000000 in ?? ()
> (gdb)
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to