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>
Accepting \? for at-most-once in basic regex is a GNU grep
extension, not accepted by AIX grep for example.
* tests/libtool.at: Use \{0,1\} instead of ? with GREP.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/darwin.at: Use "-arch x86_64", which works on modern
Apple hardware, rather than "-arch ppc", which generally does not.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/cmdline_wrap.at (fail_list): non-matching globs return as
a plain unexpanded string, so we also need to test for file
existence before expanding into fail_list.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
To avoid clashes with gnulib argz module in ltdl client projects,
move ours into its own namespace.
* libltdl/argz_.h, libltdl/argz.c, m4/argz.m4: Move from here...
* libltdl/libltdl/lt__argz_.h, libltdl/lt__argz.c, m4/ltargz.m4:
...to here.
* Makefile.am, libltdl/libltdl/lt__glibc.h, libltdl/ltdl.mk,
libtoolize.in, m4/ltdl.m4: Adjust accordingly.
* tests/libtoolize.at, tests/ltdl-api.at, tests/nonrecursive.at,
tests/old-ltdl-iface.at: Adjust for different libtoolize output.
* libltdl/.gitignore: Adjust accordingly.
* NEWS: Update.
Reported by Pavel Raiskup
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
In particular, openSuSE on x86_64 uses CONFIG_SITE to set libdir
to "${exec_prefix}/lib64", which confuses testcases that check
the contents of "${prefix}/lib". In general, tests that expect
to find installed files in specific directories should explicitly
set those directories at configure time.
* tests/testsuite.at (LT_AT_CONFIGURE): Make sure exec_prefix,
bindir and libdir point to known subdirectories we can check the
contents of later on in a test case.
(prefixdir): Rename from this...
(prefix): ...to this. All test cases that set or use the config
prefix directory must now refer to `prefixdir` for the helper
macros in this file to work in hostile build environments such
as CONFIG_SITE setting openSuSE.
* tests/demo.at, tests/depdemo.at, tests/mdemo.at,
tests/tagdemo.at: Adjust accordingly.
Reported by Peter Breitenlohner.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/demo.at (Pdemo conf): Overide _LT_DEMO_SETUP foo.h to
declare foo2.
* tests/mdemo.at (_LT_SETUP): Don't wrap `sub` dectlaration in
C++ guards, because sub.c is also compiled with g++ in this test.
* tests/old-ltdl-iface.at (old.c): Add a return type to main
declaration as required by C++.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Some 4.3.x and 4.4.x releases of gcj insert a spurious 'dummy'
symbol into every object file when compiling directly from .java
to .o:
* tests/convenience.at (GCJ): make .class files from .java
sources first, and then compile those to native objects. This
works around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Modern SunStudio f77 is just a wrapper for f90, which
explains why current master fails these test groups with:
Undefined first referenced
symbol in file
__f90_slw_ch .libs/foof2.o
__f90_sslw .libs/foof2.o
__f90_eslw .libs/foof2.o
ld: fatal: symbol referencing errors. No output written to
.libs/libfoo2.so.0.0.0
So we allow some undefined symbols in the libraries, which are
resolved by the $(FLIBS) added to the final binaries in the tests.
This seems like the simpler, and less error inducing solution to
me (compared to adding $(FLIBS) to every library LDFLAGS line).
* tests/f77demo.at (libfoo_la_LDFLAGS, libfoo2_la_LDFLAGS)
(libfoo3_la_LDFLAGS, libmix_la_LDFLAGS): Remove -no-undefined
flag.
* tests/fcdemo.at: Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Be consistent about passing commands to the testsuite, and use
TESTS_ENVIRONMENT consistent.
* Makefile.am (TESTS_ENVIRONMENT): Add EGREP and FGREP.
* tests/testsuite.at: Remove EGREP and FGREP extractions from
generated libtool script.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Trust the user, and use $SED from TESTS_ENVIRONMENT uniformly.
Hardcoding 'sed' for "simple" edits is a premature optimisation.
* tests/cdemo.at, tests/cmdline_wrap.at, tests/cwrapper.at,
tests/darwin.at, tests/demo.at, tests/duplicate_conv.at,
tests/duplicate_members.at, tests/execute-mode.at, tests/export.at,
tests/inherited_flags.at, tests/install.at, tests/libtoolize.at,
tests/mdemo.at, tests/need_lib_prefix.at, tests/old-m4-iface.at,
tests/sysroot.at, tests/tagdemo.at, tests/testsuite.at: Replace all
hardcoded sed invocations with $SED.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* Makefile.am (TESTSUITE_AT): Move stresstest.at and cmdline_wrap.at
to the end of the list.
* tests/cmdline_wrap.at: If previous tests have failed, then we
already know that rerunning them will fail too, so save time by
skipping in that case.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Avoid spurious fcdemo failures when Autoconf picks f77 or
similar for a fortran90 compiler.
* tests/testsuite.at (LT_AT_TAG): Using FC and FCFLAGS from make
TESTS_ENVIRONMENT, check that we really can compile fortran90
or else skip.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
On at least Unixware 7.1.4, the shell variable 'unset' gets set
to 'no' during the testsuite run, breaking several test cases.
We should have been using Autotest $as_unset anyway.
* tests/testsuite.at (unset): Remove test and variable setting.
(LT_AT_MAKE): Use $as_unset as provided by autotest boilerplate
instead of our own $unset.
* tests/demo.at (uninstalled libraries ave priority): Likewise.
Reported by Tim Rice.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
At least Mac OS 10.8.5 clang chokes on the previous
'const void *argv[]' parameter, but since we don't use it
anyway, keep to the theme of old api support and use K&R
syntax.
* tests/old-ltdl-iface.at (old.c): Use 'main ()' instead of
unportable 'int main (int argc, const void *argv[])'.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Resolves bug#13414. Problem reported by Erik van Pienbroek
and Martin Doucha.
build-aux/ltmain.in (func_mode_link): Factor out the test if a
given symbol file is a module-definition (.def) file into...
(func_dll_def_p): ...this function, which also improves the check.
m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
<cygwin, mingw, pw32, cegcc>: Similarly, factor out the test if
a given symbol file is a module-definition (.def) file into...
(_LT_DLL_DEF_P): ...this macro, which also improves the check.
tests/export-def.at: New test.
Makefile.am (TESTSUITE_AT): Add above test.
NEWS: Update.
THANKS: Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>