Passing --no-warnings to libtool would not suppress warning messages.
* build-aux/ltmain.in: Add 'opt_warning' check before printing out
warning messages.
* tests/libtool.at: Add simple test for '--no-warnings'.
* NEWS: Update.
Add option to reorder the shared library cache in OpenBSD so that user
preferred directories for shared libraries can be used when linking
before directories previously listed in the shared library cache.
This allows for users in OpenBSD to easily switch between versions of
libraries with the same name during testing.
* NEWS: Update for new (OpenBSD) option.
* build-aux/ltmain.in: Add option --reorder-cache=DIRS.
* doc/libtool.texi: Update documentation for new option.
* test/bug_71489.at: Alter test for OpenBSD to utilize new option.
The following errors can be seen for the 'execute mode' test in OpenBSD:
build/libtool: test: <: missing second argument
build/libtool: test: >: missing second argument
The cwrapper in OpenBSD cannot parse these symbols as arguments in
execute mode if there are no other characters with them.
* tests/execute-mode.at: Escape '<' and '>' in OpenBSD.
Update tests to skip if required autotools are not installed for
executing AUTORECONF and to have stdout saved for checks.
* tests/bug_42313.at: Use LT_AT_AUTORECONF instead of AT_CHECK.
* tests/testsuite.at: Save stdout for LT_AT_AUTORECONF.
This test is added to ensure path comparisons pass when
installing to a destination, specifically when there is a
trailing slash in the destination.
* tests/destdir.at: Add test for trailing slash in destination.
Five tests use aclocal, but do not have a check for whether aclocal is
available to use. This causes reported tests failures in Linux From
Scratch and Darwin builds.
* tests/standalone.at: Add AT_XFAIL_IF check for aclocal for all tests.
* tests/subproject.at: Add AT_XFAIL_IF check for aclocal for last test.
The macro _LT_CMD_OLD_ARCHIVE inlines the definition of AC_PROG_RANLIB,
which seems to be outdated functionality. Running autoscan in a
directory with ltmain.sh produces conflicting warnings with libtoolize
about AC_PROG_RANLIB. Autoconf warns that AC_PROG_RANLIB is missing,
but libtoolize warns that it is obsolete. The outdated warning should
no longer appear after replacing AC_CHECK_TOOL(RANLIB, ranlib, :) with
AC_REQUIRE([AC_PROG_RANLIB]).
* m4/libtool.m4: Use AC_REQUIRE([AC_PROG_RANLIB]).
* Makefile.am: Added in tests/bug_42313.at.
* tests/bug_42313.at: Contains test cases for bug 42313.
Reported at <https://savannah.gnu.org/support/index.php?110674>.
* doc/libtool.texi (LT_INIT): Talk about --enable-pic instead of
--with-pic, and about --disable-pic instead of --without-pic.
(Test descriptions): Likewise.
* m4/ltoptions.m4 (_LT_WITH_PIC): Use AC_ARG_ENABLE instead of
AC_ARG_WITH. In the default case, use _AC_ENABLE_IF, in order to still
recognize the old options --with-pic and --without-pic.
* tests/demo.at: Add a test for --enable-pic, keeping the test for
--with-pic. Test '--disable-pic' instead of '--with-pic=no'.
* tests/with-pic.at: Test --enable-pic instead of --with-pic.
* NEWS: Mention the change.
Test 170 in bug_62343.at is failing to link object files with a library
file. This is fixed by choosing the correct architecture version of a
compiler by using the 'CXX' macro.
tests/bug_62343.at: Replace 'g++' with 'CXX' macro
It has been discovered that under certain conditions libtool creates
wrappers that prefer installed versions of the shared objects over
those built in the source tree. As a result, any tests run in the
source tree produce unreliable results.
* build-aux/ltmain.in: Alter to use shared objects in source tree
instead of installed.
* Makefile.am: Added in tests/bug_71489.at.
* tests/bug_71489.at: Contains test case for bug 71489.
Append '-no_fixup_chains' flag to disable chained fixups since it
is not compatible with '-undefined dynamic_lookup'.
* m4/libtool.m4: AC_VAR_APPEND will handle appending the option to
the variable, which allows the '+=' extension to be used by shells
that provide this capability for more efficient scaling. Also, bump
minimum required version of autoconf from 2.62 to 2.64.
* tests/no-executables.at: Set cache variable for link test.
* NO-THANKS: Add thanks for Carlo Cabrera and Dave Allured.
When linking on NetBSD, the test fails to locate a shared version of
gcc, so a static version of the module is generated, which does not pass
the defined checks. A FIXME note has been added for future debugging.
* tests/flags.at: Skip passing CXX flags test on NetBSD.
Without the no-undefined flag, the test will fail on Mingw and
Cygwin, so the flag will be appended for windows compilation. With
the flag, the test will fail on NetBSD, so the flag is removed.
* tests/bug_62343.at: Add no-undefined flag for windows-based
compilation and remove otherwise.
The compiler fails with the -no-canonical-prefixes flag in certain
environments. Check if the flag is supported in the current environment
and skip the test if it is not supported.
* tests/bug_62343.at: Skip test if -no-canonical-prefixes is unsupported
in the current environment.
* testsuite.at: $as_echo was deprecated in Autoconf commit 2b59b6f8a.
AS_ECHO uses printf which has been well supported for 15 to 20
years. Use of $as_echo was resulting in a warning message in the
testsuite logs, and replacing the deprecated macro removes the
warning messages.
* tests/libtoolize.at: When -program-prefix is used, stdout for the
program changes from the expected output. As a result, the test
fails. Replaced the transformed name to account for program-prefix.
Using clang with fsanitize results in an incompatible ASan runtime.
It results in the warning message "linked against incompatible ASan
runtimes". This only occurs with the mixed Fortran/C demo.
* tests/f77demo.at: Skip tests for clang compiling with fsanitize.
* tests/fcdemo.at: Skip tests for clang compiling with fsanitize.
A function used in a test was not returning a value, while an int was
expected so the test would fail to compile.
tests/resident.at: Return the result of atexit().
When the configure option "--disable-shared" is used, this test will be
skipped since no libtool libs are built.
tests/bug_62343.at: Check if build_libtool_libs is set to no.
When using the -no-canonical-prefixes flag in libtool, the flag is
removed from the linking command, causing linking to fail. This adds
the flag to the list of linker flags to be passed through to the
linker.
* build-aux/ltmain.in: Pass -no-canonical-prefixes to the linker.
* Makefile.am: Added in tests/bug_62343.at.
* tests/bug_62343.at: Contains test case for bug 62343.
When running `libtoolize --ltdl`, a symlink to the source config-h.in
is used rather than a copy of the file. This causes the build system
to look at its old timestamp relative to the other generated files
that are copied in, and then try to regenerate things, and update the
config-h.in timestamp by touching the symlink (which will dereference
things). This breaks `make distcheck` because when a few tests run
that invoke `libtoolize --ltdl --install` w/out --copy, and then try
to build the project, automake's rules trigger autoheader regen, and
then update the timestamp, which updates the underlying file, and then
causes libtool's own files to get out of sync. So the next time make
is run in the tree, it tries to regenerate the source files, and fails
as the source tree is read-only.
Change libtoolize to always copying the header over during install.
It's not clear to me whether this is 100% the right answer, but it
shouldn't make things worse beyond missing a case to use a symlink.
We probably can't avoid this as long as aclocal.m4 itself is copied
in instead of symlinked. This changed between v2.4.2 and v2.4.3 in
commit 4e671d6ba6 ("libtoolize:
simplify file-copying and -linking call-graph.").
Example failure log:
$ make distcheck
...
make[3]: Entering directory '.../libtool-2.4.7.62-3e11/_build/sub'
GEN ../../libltdl/Makefile.in
GEN ../../libltdl/configure
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-3e11/libltdl: Permission denied
make[3]: *** [Makefile:2411: ../../libltdl/configure] Error 1
make[3]: *** Waiting for unfinished jobs....
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-3e11/libltdl: Permission denied
automake-1.16: error: autoconf failed with exit status: 1
make[3]: *** [Makefile:2387: ../../libltdl/Makefile.in] Error 1
We can see this in old-m4-iface.at:AC_WITH_LTDL which doesn't use
--copy with libtoolize:
$ stat libltdl/config-h.in | grep Modify
Modify: 2024-01-18 01:18:52.998059970 -0500
$ make check-local TESTSUITEFLAGS=100
...
100: AC_WITH_LTDL ok
...
$ stat libltdl/config-h.in | grep Modify
Modify: 2024-01-18 01:19:19.254727020 -0500
And in the test log we can see:
100. old-m4-iface.at:113: testing AC_WITH_LTDL ...
...
libtoolize: linking file 'libltdl/config-h.in'
...
./old-m4-iface.at:161: : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --prefix="$prefix" --exec-prefix="$prefix" --bindir="$prefix/bin" --libdir="$prefix/lib" --with-included-ltdl
...
./old-m4-iface.at:161: $as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE $target
stderr:
stdout:
cd libltdl && make
make[1]: Entering directory '/usr/local/src/gnu/libtool/tests/testsuite.dir/100/libltdl'
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal -I m4
cd . && automake --foreign
CDPATH="${ZSH_VERSION+.}:" && cd . && autoconf
/bin/sh ./config.status --recheck
...
(CDPATH="${ZSH_VERSION+.}:" && cd . && autoheader)
rm -f stamp-h1
touch config-h.in
...
* libtoolize.in: Copy config-h.in.
* tests/libtoolize.at: Change "linking" to "copying".
The gnuconfig project recognizes windows* as a host OS to denote native
Windows environments. The commit message makes it sound like LLVM and
Crablang communities will use the 'windows' value, whereas GNU will
continue to use 'mingw'. But I think it's only a matter of time until
people start to pass the option --host=x86_64-pc-windows to configure
scripts. We should be prepared for that.
Url: https://savannah.gnu.org/patch/?10387
* build-aux/ltmain.in: Treat windows* as equivalent to mingw*.
* m4/libtool.m4: Likewise.
* m4/ltdl.m4: Likewise.
* m4/ltoptions.m4: Likewise.
* tests/bindir.at: Likewise.
* tests/deplibs-mingw.at: Likewise.
* tests/lt_dladvise.at: Likewise.
* tests/testsuite.at: Likewise.
Include <string.h> for the strcmp function. This improves C99
compiler compatibility because it avoids an implicit function
declaration.
* tests/lt_dlopen_a.at: Include string.h.
This fixes some other regular expressions that GNU grep 3.8 does not
warn about (I found them with an even-pickier 'grep').
I did not look systematically for all portability bugs of this form.
Url: https://savannah.gnu.org/patch/index.php?10282
* tests/cdemo.at (allow_undefined_flag):
Prefer } to \} in EREs, as \} is not portable.
* tests/libtool.at (quote shell meta-characters in filenames):
Prefer ] to \] in BREs, as \] is not portable.
GNU grep 3.8 warns about some regular expressions that POSIX says have
undefined effect, e.g., '\-'. Unfortunately Libtool uses regular
expressions of this form. Some unittests now fail, e.g. link-order.at:
--- /dev/null
+++ .../libtool/tests/testsuite.dir/at-groups/66/stderr
@@ -0,0 +1,4 @@
+/bin/grep: warning: stray \ before /
+/bin/grep: warning: stray \ before /
+/bin/grep: warning: stray \ before /
+/bin/grep: warning: stray \ before /
Url: https://savannah.gnu.org/patch/index.php?10282
* m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Do not use \- in a BRE or ERE,
as this produces undefined results that GNU grep 3.8 warns about.
Use [-] instead.
* tests/link-order.at (Link order test): Similarly, do not use
\/ in an ERE; use / instead.
* tests/old-ltdl-iface.at: remove test as instructed by inline comments, which
indicate that this test should have been deleted in 2013.
This test fails because it relies on legacy usage of 'include Makefile.inc'
by libltdl which is no longer supported.
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
* gl/top/README-release.diff: Update the patch for the latest
changes in gnulib's README-release.
At least with gcc, specifying -g3 in CFLAGS ends up with macros
expanded including LT_OBJDIR macro. This fooled the testsuite.
* tests/demo.at (Demo hardcode): Filter out the expanded LT_OBJDIR
macro.
* m4/libtool.m4 (_LT_LIBTOOL_TAG_VARS): Encase the
configure/libtool shared function into parseable borders; for
testing purposes.
(func_munge_path_list): Typo s/$/@S|@/.
* tests/configure-funcs.at: New testcase.
* Makefile.am (TESTSUITE_AT): Mention new testcase.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/testsuite.at (LT_AT_ACLOCAL): Inject a 1 second sleep
after aclocal to ensure subsequently generated autotools files
will be newer.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Fixes regression caused by commit 99a808be.
Makefile.in has aclocal.m4 as prerequisite, so Makefile.in
should be installed later to avoid unnecessary rebuild by
(versioned) aclocal.
* Makefile.am (pkgltdl_files): Move the Makefile.in file down in
the list after aclocal.m4.
* tests/libtoolize.at: Adjust to match reordered output.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Testing whether -static-libtool-libs causes a non-libtool library to be
linked dynamically is effectively a test of the compiler's preference in
this case. The Cray compiler prefers static libraries if not told
otherwise.
* tests/static.at [static linking flags for programs]: Do not expect
-static-libtool-libs to fail.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Support filename-based shared library versioning on AIX with the
lib.so library filename extension, which is used with runtime
linking only. Runtime linking is enabled by the -brtl linker
flag for executables and the -G linker flag for Shared Objects.
The behaviour is similar to Linux/SVR4 DT_SONAME, hence the name
"aix-soname=svr4".
* Makefile.am (TESTS_ENVIRONMENT): Pass with_aix_soname value
via lt_cv_with_aix_soname into testsuite.
* configure.ac: AC_SUBST with_aix_soname for testsuite.
* libltdl/loaders/dlopen.c (vm_open): Use RTLD_MEMBER flag for
dlopen when the filename does specify an archive member between
"()". Otherways, retry with appending LT_SHARED_LIB_MEMBER when
loading fails without but archive file seems to exist.
* m4/libtool.m4 (dynamic_linker): Describe configured shared
library versioning variant according to with_aix_soname and
runtime linking.
(soname_spec, library_names_spec, shlibpath_overrides_runpath)
(postinstall_cmds, postuninstall_cmds, hardcode_direct)
(hardcode_direct_absolute, no_undefined_flag)
(allow_undefined_flag): Set according to with_aix_soname and
runtime linking configuration.
(export_symbols_cmds): Decorate symbols with the weak keyword.
(archive_expsym_cmds): Create both shared libraries according to
with_aix_soname and runtime linking configuration. Filter -brtl
linker flag from compiler_flags for shared libraries due to its
side effects.
(enable_static): Respect with_aix_soname for disabling as well.
* m4/ltdl.m4 (LT_SHARED_LIB_MEMBER): Define, set based on the
value of the shared_archive_member_spec libtool variable.
* m4/ltoptions.m4 (_LT_WITH_AIX_SONAME): New. Provides
commandline option --with-aix-soname=aix|svr4|both. Declares
$shared_archive_member_spec as libtool variable.
(_LT_SET_OPTIONS): Define LT_INIT options "aix-soname=aix",
"aix-soname=svr4", "aix-soname=both". Default is
"aix-soname=aix".
* doc/libtool.texi (LT_INIT): Document new options.
* tests/deplibs-ident.at: To define whether this test should
XFAIL, use hardcode_action, hardcode_direct,
hardcode_direct_absolute configuration settings instead of
platforms aix, bitrig, hppa-hpux, interix or openbsd.
* tests/versioning.at: When shared_archive_member_spec is defined
and LDFLAGS contain -brtl, we can run the versioning check.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
On AIX, undefined symbols across shared libraries can work only
when the main program explicitly exports those symbols. As this
is bad practice anyway and -no-undefined should be preferred, we
skip this.
* tests/template.at: Skip test with undef syms across libraries
on AIX.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>