- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- erors in grep compilation
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2008 09:55 PM
05-02-2008 09:55 PM
erors in grep compilation
I am compilling grep.c file using cc.I got the errors like bellow . also i gave the portion of "string.h" file .plz check it, how can i solve this ?
c -c grep.c
sr/include/string.h", line 104: error #2040: expected an identifier
extern char *strerror(int);
^
sr/include/string.h", line 104: error #2018: expected a ")"
extern char *strerror(int);
^
ep.c", line 1509: error #2020: identifier "PACKAGE_BUGREPORT" is undefined
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
^
ep.c", line 2097: error #2020: identifier "STDOUT_FILENO" is undefined
if(isatty(STDOUT_FILENO) && getenv("TERM") &&
^
ep.c", line 2181: error #2020: identifier "PACKAGE_STRING" is undefined
printf ("%s\n\n", PACKAGE_STRING);
^
rrors detected in the compilation of "grep.c".
"string.h" file :
/* These functions are defined in
#endif /* defined(__HP_NO_STRING_OVERLOADS) || ... */
extern char *strtok(char *, const char *);
extern char *strerror(int);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2008 10:00 PM
05-02-2008 10:00 PM
Re: erors in grep compilation
Sorry , last time it is not fully copied.
errors are like this.
$ cc -c grep.c
"/usr/include/string.h", line 104: error #2040: expected an identifier
extern char *strerror(int);
^
"/usr/include/string.h", line 104: error #2018: expected a ")"
extern char *strerror(int);
^
"grep.c", line 1509: error #2020: identifier "PACKAGE_BUGREPORT" is undefined
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
^
"grep.c", line 2097: error #2020: identifier "STDOUT_FILENO" is undefined
if(isatty(STDOUT_FILENO) && getenv("TERM") &&
^
"grep.c", line 2181: error #2020: identifier "PACKAGE_STRING" is undefined
printf ("%s\n\n", PACKAGE_STRING);
^
5 errors detected in the compilation of "grep.c".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2008 10:40 PM
05-02-2008 10:40 PM
Re: erors in grep compilation
Are you using evil macros?
Compile with -H to get the include hierarchy.
Compile with -E -.i then look at grep.i to see what's going on with macros on line 104.
error #2020: identifier "PACKAGE_BUGREPORT" is undefined
error #2020: identifier "STDOUT_FILENO" is undefined
error #2020: identifier "PACKAGE_STRING" is undefined
Where should these be defined?
The middle one is indirectly from
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2008 04:32 AM
05-03-2008 04:32 AM
Re: erors in grep compilation
"grep.c" from where? Which "cc"? On what?
If this is part of a GNU "grep" kit, then you
might do better if you followed the
installation instructions (normally in
"INSTALL"), normally something like:
./configure
make
Otherwise, you might look for a pre-built kit
(depot) for your (undisclosed) OS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2008 03:02 PM
05-03-2008 03:02 PM
Re: erors in grep compilation
This is obviously aCC6 on 11.23/11.31 IPF system.