On AIX 7.3.1, the build succeeds (with ibm-clang), but there are 58 test failures:
FAIL: ii-0001-test FAIL: ii-0002-test FAIL: ii-0003-test FAIL: ii-0004-test FAIL: ii-0005-test FAIL: ii-0006-test FAIL: ii-0007-test FAIL: ii-0008-test FAIL: ii-0009-test FAIL: ii-0010-test FAIL: ii-0011-test FAIL: ii-0012-test FAIL: ii-0013-test FAIL: ii-0014-test FAIL: ii-0015-test FAIL: ii-0017-test FAIL: ii-0018-test FAIL: ii-0019-test FAIL: ii-0020-test FAIL: ii-0021-test FAIL: ii-0022-test FAIL: ii-0023-test FAIL: ii-0024-test FAIL: ii-0025-test FAIL: ii-0026-test FAIL: ii-0027-test FAIL: ii-0028-test FAIL: ii-0029-test FAIL: ii-0030-test FAIL: ii-0031-test FAIL: ii-0032-test FAIL: ii-0033-test FAIL: ii-0034-test FAIL: ii-0035-test FAIL: ii-0036-test FAIL: ii-0037-test FAIL: ii-0038-test FAIL: ii-0039-test FAIL: ii-0040-test FAIL: ii-0041-test FAIL: ii-0042-test FAIL: ii-0043-test FAIL: ii-0044-test FAIL: ii-0045-test FAIL: ii-0046-test FAIL: ii-0047-test FAIL: ii-0048-test FAIL: ii-0049-test FAIL: ii-0050-test FAIL: ii-0051-test FAIL: ii-0052-test FAIL: ii-0053-test FAIL: ii-0054-test FAIL: ii-0055-test FAIL: ii-0056-test FAIL: ii-0057-test FAIL: ii-0058-test FAIL: ii-0059-test These test failures indicate that the built 'install-info' program is usually non-functional. The first failure, from install-info/tests/test-suite.log : FAIL: ii-0001-test ================== + . ./defs + SHELL=/bin/sh + export SHELL + CDPATH= + unset CDPATH + test ! -f ./defs + test -z ../../../install-info/tests + LC_ALL=C + export LC_ALL + valgrind= + top_builddir=../.. + install_info=../../install-info/ginstall-info + export install_info + top_srcdir=../../.. + testdir=../../../install-info/tests + export testdir + test -z /tmp + : grep -E + test -n + path_sep=: + diff=diff + echo aix7.3.1.0 + grep -E mingw + 1> /dev/null + findprog mktemp + + mktemp ii01-XXXXXXXX outputdirfile=/tmp/iimktemp22610250-10948/ii01-XXXXXXXX + cp ../../../install-info/tests/ii-0001-input-dir-file /tmp/iimktemp22610250-10948/ii01-XXXXXXXX + [ x0 != x0 ] + ../../install-info/ginstall-info ../../../install-info/tests/ii-0001-input-info-file /tmp/iimktemp22610250-10948/ii01-XXXXXXXX infodirD4sMea: Cross-device link + retval=0 + [ x0 != x0 ] + diff ../../../install-info/tests/ii-0001-expected-dir-file /tmp/iimktemp22610250-10948/ii01-XXXXXXXX diff: /tmp/iimktemp22610250-10948/ii01-XXXXXXXX: No such file or directory + retval=2 + rm -f /tmp/iimktemp22610250-10948/ii01-XXXXXXXX + exit 2 FAIL ii-0001-test (exit status: 2) I can reproduce the failure: $ cd install-info $ mkdir /tmp/iimk1 $ cp ../../install-info/tests/ii-0001-input-dir-file /tmp/iimk1/ii01 $ ls -l /tmp/iimk1/ii01 -rw-r--r-- 1 haible usr 739 Aug 17 21:21 /tmp/iimk1/ii01 $ ./ginstall-info ../../install-info/tests/ii-0001-input-info-file /tmp/iimk1/ii01 infodirPFiMea: Cannot link to a file on another device. $ echo $? 0 * Why is the error message "Cross-device link" in the tests but "Cannot link to a file on another device." in my experiment? => That's because of the locale. With LC_ALL=C the error message is "Cross-device link"; with LC_ALL=en_US it is "Cannot link to a file on another device." * What's the 'truss' log? $ LC_ALL=C truss ./ginstall-info ../../install-info/tests/ii-0001-input-info-file /tmp/iimk1/ii01 execve("./ginstall-info", 0x2FF22A64, 0x20016CB8) argc: 3 kusla(6, 0x09FFFFFFF0001170) = 0 read_sysconfig(0x09001000A00092C0, 0x0000000000000018, 0x0000000000000079, 0x0000000000000071, 0x08FFFFFFF00000D0, 0x0000000000000091, 0x0000000000000089, 0x00000000000000B1) = 0x0000000000000000 sbrk(0x0000000000000000) = 0x0000000110001A98 vmgetinfo(0x0FFFFFFFFFFFEEC0, 7, 16) = 0 sbrk(0x0000000000000000) = 0x0000000110001A98 sbrk(0x0000000000000008) = 0x0000000110001A98 __libc_sbrk(0x0000000000010020) = 0x0000000110001AA0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 18) = 0 thread_init(0x09000000006A28E0, 0x09001000A01CCF98) = sbrk(0x0000000000000000) = 0x0000000110011AC0 vmgetinfo(0x0FFFFFFFFFFFF528, 7, 16) = 0 smcr_procattr(0, 1, 0x0FFFFFFFFFFFF520) = 0 _getpid() = 19071398 appulimit(1005, 0) = 0x0FFFFFFFFE000000 _thread_self() = 44433791 thread_setmystate(0x0000000000000000, 0x0FFFFFFFFFFFF060) = 0 thread_setmystate(0x0FFFFFFFFFFFEC80, 0x0FFFFFFFFFFFF008) = 0 _sigaction(3, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(4, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(5, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(6, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(7, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(8, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(10, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(11, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(12, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(36, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 _sigaction(39, 0x0FFFFFFFFFFFF420, 0x0FFFFFFFFFFFF450) = 0 checkpnt_block(0x0000000000000000, 17) = 0 kloadquery(238, 0x0FFFFFFFFFFFF460, 24) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 18) = 0 close(0) = 0 kopen("/dev/null", O_RDONLY) = 0 kioctl(0, 22528, 0x0000000000000000, 0x0000000000000000) Err#19 ENODEV kopen("/tmp/iimk1/ii01", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01.gz", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01.xz", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01.bz2", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01.zst", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01.lz", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01.lzma", O_RDONLY) Err#2 ENOENT kopen("/tmp/iimk1/ii01", O_RDONLY) Err#2 ENOENT __libc_sbrk(0x0000000000010020) = 0x0000000110011AC0 kopen("/tmp/iimk1/ii01", O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) = 3 kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kwrite(3, " T h i s i s t h e ".., 541) = 541 close(3) = 0 kopen("/tmp/iimk1/ii01", O_RDONLY) = 3 kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kread(3, " T h i s i s t h e ".., 4096) = 541 lseek(3, 0, 1) = 541 kread(3, " T h i s i s t h e ".., 4096) = 0 kread(3, " T h i s i s t h e ".., 4096) = 0 sigprocmask(2, 0x09001000A01C3CF8, 0x0FFFFFFFFFFFF340) = 0 _sigaction(1, 0x0FFFFFFFFFFFF468, 0x0FFFFFFFFFFFF498) = 0 thread_setmystate(0x0FFFFFFFFFFFEF40, 0x0000000000000000) = 0 sigprocmask(2, 0x09001000A01C3CF8, 0x0FFFFFFFFFFFF340) = 0 _sigaction(2, 0x0FFFFFFFFFFFF468, 0x0FFFFFFFFFFFF4C8) = 0 thread_setmystate(0x0FFFFFFFFFFFEF40, 0x0000000000000000) = 0 sigprocmask(2, 0x09001000A01C3CF8, 0x0FFFFFFFFFFFF340) = 0 _sigaction(3, 0x0FFFFFFFFFFFF468, 0x0FFFFFFFFFFFF4F8) = 0 thread_setmystate(0x0FFFFFFFFFFFEF40, 0x0000000000000000) = 0 close(3) = 0 sigprocmask(2, 0x09001000A01C3CF8, 0x0FFFFFFFFFFFF340) = 0 _sigaction(1, 0x0FFFFFFFFFFFF498, 0x0000000000000000) = 0 thread_setmystate(0x0FFFFFFFFFFFEF40, 0x0000000000000000) = 0 sigprocmask(2, 0x09001000A01C3CF8, 0x0FFFFFFFFFFFF340) = 0 _sigaction(2, 0x0FFFFFFFFFFFF4C8, 0x0000000000000000) = 0 thread_setmystate(0x0FFFFFFFFFFFEF40, 0x0000000000000000) = 0 sigprocmask(2, 0x09001000A01C3CF8, 0x0FFFFFFFFFFFF340) = 0 _sigaction(3, 0x0FFFFFFFFFFFF4F8, 0x0000000000000000) = 0 thread_setmystate(0x0FFFFFFFFFFFEF40, 0x0000000000000000) = 0 kopen("../../install-info/tests/ii-0001-input-info-file", O_RDONLY) = 3 kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kread(3, " I N F O - D I R - S E C".., 4096) = 394 lseek(3, 0, 1) = 394 kread(3, " I N F O - D I R - S E C".., 4096) = 0 kread(3, " I N F O - D I R - S E C".., 4096) = 0 close(3) = 0 times(0x0FFFFFFFFFFFF4C0) = 12767712 _getpid() = 19071398 access("infodir5biMea", 0) Err#2 ENOENT kopen("infodir5biMea", O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR) = 3 umask(18) = 18 umask(18) = 18 chmod("infodir5biMea", 0644) = 0 kfcntl(3, F_GETFL, 0x0000000110004078) = 67108866 kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kwrite(3, " T h i s i s t h e ".., 611) = 611 close(3) = 0 rename("infodir5biMea", "/tmp/iimk1/ii01") Err#18 EXDEV statx("/tmp/iimk1/ii01", 0x0FFFFFFFFFFFF540, 176, 011) = 0 unlink("/tmp/iimk1/ii01") = 0 rename("infodir5biMea", "/tmp/iimk1/ii01") Err#18 EXDEV infodir5biMeakwrite(2, " i n f o d i r 5 b i M e".., 13) = 13 : kwrite(2, " : ", 2) = 2 Cross-device linkkwrite(2, " C r o s s - d e v i c e".., 17) = 17 kwrite(2, "\n", 1) = 1 statx("infodir5biMea", 0x0FFFFFFFFFFFF540, 176, 011) = 0 unlink("infodir5biMea") = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 17) = 0 checkpnt_block(0x0000000000000000, 18) = 0 checkpnt_block(0x0000000000000000, 18) = 0 kfcntl(1, F_GETFL, 0x0000000012A6017F) = 67110914 kfcntl(2, F_GETFL, 0x0000000012A6017F) = 67110914 _exit(0) * What is happening? 'ginstall-info' is creating a file 'infodir5biMea' in the current directory, with some contents, and then attempting to move it by the rename() system call: rename("infodir5biMea", "/tmp/iimk1/ii01") => EXDEV (Lines 1071 and 1080.) This cannot work. You cannot assume that two arbitrary directories are on the same disk volume. The fix, if you want atomic 'dir' updates, is to create the "infodir5biMea" file on the target device. In the code, this file is created at line 931: char tempname[] = "infodirXXXXXX"; tempfile = mkstemp (tempname); To fix this, pass a string to mkstemp() that includes a directory name: tempfile = mkstemp ("/tmp/iimk1/infodirXXXXXX"); *This* will create a tempfile in the right directory, and rename() will then succeed. * Why is the exit code of 'ginstall-info' 0? That's because the output_dirfile() function is neither calling exit(EXIT_FAILURE), nor returning an error code. This should be fixed first. Bruno