On 2/14/20 4:14 AM, Pierre Labastie via blfs-dev wrote:
Hi,

I get:
[LD] 2.#define
[LD] 10-#define
g++: error: 2.#define: No such file or directory
g++: error: 10-#define: No such file or directory
g++: error: .#define: No such file or directory
g++: error: 11: No such file or directory
g++: error: 2.#define: No such file or directory
g++: error: 10-#define: No such file or directory
g++: error: .#define: No such file or directory
g++: error: 11: No such file or directory

This is because make/common.mak has:
MAJOR_VERSION:=$(strip $(subst \#define,, $(subst $(MAJOR_VERSION_DEFINE),,\
                    $(shell grep "define *$(MAJOR_VERSION_DEFINE) *"
$(VERSION_FILE)))))

with an escaped #. But the release notes of make-4.3 tell:
* WARNING: Backward-incompatibility!
   Number signs (#) appearing inside a macro reference or function invocation
   no longer introduce comments and should not be escaped with backslashes:
   thus a call such as:
     foo := $(shell echo '#')
   is legal.  Previously the number sign needed to be escaped, for example:
     foo := $(shell echo '\#')
   Now this latter will resolve to "\#".

So the following sed is needed:
sed -i 's/\\#/#/' make/common.mak

*But* this breaks compatibility with make-4.x with x<3... Should I include it
in the book anyway?

Yes, with an intro line that says that it is for make-4.3 and later.

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to