Open Quuxplusone opened 6 years ago
Bugzilla Link | PR37596 |
Status | NEW |
Importance | P normal |
Reported by | Brian Vandenberg (phantall@gmail.com) |
Reported on | 2018-05-25 15:28:33 -0700 |
Last modified on | 2018-05-25 18:27:02 -0700 |
Version | 6.0 |
Hardware | Sun Solaris |
CC | llvm-bugs@lists.llvm.org, mclow.lists@gmail.com, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Does this compile if you add defined(sun) to the list of cases for which we avoid including
I can give it a shot, but there /is/ an xlocale.h for solaris:
projects/libcxx/include/support/solaris/xlocale.h
My bet is something in the build should be adding
projects/libcxx/include/support/solaris to the inclusion list, but I'm not sure
where to add that if I'm correct.
Here's what trunk __locale says:
[...]
#elif defined(__sun__)
# include <xlocale.h>
# include <support/solaris/xlocale.h>
#elif defined(_NEWLIB_VERSION)
# include <support/newlib/xlocale.h>
#elif (defined(__APPLE__) || defined(__FreeBSD__) \
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
# include <xlocale.h>
[...]
... so we explicitly include that support/solaris/xlocale.h header, but *first*
try to pick up a nonexistent version from the machine. =(
It looks like support/solaris/xlocale.h doesn't do anything useful -- it
defines the locale-specific versions of various functions as simply ignoring
the specified locale. =(
Can you try removing the <xlocale.h> include from the defined(__sun__) block
and see if that helps?
It results in a bunch of "locale_t not defined" errors.
It looks like xlocale.h comes from glibc. If you look at the history for
include/support/solaris/xlocale.h, on Jan 23 2015 a commit was pushed titled
"Get libc++ building on Sun Solaris. Patch from C Bergstrom" that, among other
things, removed this line:
typedef struct _LC_locale_t* locale_t;
My bet is anyone who's able to get it building in Solaris either has a patch
installed I don't know about or they're using Solaris 11.
I'm going to put that line back in and see what happens.
It looks like I'm running into the problem referred to in this thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-July/102072.html