Summary: | sys-libs/glibc-2.22-r1: Cannot compile program using *addrinfo struct/functions and -D_POSIX_C_SOURCE=1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | gentoo-user |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | floppym |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceware.org/bugzilla/show_bug.cgi?id=18529 | ||
See Also: | https://sourceware.org/bugzilla/show_bug.cgi?id=18529 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
gentoo-user
2015-10-29 14:27:52 UTC
So I tried downgrading glibc, it didn't really work: glibc-2.22-r1] bash: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. * The ebuild phase 'postrm' has been killed by signal 6. bash: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. Sandboxed process killed by signal: Aborted Now when I try running most programs I get a loadlocale error: locale: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. I guess it's restore from backup time. Compiling the test program works with sys-libs/glibc-2.21-r1 Why are you setting _POSIX_C_SOURCE to 1? Your test program compiles sucessfully when that is unset or set to a greater value like 200809L. I defined _POSIX_C_SOURCE 1 because the original program that had the error uses std=c99 (instead of the default gnu89) and because of getaddrinfo(3): Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getaddrinfo(), freeaddrinfo(), gai_strerror(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE Was this just a case of glibc being out of date with sys-apps/man-pages? Changing the define for _POSIX_C_SOURCE to 200809L fixes compilation on glibc-2.22. Should I file a bug against sys-apps/man-pages? Let's let the toolchain guys weigh in. the change in question was deliberate -- see upstream report: https://sourceware.org/bugzilla/show_bug.cgi?id=18529 the man-page is incorrect, but that has been reported already: http://article.gmane.org/gmane.linux.man/9657/match=getaddrinfo |