[sudo-workers] sudo-1.8.22b1 - packaging on AIX (from git)

Michael Felt michael at felt.demon.nl
Sat Dec 9 07:17:35 MST 2017


On 09/12/2017 13:24, Todd C. Miller wrote:
> On Sat, 09 Dec 2017 10:04:15 +0100, Michael Felt wrote:
>
>> a.2) Do you want to continue this in emails only, or should I open an
>> issue on github (or elsewhere)?
> Email is OK for now.  I don't really look at the github issues.
>
>> b.2): this concerns 'make check - on NFS, and no sudo installed (only
>> the out-of-tree build directory)
>>
>> a) duplicate symbol
> That is harmless and in fact required or the test will not run
> correctly.  For whatever reason, gcc doesn't complain about this.
On AIX is is actually 'ld' that is 'warning' about the duplicate symbol. 
Maybe an additional flag for GNU ld would also generate this warning.
>
>> b) - make check failure maybe related to my building on NFS shares:
> This appears to either be an artifact of your build process.  Are
> you running make in parallel mode (with -j)?

No. Not running with -j.

After copying the src/sudo-rbac-1.8.22b1 to a local disk, so, it looks like:

michael at x071:[/var/prj/sudo]ls -ld * src/*
drwx------  3 root    system  256 Dec  9 13:04 src
drwx--S--- 13 michael felt   4096 Dec  8 18:11 src/sudo-rbac-1.8.22b1
drwx------ 12 root    system 4096 Dec  9 13:09 sudo-rbac-1.8.22b1

Build completed successfully (with touch of ChangeLog, see other mail), 
and make check completes successfully. (p.s., I noticed there is not a 
'summary' of all the tests, but scrolling through the output it seems 
they all succeeded).

FYI: here is one difference (no .nfs* directory):

michael at x071:[/var/prj/sudo/sudo-rbac-1.8.22b1]find . -name libsudo_util.so
./lib/util/.libs/libsudo_util.so

>> C): Something new: after having run make check, make refuses to run.
> In the past you've had problems with something removing bits of
> your build dir. I don't think it was reproducible outside your build
> script, was it?
And, FYI - in the 'local' build, make continues to work, in the NFS 
project area, make is broken again.
>
> Also, there should be no need to set LIBPATH, libtool should handle
> that for you.

Libtool is doing that - but that only works (i.e., is accurate) AFTER 
the project has been installed.

For the 'check' there is a -L argument being passed, asin:

libtool: link: xlc_r -o .libs/vsyslog_test .libs/vsyslog_test.o 
.libs/vsyslog.o -Wl,-brtl  -L./.libs -lsudo_util 
-Wl,-blibpath:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib

and

libtool: link: xlc_r -o .libs/check_symbols check_symbols.o -Wl,-brtl  
-L../../lib/util/.libs -lsudo_util 
-Wl,-blibpath:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib


Looking closer: the NFS check starts okay - then fails:

libtool: link: xlc_r -o .libs/vsyslog_test .libs/vsyslog_test.o 
.libs/vsyslog.o -Wl,-brtl  -L./.libs -lsudo_util 
-Wl,-blibpath:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib
ld: 0711-224 WARNING: Duplicate symbol: .sudo_vsyslog
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
parse_gids_test: 6 tests run, 0 errors, 100% success rate
strsplit_test: 29 tests run, 0 errors, 100% success rate
fnmatch: 6 tests run, 0 errors, 100% success rate
Could not load program 
/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1/lib/.nfs75C/.libs/lt-atofoo_test:
         Dependent module libsudo_util.so could not be loaded.
Could not load module libsudo_util.so.
System error: No such file or directory
Could not load program 
/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1/lib/.nfs75C/.libs/lt-hltq_test:
         Dependent module libsudo_util.so could not be loaded.
Could not load module libsudo_util.so.
System error: No such file or directory
Could not load program 
/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1/lib/.nfs75C/.libs/lt-vsyslog_test:
         Dependent module libsudo_util.so could not be loaded.
Could not load module libsudo_util.so.
System error: No such file or directory
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 2.


Stop.

So, in the 'compile and link feedback we have - for the 'atofoo', hltq' 
and 'vsyslog' tests, respectively:

         /bin/sh ../../libtool --tag=disable-static --mode=compile xlc_r 
-c -o atofoo_test.lo -I../../../src/sudo-rbac-1.8.22b1/include -I../.. 
-I../../../src/sudo-rbac-1.8.22b1/lib/util 
-I../../../src/sudo-rbac-1.8.22b1 
-D_PATH_SUDO_CONF=\"/var/sudo-rbac/etc/sudo.conf\" -I/opt/include 
-D_FORTIFY_SOURCE=2 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
../../../src/sudo-rbac-1.8.22b1/lib/util/regress/atofoo/atofoo_test.c
libtool: compile:  xlc_r -c -I../../../src/sudo-rbac-1.8.22b1/include 
-I../.. -I../../../src/sudo-rbac-1.8.22b1/lib/util 
-I../../../src/sudo-rbac-1.8.22b1 
-D_PATH_SUDO_CONF=\"/var/sudo-rbac/etc/sudo.conf\" -I/opt/include 
-D_FORTIFY_SOURCE=2 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
../../../src/sudo-rbac-1.8.22b1/lib/util/regress/atofoo/atofoo_test.c 
-DPIC -o .libs/atofoo_test.o
         /bin/sh ../../libtool --tag=disable-static --mode=link xlc_r -o 
atofoo_test atofoo_test.lo libsudo_util.la    -Wl,-brtl
libtool: link: xlc_r -o .libs/atofoo_test .libs/atofoo_test.o -Wl,-brtl  
-L./.libs -lsudo_util 
-Wl,-blibpath:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib


         /bin/sh ../../libtool --tag=disable-static --mode=compile xlc_r 
-c -o hltq_test.lo -I../../../src/sudo-rbac-1.8.22b1/include -I../.. 
-I../../../src/sudo-rbac-1.8.22b1/lib/util 
-I../../../src/sudo-rbac-1.8.22b1 
-D_PATH_SUDO_CONF=\"/var/sudo-rbac/etc/sudo.conf\" -I/opt/include 
-D_FORTIFY_SOURCE=2 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
../../../src/sudo-rbac-1.8.22b1/lib/util/regress/tailq/hltq_test.c
libtool: compile:  xlc_r -c -I../../../src/sudo-rbac-1.8.22b1/include 
-I../.. -I../../../src/sudo-rbac-1.8.22b1/lib/util 
-I../../../src/sudo-rbac-1.8.22b1 
-D_PATH_SUDO_CONF=\"/var/sudo-rbac/etc/sudo.conf\" -I/opt/include 
-D_FORTIFY_SOURCE=2 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
../../../src/sudo-rbac-1.8.22b1/lib/util/regress/tailq/hltq_test.c -DPIC 
-o .libs/hltq_test.o
         /bin/sh ../../libtool --tag=disable-static --mode=link xlc_r -o 
hltq_test hltq_test.lo libsudo_util.la    -Wl,-brtl
libtool: link: xlc_r -o .libs/hltq_test .libs/hltq_test.o -Wl,-brtl  
-L./.libs -lsudo_util 
-Wl,-blibpath:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/l


         /bin/sh ../../libtool --tag=disable-static --mode=compile xlc_r 
-c -o vsyslog_test.lo -I../../../src/sudo-rbac-1.8.22b1/include -I../.. 
-I../../../src/sudo-rbac-1.8.22b1/lib/util 
-I../../../src/sudo-rbac-1.8.22b1 
-D_PATH_SUDO_CONF=\"/var/sudo-rbac/etc/sudo.conf\" -I/opt/include 
-D_FORTIFY_SOURCE=2 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
../../../src/sudo-rbac-1.8.22b1/lib/util/regress/vsyslog/vsyslog_test.c
libtool: compile:  xlc_r -c -I../../../src/sudo-rbac-1.8.22b1/include 
-I../.. -I../../../src/sudo-rbac-1.8.22b1/lib/util 
-I../../../src/sudo-rbac-1.8.22b1 
-D_PATH_SUDO_CONF=\"/var/sudo-rbac/etc/sudo.conf\" -I/opt/include 
-D_FORTIFY_SOURCE=2 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
../../../src/sudo-rbac-1.8.22b1/lib/util/regress/vsyslog/vsyslog_test.c 
-DPIC -o .libs/vsyslog_test.o
         /bin/sh ../../libtool --tag=disable-static --mode=link xlc_r -o 
vsyslog_test vsyslog_test.lo vsyslog.lo libsudo_util.la    -Wl,-brtl
libtool: link: xlc_r -o .libs/vsyslog_test .libs/vsyslog_test.o 
.libs/vsyslog.o -Wl,-brtl  -L./.libs -lsudo_util 
-Wl,-blibpath:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib


I am beginning to think it is a problem with libtool (package) because 
at the 'high' level it is saying the output is .libs/atofoo_test, -o 
.libs/hltq_test and .libs/vsyslog_test

- but this is what has been made:

michael at x071:[/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1]ls .libs
ls: cannot access '.libs': No such file or directory
michael at x071:[/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1]find . -type d 
-name .libs
./lib/.nfs75C/.libs
./src/.libs
./plugins/group_file/.libs
./plugins/system_group/.libs
./plugins/sudoers/.libs
michael at x071:[/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1]ls src/.libs
libsudo_noexec.exp  libsudo_noexec.lai  sudo sudo_noexec.o
libsudo_noexec.la   libsudo_noexec.so   sudo_noexec.lai sudo_noexec.so
michael at x071:[/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1]find . -name lt-\*
./lib/.nfs75C/.libs/lt-parse_gids_test
./lib/.nfs75C/.libs/lt-strsplit_test
./lib/.nfs75C/.libs/lt-fnm_test
./lib/.nfs75C/.libs/lt-mktemp_test
./lib/.nfs75C/.libs/lt-atofoo_test
./lib/.nfs75C/.libs/lt-hltq_test
./lib/.nfs75C/.libs/lt-vsyslog_test

While the locations are very different on the 'local disk' build:

michael at x071:[/var/prj/sudo/sudo-rbac-1.8.22b1]find . -name lt-\*
./lib/util/.libs/lt-atofoo_test
./lib/util/.libs/lt-conf_test
./lib/util/.libs/lt-fnm_test
./lib/util/.libs/lt-hltq_test
./lib/util/.libs/lt-mktemp_test
./lib/util/.libs/lt-parse_gids_test
./lib/util/.libs/lt-parseln_test
./lib/util/.libs/lt-strsplit_test
./lib/util/.libs/lt-vsyslog_test
./plugins/sudoers/.libs/lt-check_addr
./plugins/sudoers/.libs/lt-check_base64
./plugins/sudoers/.libs/lt-check_digest
./plugins/sudoers/.libs/lt-check_env_pattern
./plugins/sudoers/.libs/lt-check_fill
./plugins/sudoers/.libs/lt-check_gentime
./plugins/sudoers/.libs/lt-check_hexchar
./plugins/sudoers/.libs/lt-check_iolog_path
./plugins/sudoers/.libs/lt-check_symbols
./plugins/sudoers/.libs/lt-check_wrap
./plugins/sudoers/.libs/lt-testsudoers
./plugins/sudoers/.libs/lt-visudo
./src/.libs/lt-check_noexec
./src/.libs/lt-check_ttyname

(And back on the NFS build - ./lib is now empty):

michael at x071:[/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1]ls -lR lib
lib:
total 0

while 'localdisk' is not empty: (too many lines for ls - so du -m instead):

michael at x071:[/var/prj/sudo/sudo-rbac-1.8.22b1]du -m lib
1       lib/util/.libs
1       lib/util/regress/sudo_conf
1       lib/util/regress/sudo_parseln
1       lib/util/regress
2       lib/util
2       lib

For now - chalk it up as a libtool bug when working on NFS (have you 
ever tried working on NFS on Linux?)

+++ extra info +++ Local disk:

michael at x071:[/var/prj/sudo/sudo-rbac-1.8.22b1]dump -H 
./lib/util/.libs/lt-atofoo_test

./lib/util/.libs/lt-atofoo_test:

                         ***Loader Section***
                       Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x00000011       0x00000037       0x000000a9

#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000005       0x0000044c       0x000000b7       0x000004f5


                         ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0 
/var/prj/sudo/sudo-rbac-1.8.22b1/lib/util/.libs:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib 

1                                    libsudo_util.so
2                                    libpthreads.a shr_xpg5.o
3                                    libc.a              shr.o
4                                    librtl.a            shr.o

michael at x071:[/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1]dump -H 
./lib/.nfs75C/.libs/lt-atofoo_test

./lib/.nfs75C/.libs/lt-atofoo_test:

                         ***Loader Section***
                       Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x00000011       0x00000037       0x000000b3

#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000005       0x0000044c       0x000000b7       0x000004ff


                         ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0 
/data/prj/aixtools/sudo/sudo-rbac-1.8.22b1/lib/util/.libs:/opt/libexec/sudo:/usr/vac/lib:/usr/lib:/lib 

1                                    libsudo_util.so
2                                    libpthreads.a shr_xpg5.o
3                                    libc.a              shr.o
4                                    librtl.a            shr.o

Here you can see that a LIBPATH default is being installed, but note the 
second is same concept of `pwd`/lib/util/.libs rather than 
`pwd`/lib/.nfs75C/.libs/ (so I read it properly, 'util' is being 
'renamed' to .nfs75C (in this case), but the loader/linker is not told this.

> It's always possible that libtool is not being
> generated correcly or has some bug with non-GNU tools.
'some bug' - see above
>
>   - todd




More information about the sudo-workers mailing list