- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just upgraded our Intel C to
composer_xe_2011_sp1.8.273but now gets errors as shown below. Any suggestions?
-gcc-name=/remote/public/linux/64-x86/gcc/4.6.0/bin/gcc -gcc-version=460 [A lot stuff deleted.]
src/cpub/countcpu.c/usr/include/string.h(546): error: identifier "__locale_t" is undefined __locale_t __loc) ^
/usr/include/string.h(547): error: attribute "nonnull" references nonpointer parameter __THROW __attribute_pure__ __nonnull ((1, 2, 3)); ^
/usr/include/string.h(550): error: identifier "__locale_t" is undefined size_t __n, __locale_t __loc) ^
/usr/include/string.h(551): error: attribute "nonnull" references nonpointer parameter __THROW __attribute_pure__ __nonnull ((1, 2, 4));
/usr/include/string.h(547): error: attribute "nonnull" references nonpointer parameter __THROW __attribute_pure__ __nonnull ((1, 2, 3)); ^
/usr/include/string.h(550): error: identifier "__locale_t" is undefined size_t __n, __locale_t __loc) ^
/usr/include/string.h(551): error: attribute "nonnull" references nonpointer parameter __THROW __attribute_pure__ __nonnull ((1, 2, 4));
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting erling_andersen
...Any suggestions?...
src/cpub/countcpu.c/usr/include/string.h(546): error: identifier "__locale_t" is undefined __locale_t __loc)
It looks like some headers are not included. My version of 'string.h' doesn't have any references to '_locale_t'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think those definitions are in an include file.
Some more information. On another system it works. I have included some information about the diference in string.h file for those 2 systems.Good system:
#ifdef __USE_GNU
/* The following functions are equivalent to the both above but they
take the locale they use for the collation as an extra argument.
This is not standardsized but something like will come. */
# include
/* Compare the collated forms of S1 and S2 using rules from L. */
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
__THROW __attribute_pure__ __nonnull ((1, 2, 3));
/* Put a transformation of SRC into no more than N bytes of DEST. */
extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) __THROW __nonnull ((2, 4));
#endif
Bad system:
#ifdef __USE_XOPEN2K8
/* The following functions are equivalent to the both above but they
take the locale they use for the collation as an extra argument.
This is not standardsized but something like will come. */
# include
/* Compare the collated forms of S1 and S2 using rules from L. */
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
__THROW __attribute_pure__ __nonnull ((1, 2, 3));
/* Put a transformation of SRC into no more than N bytes of DEST. */
extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) __THROW __nonnull ((2, 4));
#endif
/* Return a malloc'd copy of at most N bytes of STRING. The
resultant string is terminated even if no null terminator
appears before STRING. */
#if defined __USE_XOPEN2K8
extern char *strndup (__const char *__string, size_t __n)
__THROW __attribute_malloc__ __nonnull ((1));
#endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not have the problem on CentOS 5.6 but the problem is on CentOS 6.2.
So the issue seems to be related to version of the OS and hence to the installed include files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FYI.
We build the gcc compiler ourself. It seems if GCC is build on old platform without Posix 2008 support then things does not work.We now rebuild gcc on a newer system and it works then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for posting the reason and solution here.
Jennifer
Jennifer

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page