in case anyone else comes across this (ive seen a few packages lately) ...

* symptom: build fails with -O0 but not with -O1 when nls support is enabled
* error: LC_MESSAGES/LC_CTYPE/LC_ALL/LC_<something> is undefined and/or 
functions like setlocale()/textdomain()/etc... are implicitly defined
* short answer: broken build system doesnt properly include locale.h

* long answer:
the reason -O1 and better "works" is because glibc will include locale.h 
automagically via some headers (like libintl.h) whenever optimization is 
enabled so as to get inline/optimized versions of some functions.  when 
optimization is disabled, glibc will not include locale.h for you and the 
build fails.  so make sure the configure script checks for locale.h and has a 
bit of code like:
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif

for example:
http://bugs.gentoo.org/121920
-mike
-- 
gentoo-dev@gentoo.org mailing list

Reply via email to