GNU bug report logs - #33022
Generated Makefile builds PROGRAMS before LTLIBRARIES

Previous Next

Package: automake;

Reported by: Mohamed Akram <mohd.akram <at> outlook.com>

Date: Fri, 12 Oct 2018 04:33:01 UTC

Severity: normal

Tags: notabug

Done: Mathieu Lirzin <mthl <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33022 in the body.
You can then email your comments to 33022 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#33022; Package automake. (Fri, 12 Oct 2018 04:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mohamed Akram <mohd.akram <at> outlook.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 12 Oct 2018 04:33:01 GMT) Full text and rfc822 format available.

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

From: Mohamed Akram <mohd.akram <at> outlook.com>
To: "bug-automake <at> gnu.org" <bug-automake <at> gnu.org>
Subject: Generated Makefile builds PROGRAMS before LTLIBRARIES
Date: Fri, 12 Oct 2018 04:32:24 +0000
[Message part 1 (text/plain, inline)]
automake’s behavior seems to have changed between 1.15.1 and 1.16.1:

1.15.1:

all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h

1.16.1:

all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) config.h

This causes an automake file which builds a library and a program that uses that library to fail.

An example can be seen here - https://github.com/codebrainz/morse/issues/1#issuecomment-429200053.
[Message part 2 (text/html, inline)]

Information forwarded to bug-automake <at> gnu.org:
bug#33022; Package automake. (Fri, 12 Oct 2018 06:57:01 GMT) Full text and rfc822 format available.

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

From: Mathieu Lirzin <mthl <at> gnu.org>
To: Mohamed Akram <mohd.akram <at> outlook.com>
Cc: 33022 <at> debbugs.gnu.org
Subject: Re: bug#33022: Generated Makefile builds PROGRAMS before LTLIBRARIES
Date: Fri, 12 Oct 2018 08:56:07 +0200
Hello,

Mohamed Akram <mohd.akram <at> outlook.com> writes:

> automake’s behavior seems to have changed between 1.15.1 and 1.16.1: 
>
> 1.15.1:
>
> all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h
>
> 1.16.1:
>
> all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) config.h
>
> This causes an automake file which builds a library and a program that uses that library to fail.
>
> An example can be seen here - https://github.com/codebrainz/morse/issues/1#issuecomment-429200053.

The fact that when running ‘make’ in serial, some prerequisites of a
make rule are built before other ones is undefined behavior.  Relying on
this when running ‘make’ in parallel mode is likely to result in a build
failure.

what needs to be done in ‘codebrainz’ is to add an explicit dependency
between programs and the libraries they depend on. See the following
example from the Automake manual:

     lib_LTLIBRARIES = libgettext.la
     libgettext_la_SOURCES = gettext.c ...

     bin_PROGRAMS = hello
     hello_SOURCES = hello.c ...
     hello_LDADD = libgettext.la

Does it help?

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37




Added tag(s) notabug. Request was from Mathieu Lirzin <mthl <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 17:56:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 33022 <at> debbugs.gnu.org and Mohamed Akram <mohd.akram <at> outlook.com> Request was from Mathieu Lirzin <mthl <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 17:56:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Nov 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 213 days ago.

Previous Next


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