bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #22531] Make 3.81 May Incorrectly Regard Object Dependencies as Com


From: anonymous
Subject: [bug #22531] Make 3.81 May Incorrectly Regard Object Dependencies as Complete
Date: Mon, 10 Mar 2008 15:17:38 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/523.12.2 (KHTML, like Gecko) Version/3.0.4 Safari/523.12.2

URL:
  <http://savannah.gnu.org/bugs/?22531>

                 Summary: Make 3.81 May Incorrectly Regard Object
Dependencies as Complete
                 Project: make
            Submitted by: None
            Submitted on: Monday 03/10/2008 at 15:17 UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: POSIX-Based
           Fixed Release: None

    _______________________________________________________

Details:

I have been establishing a build environment and infrastructure for a project
I am working on.

In the course of doing so, I have found some inexplicable behavior in make
3.81 when compiling and generating archive libraries in a pristine build tree.
The issue manifests itself on both Mac OS X / Darwin on i686 and Ubuntu
Desktop 7.10 on i686.

The behavior is that make creates the necessary object, depend and results
directories based on order-only prerequisites in my implicit rules, correctly
compiles the first source file into an object for the archive library, but
then regards all other objects as complete and then tries to archive the
library with non-existent and un-built objects:

% make
mkdir -p .depends
mkdir -p .objects
gcc -g -O1 -MD -MP -MF .depends/a.d -c -o .objects/a.o a.c
mkdir -p .results
ar -cr .results/libalphabet.a .objects/a.o .objects/b.o .objects/c.o
.objects/d.o .objects/e.o .objects/f.o .objects/g.o .objects/h.o
ar: .objects/b.o: No such file or directory
ar: .objects/c.o: No such file or directory
ar: .objects/d.o: No such file or directory
ar: .objects/e.o: No such file or directory
ar: .objects/f.o: No such file or directory
ar: .objects/g.o: No such file or directory
ar: .objects/h.o: No such file or directory
make: *** [.results/libalphabet.a] Error 1

If I then run make again, the order-only prerequisites having been already
satisfied this time around, things work as expected:

% make
gcc -g -O1 -MD -MP -MF .depends/b.d -c -o .objects/b.o b.c
gcc -g -O1 -MD -MP -MF .depends/c.d -c -o .objects/c.o c.c
gcc -g -O1 -MD -MP -MF .depends/d.d -c -o .objects/d.o d.c
gcc -g -O1 -MD -MP -MF .depends/e.d -c -o .objects/e.o e.c
gcc -g -O1 -MD -MP -MF .depends/f.d -c -o .objects/f.o f.c
gcc -g -O1 -MD -MP -MF .depends/g.d -c -o .objects/g.o g.c
gcc -g -O1 -MD -MP -MF .depends/h.d -c -o .objects/h.o h.c
ar -cr .results/libalphabet.a .objects/b.o .objects/c.o .objects/d.o
.objects/e.o .objects/f.o .objects/g.o .objects/h.o
ranlib .results/libalphabet.a

It works successfully under 3.80 but fails under 3.81:

3.81
====

% /usr/gnu/bin/make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin8.11.1

% /usr/gnu/bin/make -r -R clobber
rm -f .depends/a.d .depends/b.d .depends/c.d .depends/d.d .depends/e.d
.depends/f.d .depends/g.d .depends/h.d
rm -f .objects/a.o .objects/b.o .objects/c.o .objects/d.o .objects/e.o
.objects/f.o .objects/g.o .objects/h.o
rm -f .results/libalphabet.a
rm -rf .objects/
rm -rf .depends/
rm -rf .results/

% /usr/gnu/bin/make -r -R 
mkdir -p .depends
mkdir -p .objects
gcc -g -O1 -MD -MP -MF .depends/a.d -c -o .objects/a.o a.c
mkdir -p .results
ar -cr .results/libalphabet.a .objects/a.o .objects/b.o .objects/c.o
.objects/d.o .objects/e.o .objects/f.o .objects/g.o .objects/h.o
ar: .objects/b.o: No such file or directory
ar: .objects/c.o: No such file or directory
ar: .objects/d.o: No such file or directory
ar: .objects/e.o: No such file or directory
ar: .objects/f.o: No such file or directory
ar: .objects/g.o: No such file or directory
ar: .objects/h.o: No such file or directory
make: *** [.results/libalphabet.a] Error 1

3.80
====

% /usr/bin/make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

% /usr/bin/make -r -R clobber
rm -f .depends/a.d .depends/b.d .depends/c.d .depends/d.d .depends/e.d
.depends/f.d .depends/g.d .depends/h.d
rm -f .objects/a.o .objects/b.o .objects/c.o .objects/d.o .objects/e.o
.objects/f.o .objects/g.o .objects/h.o
rm -f .results/libalphabet.a
rm -rf .objects/
rm -rf .depends/
rm -rf .results/

% /usr/bin/make -r -R 
mkdir -p .depends
mkdir -p .objects
gcc -g -O1 -MD -MP -MF .depends/a.d -c -o .objects/a.o a.c
gcc -g -O1 -MD -MP -MF .depends/b.d -c -o .objects/b.o b.c
gcc -g -O1 -MD -MP -MF .depends/c.d -c -o .objects/c.o c.c
gcc -g -O1 -MD -MP -MF .depends/d.d -c -o .objects/d.o d.c
gcc -g -O1 -MD -MP -MF .depends/e.d -c -o .objects/e.o e.c
gcc -g -O1 -MD -MP -MF .depends/f.d -c -o .objects/f.o f.c
gcc -g -O1 -MD -MP -MF .depends/g.d -c -o .objects/g.o g.c
gcc -g -O1 -MD -MP -MF .depends/h.d -c -o .objects/h.o h.c
mkdir -p .results
ar -cr .results/libalphabet.a .objects/a.o .objects/b.o .objects/c.o
.objects/d.o .objects/e.o .objects/f.o .objects/g.o .objects/h.o
ranlib .results/libalphabet.a




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Monday 03/10/2008 at 15:17 UTC  Name: make-debug.tgz  Size: 1kB   By:
None
Sample makefile and sources attached.
<http://savannah.gnu.org/bugs/download.php?file_id=15221>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22531>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]