GNU bug report logs - #18822
Faulty $(lib@FOO@bar_la_OBJECTS) substitution

Previous Next

Package: automake;

Reported by: "Jeff Squyres (jsquyres)" <jsquyres <at> cisco.com>

Date: Fri, 24 Oct 2014 23:19:01 UTC

Severity: normal

Full log


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

From: "Jeff Squyres (jsquyres)" <jsquyres <at> cisco.com>
To: "bug-automake <at> gnu.org" <bug-automake <at> gnu.org>
Subject: Faulty $(lib <at> FOO <at> bar_la_OBJECTS) substitution
Date: Fri, 24 Oct 2014 23:18:10 +0000
[Message part 1 (text/plain, inline)]
In the Open MPI project, we have found a corner case in Automake 1.14.1 (see https://github.com/open-mpi/ompi/issues/250).

Here's a simplified reproducer in a Makefile.am:

-----
lib_LTLIBRARIES = lib <at> A_PREFIX <at> a_lib.la
noinst_LTLIBRARIES = lib <at> A_PREFIX <at> a_noinst.la

lib <at> A_PREFIX <at> a_lib_la_SOURCES = a.c

lib <at> A_PREFIX <at> a_noinst_la_SOURCES = $(lib <at> A_PREFIX <at> a_lib_la_SOURCES)
----

Assume that A_PREFIX is AC_SUBST'ed to be the value "AAA".  In the resulting Makefile:

1. The value of $(libAAAa_noinst_la_SOURCES) will be correct -- it gets assigned from $(libAAAa_lib_la_SOURCES).  Meaning: it will be "a.c".
2. The value of $(libAAAa_noinst_la_OBJECTS) will be empty.  It *should* be "a.o".

Trivial reproducer attached.  It's essentially a configure.ac and a.c to support the above Makefile.am rules, and a trivial override of the "all" rule echoing the 4 Makefile macros so that you can see that $(libAAAa_noinst_la_OBJECTS) is empty.

Just "./configure && make" and you'll see:

-----
...configure output...
  CC       a.lo
  CCLD     liba_lib.la
  CCLD     liba_noinst.la
liba_lib_la_SOURCES is: a.c
liba_lib_la_OBJECTS is: a.lo
====================
liba_noinst_la_SOURCES is: a.c
liba_noinst_la_OBJECTS is: -- THIS SHOULD NOT BE BLANK
-----

-- 
Jeff Squyres
jsquyres <at> cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
[fo-0.0.tar.bz2 (application/x-bzip2, attachment)]

This bug report was last modified 10 years and 237 days ago.

Previous Next


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