Bug 754 - Make failure of sudo on HP 11v31.
Make failure of sudo on HP 11v31.
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Configure
1.8.17
HP HP-UX
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-08 14:50 MDT by jim.flanigan
Modified: 2016-08-09 11:43 MDT (History)
0 users

See Also:


Attachments
Compile listing with -E (27.74 KB, application/x-gzip-compressed)
2016-08-08 14:50 MDT, jim.flanigan
Details
HP 11v31 /usr/include/regex.h (1.59 KB, application/x-gzip-compressed)
2016-08-08 14:52 MDT, jim.flanigan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jim.flanigan 2016-08-08 14:50:49 MDT
Created attachment 480 [details]
Compile listing with -E

We have recently decided to use SUDO in our environment.   As a result I have downloaded the latest version for compile on HP 11v31.  HP does not provide a current sudo.  the version that they provide is 1.8.6p3 and it does not work.  So I decided to go straight to SUDO.  Anyway the make of the product version fails with the following message.

        gcc -std=gnu99 -c -I../../include -I../.. -I. -I.  -I../.. -DLIBDIR=\"/opt/sudo/lib\" -DLOCALEDIR=\"/opt/sudo/share/locale\"  -D_PATH_SUDOERS=\                           "/etc/sudoers\"  -DSUDOERS_UID=0 -DSUDOERS_GID=0  -DSUDOERS_MODE=0440 -D_FORTIFY_SOURCE=2 -g -O2 -fvisibility=hidden   ./sudoreplay.c
In file included from ./sudoreplay.c:47:
/usr/include/regex.h:118: error: static or type qualifiers in abstract declarator
*** Error exit code 1

Since the version the HP does provide is 1.8.6p3 I downloaded the version on your site 1.8.6p8.   The make of this version completes properly.

To make a long story shorter I downloaded all the versions between 1.8.6p8 and 1.8.17p1, all version prior and including 1.8.11p2 make properly while 1.8.12 and all later versions do not.  I used the same configure options on all the builds.

All fail with the same error pointing to the same regex.h file.

As for the environment, it is HP 11v31.  The compiler is gcc 4.2.3.

Any suggestions would be most helpful.

Included is the HP regex.h and a stand alone compile of sudoreplay.c with the -E option turned on.

Thanks
Comment 1 jim.flanigan 2016-08-08 14:52:07 MDT
Created attachment 481 [details]
HP 11v31 /usr/include/regex.h
Comment 2 Todd C. Miller 2016-08-08 14:56:50 MDT
HP's regex.h is incompatible with gcc, which requires a variable name to use the array syntax with __restrict.  If you change regex.h as follows it should compile.

extern  int     regexec __((const regex_t * __restrict, const char * __restrict, size_t, regmatch_t __pmatch[__restrict], int));
Comment 3 jim.flanigan 2016-08-09 11:43:16 MDT
Your solution worked great.  Thanks.