Closed arowser closed 5 years ago
Can you give gmake version? gmake --version
should work.
gmake -version GNU Make 4.2.1 Built for amd64-portbld-freebsd11.2 Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Thanks. I wonder if one of our inner Makefile
s is using make
directly instead of $(MAKE)
, I will have to search more, please wait. I presume you have a make --version
that is not a GNU make
, as this is a BSD?
yes, make --version return nothing, so its should not a GNU make.
On Fri, Jul 26, 2019 at 6:10 PM ZmnSCPxj, ZmnSCPxj jxPCSmnZ < notifications@github.com> wrote:
Thanks. I wonder if one of our inner Makefiles is using make directly instead of $(MAKE), I will have to search more, please wait. I presume you have a make --version that is not a GNU make, as this is a BSD?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ElementsProject/lightning/issues/2850?email_source=notifications&email_token=AAEEDCUI2S4QDQN45R7QWR3QBLESHA5CNFSM4IHCGJC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD24EU6I#issuecomment-515394169, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEDCTHZLBJ7JF5SOFMEJTQBLESHANCNFSM4IHCGJCQ .
I guess you are right, I just make a test: sudo mv /usr/bin/make /usr/bin/make_old sudo cp /usr/local/bin/gmake /usr/bin/make
Then run rebuild, the makefile issue gone, then I got another errors, but these errors seems not Makefile related:
tools/test/gen_test.c:12:90: error: expected function body after function
declarator
struct amount_msat fromwire_amount_msat(const u8 **cursor UNNEEDED, size_t
*max UNNEEDED)n{ fprintf(stderr, "fromwire_amount_msat called!\n");
abort(); }
^
tools/test/gen_test.c:426:2: error: implicit declaration of function
'towire_test_short_id' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
towire_test_short_id(&ptr, &r->tlv3->subtype);
^
tools/test/gen_test.c:426:2: error: this function declaration is not a
prototype [-Werror,-Wstrict-prototypes]
tools/test/gen_test.c:427:2: error: implicit declaration of function
'towire_subtype_var_len' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
towire_subtype_var_len(&ptr, &r->tlv3->varlen_subtype);
^
tools/test/gen_test.c:427:2: error: this function declaration is not a
prototype [-Werror,-Wstrict-prototypes]
tools/test/gen_test.c:428:2: error: implicit declaration of function
'towire_subtype_var_assign' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
towire_subtype_var_assign(&ptr, &r->tlv3->varlen_assigned);
...
On Fri, Jul 26, 2019 at 6:28 PM daniel arowser@gmail.com wrote:
yes, make --version return nothing, so its should not a GNU make.
On Fri, Jul 26, 2019 at 6:10 PM ZmnSCPxj, ZmnSCPxj jxPCSmnZ < notifications@github.com> wrote:
Thanks. I wonder if one of our inner Makefiles is using make directly instead of $(MAKE), I will have to search more, please wait. I presume you have a make --version that is not a GNU make, as this is a BSD?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ElementsProject/lightning/issues/2850?email_source=notifications&email_token=AAEEDCUI2S4QDQN45R7QWR3QBLESHA5CNFSM4IHCGJC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD24EU6I#issuecomment-515394169, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEDCTHZLBJ7JF5SOFMEJTQBLESHANCNFSM4IHCGJCQ .
Could you check the output of gmake -p | grep MAKE
?
We use $(MAKE)
relatively consistently, so I wonder if gmake
is somehow setting MAKE = make
instead of MAKE = gmake
.
Yes, it would be a fair bit of work to support non-GNU make, and I'm sure it would break constantly. But we should use $(MAKE) everywhere, and obviously fix compile issues for the BSDs....
gmake -p | grep MAKE
tools/test/gen_test.c:12:90: error: expected function body after function declarator
struct amount_msat fromwire_amount_msat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)n{ fprintf(stderr, "fromwire_amount_msat called!\n"); abort(); }
^
tools/test/gen_test.c:426:2: error: implicit declaration of function 'towire_test_short_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
towire_test_short_id(&ptr, &r->tlv3->subtype);
^
tools/test/gen_test.c:426:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tools/test/gen_test.c:427:2: error: implicit declaration of function 'towire_subtype_var_len' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
towire_subtype_var_len(&ptr, &r->tlv3->varlen_subtype);
^
tools/test/gen_test.c:427:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tools/test/gen_test.c:428:2: error: implicit declaration of function 'towire_subtype_var_assign' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
towire_subtype_var_assign(&ptr, &r->tlv3->varlen_assigned);
^
tools/test/gen_test.c:428:2: note: did you mean 'towire_subtype_var_len'?
tools/test/gen_test.c:427:2: note: 'towire_subtype_var_len' declared here
towire_subtype_var_len(&ptr, &r->tlv3->varlen_subtype);
^
tools/test/gen_test.c:428:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
towire_subtype_var_assign(&ptr, &r->tlv3->varlen_assigned);
^
tools/test/gen_test.c:429:2: error: implicit declaration of function 'towire_subtype_varlen_varsize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
towire_subtype_varlen_varsize(&ptr, &r->tlv3->test_sbt_varlen_varsize);
^
tools/test/gen_test.c:429:2: note: did you mean 'towire_subtype_var_assign'?
tools/test/gen_test.c:428:2: note: 'towire_subtype_var_assign' declared here
towire_subtype_var_assign(&ptr, &r->tlv3->varlen_assigned);
^
tools/test/gen_test.c:429:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
towire_subtype_varlen_varsize(&ptr, &r->tlv3->test_sbt_varlen_varsize);
^
tools/test/gen_test.c:444:3: error: implicit declaration of function 'towire_test_features' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
towire_test_features(&ptr, r->tlv3->varlen_varsize[i]);
^
tools/test/gen_test.c:444:3: note: did you mean 'towire_test_enum'?
tools/test/enum.h:11:6: note: 'towire_test_enum' declared here
void towire_test_enum(u8 **pptr, const enum test_enum test_enum);
^
tools/test/gen_test.c:444:3: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
towire_test_features(&ptr, r->tlv3->varlen_varsize[i]);
^
tools/test/gen_test.c:456:2: error: implicit declaration of function 'fromwire_test_short_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
fromwire_test_short_id(cursor, plen, &r->tlv3->subtype);
^
tools/test/gen_test.c:456:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tools/test/gen_test.c:457:29: error: implicit declaration of function 'fromwire_subtype_var_len' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
r->tlv3->varlen_subtype = *fromwire_subtype_var_len(r->tlv3, cursor, plen);
^
tools/test/gen_test.c:457:29: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
tools/test/gen_test.c:457:28: error: indirection requires pointer operand ('int' invalid)
r->tlv3->varlen_subtype = *fromwire_subtype_var_len(r->tlv3, cursor, plen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/test/gen_test.c:458:30: error: implicit declaration of function 'fromwire_subtype_var_assign' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
r->tlv3->varlen_assigned = *fromwire_subtype_var_assign(r->tlv3, cursor, plen);
^
tools/test/gen_test.c:458:30: note: did you mean 'fromwire_subtype_var_len'?
tools/test/gen_test.c:457:29: note: 'fromwire_subtype_var_len' declared here
r->tlv3->varlen_subtype = *fromwire_subtype_var_len(r->tlv3, cursor, plen);
^
tools/test/gen_test.c:458:30: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
r->tlv3->varlen_assigned = *fromwire_subtype_var_assign(r->tlv3, cursor, plen);
^
tools/test/gen_test.c:458:29: error: indirection requires pointer operand ('int' invalid)
r->tlv3->varlen_assigned = *fromwire_subtype_var_assign(r->tlv3, cursor, plen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake: *** [<builtin>: tools/test/gen_test.o] Error 1
MAKEFILE_LIST := Makefile config.vars external/Makefile bitcoin/Makefile bitcoin/test/Makefile common/Makefile common/test/Makefile wire/Makefile wire/test/Makefile hsmd/Makefile gossipd/Makefile gossipd/test/Makefile openingd/Makefile channeld/Makefile channeld/test/Makefile closingd/Makefile onchaind/Makefile onchaind/test/Makefile connectd/Makefile connectd/test/Makefile lightningd/Makefile wallet/Makefile wallet/test/Makefile lightningd/test/Makefile cli/Makefile cli/test/Makefile doc/Makefile devtools/Makefile tools/Makefile tools/test/Makefile plugins/Makefile
GNUMAKEFLAGS :=
HAVE_POINTER_SAFE_MAKECONTEXT = 0
MAKELEVEL := 0
MAKE = $(MAKE_COMMAND)
MAKE_VERSION := 4.2.1
MAKE_COMMAND := gmake
MAKEFLAGS = p
MAKEFILES :=
MAKEINFO = makeinfo
MAKE_TERMERR := /dev/pts/0
MAKE_HOST := amd64-portbld-freebsd11.2
$(MAKE) -C external/libwally-core DESTDIR=$$(pwd)/external install-exec
cd external/libwally-core && ./tools/autogen.sh && ./configure CC="$(CC)" --enable-static=yes --host="$(MAKE_HOST)" --build="$(BUILD)" --enable-module-recovery --enable-shared=no --prefix=/ --libdir=/ && $(MAKE)
$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
$(MAKE) -C ../.. onchaind-all
$(MAKE) -C ../.. opening-all
cd external/libwally-core && ./tools/autogen.sh && ./configure CC="$(CC)" --enable-static=yes --host="$(MAKE_HOST)" --build="$(BUILD)" --enable-module-recovery --enable-shared=no --prefix=/ --libdir=/ && $(MAKE)
$(MAKE) -C external/libwally-core DESTDIR=$$(pwd)/external install-exec
$(MAKE) -C .. lightningd-all
$(MAKE) -C .. doc-all
$(MAKE) -C .. lightningd-all
$(MAKE) -C ../.. closingd-all
$(MAKE) -C external/libsodium DESTDIR=$$(pwd)/external install-exec
$(MAKE) -C ../.. lightningd/channel-all
cd external/libwally-core && ./tools/autogen.sh && ./configure CC="$(CC)" --enable-static=yes --host="$(MAKE_HOST)" --build="$(BUILD)" --enable-module-recovery --enable-shared=no --prefix=/ --libdir=/ && $(MAKE)
$(MAKE) -C .. wire-all
$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
$(MAKE) ccan/config.h
$(MAKE) -C .. lightningd/hsm-all
$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
$(MAKE) DESTDIR=$$(pwd)/testinstall install
$(MAKE) DESTDIR=$$(pwd)/testinstall uninstall
$(MAKE) -C external/libwally-core DESTDIR=$$(pwd)/external install-exec
$(MAKE) installcheck
$(MAKE) pytest
$(MAKE) -C .. gossipd-all
$(MAKE) -C .. connectd-all
$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
cd external/libsodium && ./autogen.sh && ./configure CC="$(CC)" --enable-static=yes --host="$(MAKE_HOST)" --build="$(BUILD)" --enable-shared=no --enable-tests=no --prefix=/ --libdir=/ && $(MAKE)
cd external/libbacktrace-build && ../libbacktrace/configure CC="$(CC)" --enable-static=yes --host="$(MAKE_HOST)" --build="$(BUILD)" --enable-shared=no --prefix=/ --libdir=/ && $(MAKE)
$(MAKE) -C external/libbacktrace-build DESTDIR=$$(pwd)/external install-exec
Thanks @arowser ! Can you check #2861 and see if it fixes the issue?
Yes, build pass with https://github.com/ElementsProject/lightning/pull/2861, thanks
Issue and Steps to Reproduce
Tested with 6c7a45623e6c2367315f8db58f8faf0c47592943 on freebsd 11.2 ./configure gmake
error log