-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
external/Makefile: Change MAKE_HOST and BUILD to CROSS_* #1533
Conversation
MAKE_HOST is internally defined by GNU Make. See http://git.savannah.gnu.org/cgit/make.git/commit/?id=ef11217
@ZmnSCPxj see this |
tACK, this fix my issue |
I would prefer autotools, but I think @rustyrussell is intending to create a This is OK to me if it fixes a problem in our utACK 708edeb |
@ZmnSCPxj I see, but we are not there yet and all I wanted was to do a minimal fix that makes sure both FreeBSD and Musl systems work. The problem lies actually in the Autoconf-enabled submodules which have a very outdated cd ~/src/lightning
#git clean -xfd # this is how I clean locally, but following would be better:
git add -A
git stash
git submodule deinit --all -f
git checkout 27a186be # the state with MAKE_HOST
git submodule update --init --recursive
sh /tmp/config-fix.sh
make -j4 And here is the #!/bin/sh
MYLOC=/tmp
URL=https://git.savannah.gnu.org/gitweb/
myget() {
wget -q --content-disposition \
"$URL?p=config.git;a=blob_plain;f=config.$1" \
&& echo File config.$1 downloaded
}
cd /tmp; myget guess; myget sub; cd - >/dev/null 2>&1
find . -name 'config.guess' | while read target
do
dir=${target%/*}
cp -f $MYLOC/config.guess $MYLOC/config.sub $dir/
echo Files in $dir updated
cd - >/dev/null 2>&1
done
rm $MYLOC/config.sub $MYLOC/config.guess |
@NicolasDorier ^^ above in-place change of |
If the above pull-request to libbacktrace is accepted, the submodule should be updated and that update commited to our Still, the fact that There is a way to add beginning of
|
Not very familiar with build systems in C++, so I wonder: What is the difference between updating libbacktrace to allow |
The difference is that CROSS_HOST it totally made-up, but the fact this environment variable should not be used by others is what fixes the problem (i.e. it will be empty instead of containing GNU Make pre-defined architecture identifier). On the other hand, updating the config dot sub and guess scripts in libbacktrace makes the build system understand it is not asked to cross-compile when The best solution, using something like GNU Autoconf, would make use of proper cross-compilation variables only when needed so this would not happen until someone really tries to cross compile (i.e. |
Closing this one. Build works well in #1538 |
MAKE_HOST is internally defined by GNU Make. See
http://git.savannah.gnu.org/cgit/make.git/commit/?id=ef11217
Checked on Alpine Linux locally.
I am sorry for not checking the presence of MAKE_HOST variable
in my first commit. Thanks to @NicolasDorier for pointing it out.
Ref: #1318 #1231