GNU bug report logs - #61278
improve diagnostics for LDFLAGS used on static archives

Previous Next

Package: automake;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Sat, 4 Feb 2023 18:28:02 UTC

Severity: minor

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: bug-automake <bug-automake <at> gnu.org>
Subject: Automake warns about LDFLAGS for defined library
Date: Sat, 4 Feb 2023 18:27:40 +0000
[Message part 1 (text/plain, inline)]
Using automake 1.16.5, in my Makefile.am, I have the following lines:

noinst_LTLIBRARIES = liba2ps.la
liba2ps_la_LDFLAGS = $(LIBGC_LIBS)
liba2ps_la_SOURCES = $(liba2pssources) $(libitsources) $(mylibitsources)
liba2ps_la_LIBADD = ../lib/libgnu.la $(LIBINTL) $(LIBSOCKET)
$(GETHOSTNAME_LIB)

noinst_LIBRARIES = libnowarnings.a
libnowarnings_a_CFLAGS = $(LIBGC_FLAGS)
libnowarnings_a_LDFLAGS = $(LIBGC_LIBS)
libnowarnings_a_SOURCES = fonts.l lexppd.l parseppd.y regex.c regex.h
confg.c confg.h

(This is from GNU a2ps <https://savannah.gnu.org/projects/a2ps>'s
liba2ps/Makefile.am.)

When automake is run, it warns:

liba2ps/Makefile.am:63: warning: variable 'libnowarnings_a_LDFLAGS' is
defined but no program or
liba2ps/Makefile.am:63: library has 'libnowarnings_a' as canonical name
(possible typo)

I don't understand this, because libnowarnings.a is defined as the
canonical name of a library.

In src/Makfile.am, I have the following lines:

noinst_LIBRARIES = libparse.a
libparse_a_SOURCES = parsessh.y lexssh.l lexps.l sheets-map.l
libparse_a_CFLAGS = $(LIBGC_FLAGS)

and I get no warnings. I have no LTLIBRARIES in this Makefile.am.

If in the first Makefile.am I change the convenience library
"libnowarnings.a" to a libtool library "libnowarnings.la", and add it to
noinst_LTLIBRARIES, and rename the other variables accordingly, then again
I get no warnings.

-- 
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.