misc/182175: libc++ iostream initialization problem
egor.shibeko at gmail.com
Tue Sep 17 01:30:00 UTC 2013
>Synopsis: libc++ iostream initialization problem
>Arrival-Date: Tue Sep 17 01:30:00 UTC 2013
>Originator: Yahor Shybeka
FreeBSD err0r-laptop.err0r-house 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Sat Sep 14 05:39:27 EDT 2013 root at err0r-laptop.err0r-house:/usr/obj/usr/src/sys/GENERIC amd64
It looks like libc++ in base doesn't have static instance of std::ios_base::Init in <iostream>, a trick which you can find in GCC's header:
static ios_base::Init __ioinit;
It was discussed with libc++ developer here - http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077141.html. I'm not sure about shared library initialization order in FreeBSD, but I think it's a problem with libc++.a anyway.
check the libc++ sources
add static instance of ios::base::Init into <iostream>.
More information about the freebsd-bugs