[sudo-users] Problem compiling sudo with static libs

Chris Butler ccbutler at gmail.com
Wed Oct 1 08:39:46 MDT 2014


Hi,

New member here - I'm trying to compile sudo (with static libraries) in a
Solaris 10 environment, running the following:

./configure --disable-shared-libutil --enable-static-sudoers
make

...but, I get an error while compiling src/preload.c:

cc -c -I../include -I.. -I. -I. -I.. -D__STDC_WANT_LIB_EXT1__=1 -g
-xldscope=hidden   -D__EXTENSIONS__ -DLOCALEDIR=\"/usr/local/share/locale\"
./preload.c

"../include/sudo_compat.h", line 377: syntax error before or at: gid_t

"../include/sudo_compat.h", line 377: warning: undefined or missing type
for: gid_t

"../include/sudo_compat.h", line 377: warning: undefined or missing type
for: int

"../include/sudo_compat.h", line 382: warning: no explicit type given

"../include/sudo_compat.h", line 382: warning: old-style declaration or
incorrect type for: ssize_t

"../include/sudo_compat.h", line 382: syntax error before or at:
sudo_getline

"../include/sudo_compat.h", line 382: warning: old-style declaration or
incorrect type for: sudo_getline

cc: acomp failed for ./preload.c

*** Error code 2

make: Fatal error: Command failed for target `preload.o'

Current working directory /export0/home/testuser/sudo_ccb2/sudo-1.8.11/src

*** Error code 1

make: Fatal error: Command failed for target `all'


If I add '#include <sys/types.h>' in src/preload.c , I can get it to
compile cleanly, but I'm wondering if there's a config option I can use
instead to achieve the same result?  I see that most (all?) of the other
*.c files that include "sudo_compat.h" also include "<sys/types.h>"...
Could this be a bug?


Thanks,

-Chris


More information about the sudo-users mailing list