bug-make
[Top][All Lists]
Advanced

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

Re: Failure to expand macro (fwd)


From: David Highley
Subject: Re: Failure to expand macro (fwd)
Date: Mon, 11 Aug 2014 19:16:46 -0700 (PDT)

"Paul Smith wrote:"
> 
> On Wed, 2014-07-23 at 08:37 -0700, David Highley wrote:
> > Cross post from make-w32. Trying to find out if this is a known issue
> > and or if there is a fix in the works.
> 
> Sorry, I was on vacation.

Sorry, I should have updated with what we finally found.

The error message threw us off. The problem was the cmd dir command
returned an upper case drive letter in the paths and we had use the pwd
command to get a trim pattern for the beginning of the path so we could
make the paths relative. The pwd command returned a lower case drive
letter. The trim was being done with sed and it was failing as the
pattern did not match. Which left multiple colon characters in the
target line. Which causes a make failure. There is another error
message for this which we did not see until we broke down the make into
smaller parts.

I would not say there is any bug other than our build process being
vulnerable to the case of characters in this instance.

> 
> > Using make version 4.0-2 current version in cygwin version 1.7.31. We
> > have on make process that works with make 4.0 on Linux.
> 
> One possibility is that it's a bug in the Cygwin version of GNU make,
> which we don't explicitly support on this list: you'd need to ask the
> Cygwin folks.
> 
> Have you tried this with GNU make 4.0 built natively on Windows?  There
> are a few known bugs here which are fixed in the Git version.
> 
> > The make log provides:
> > cd ../CommonCode/src && "make"
> > make[1]: Entering directory '/cygdrive/n/daveh/msi/CommonCode/src'
> > makefile:17: *** target pattern contains no '%'.  Stop.
> > make[1]: Leaving directory '/cygdrive/n/daveh/msi/CommonCode/src'
> > makefile:16: recipe for target 'common' failed
> > make: *** [common] Error 2
> > 
> > We are assuming that the object file list $(OBJS) is not expanding.
> 
> If you check the GNU make manual, this error message is more clearly
> explained:
> 
> `missing target pattern.  Stop.'
> `multiple target patterns.  Stop.'
> `target pattern contains no `%'.  Stop.'
> `mixed implicit and static pattern rules.  Stop.'
>      These are generated for malformed static pattern rules.  The first
>      means there's no pattern in the target section of the rule; the
>      second means there are multiple patterns in the target section;
>      the third means the target doesn't contain a pattern character
>      (`%'); and the fourth means that all three parts of the static
>      pattern rule contain pattern characters (`%')-only the first two
>      parts should.  *Note Syntax of Static Pattern Rules: Static Usage.
> 
> Given this, it seems likely that one or more of the paths in OBJS
> contains a drive specifier such as C:, which the Cygwin port of make
> will interpret as an extra colon.
> 
> Remember that Cygwin is a UNIX environment.  You cannot use any Windows
> pathname facilities in Cygwin; they will not be recognized.
> 
> If you want to use drive specifiers in your paths or makefile you MUST
> use a native Windows port of GNU make, such as a MinGW build or using
> MSVC or similar.  You cannot mix and match UNIX and Windows pathnames if
> you use Cygwin GNU make; you must convert all paths to UNIX format.
> 
> > # Create archive library.
> > .NO_WINK_IN: $(LIBRARY)
> > $(LIBRARY): $(OBJS)       <- LINE FAILING, LINE 17 of makefile
> >          $(SET_E); $(MKDIR) $(LIBPATH); $(RM) $@; $(LINK)
> 
> If you add something like:
> 
>   $(info $(LIBRARY): $(OBJS))
> 
> to print out what make is seeing here the problem should be obvious.
> 


-- 

Regards,

David Highley
Highley Recommended, Inc.       Phone: (206) 669-0081
2927 SW 339th Street            WEB: http://www.highley-recommended.com
Federal Way, WA 98023-7732



reply via email to

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