[cfe-dev] libc++: __locale:24:7: error: '_AIX' is not defined, evaluates to 0 [-Werror, -Wundef]

Johan Bergström bugs at bergstroem.nu
Thu Mar 6 16:39:09 PST 2014


(please CC, not on list)

While building Xapian on OS X with a recent version of Clang/LLVM HEAD I encountered the following error:

libtool: compile:  clang++-3.5 -stdlib=libc++ -DHAVE_CONFIG_H -I. -I./common -I./include -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wshadow -Wstrict-overflow=1 -Winit-self -Wmissing-declarations -Werror -fvisibility=hidden -nostdinc++ -I/usr/local/lib/llvm-3.5/include/c++/v1 -MT api/compactor.lo -MD -MP -MF api/.deps/compactor.Tpo -c api/compactor.cc  -fno-common -DPIC -o api/.libs/compactor.o
In file included from api/compactor.cc:30:
In file included from /usr/local/lib/llvm-3.5/include/c++/v1/fstream:169:
In file included from /usr/local/lib/llvm-3.5/include/c++/v1/ostream:131:
In file included from /usr/local/lib/llvm-3.5/include/c++/v1/ios:216:
/usr/local/lib/llvm-3.5/include/c++/v1/__locale:24:7: error: '_AIX' is not defined, evaluates to 0 [-Werror,-Wundef]
#elif _AIX
      ^
1 error generated.
make[3]: *** [api/compactor.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

Attached patch should fix it.

--
Johan Bergström
bugs at bergstroem.nu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: aix_defined.diff
Type: application/octet-stream
Size: 485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140307/f24df0db/attachment.obj>


More information about the cfe-dev mailing list