-
Notifications
You must be signed in to change notification settings - Fork 26
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
Building with depends system from local git subtree directory fails #139
Comments
Using bitcoin/bitcoin#31741 (https://github.com/ryanofsky/bitcoin/commits/pr/subtree.3) building works for me it would help to get more debug output. Can you try to print some variables to see if they have expected values? make MULTIPROCESS=1 print-native_capnp_download_file
make MULTIPROCESS=1 print-native_capnp_download_dir
make MULTIPROCESS=1 print-native_capnp_source
make MULTIPROCESS=1 print-native_libmultiprocess_local_dir
make MULTIPROCESS=1 print-native_libmultiprocess_fetched
make MULTIPROCESS=1 print-native_libmultiprocess_source For me these look like: native_capnp_download_file=capnproto-c++-1.1.0.tar.gz
native_capnp_download_dir=/home/russ/work/bitcoin/depends/work/download/native_capnp-1.1.0
native_capnp_source=/home/russ/work/bitcoin/depends/sources/capnproto-cxx-1.1.0.tar.gz
native_libmultiprocess_local_dir=../src/ipc/libmultiprocess
native_libmultiprocess_fetched=/home/russ/work/bitcoin/depends/sources/download-stamps/.stamp_fetched-native_libmultiprocess-.hash
native_libmultiprocess_source=/home/russ/work/bitcoin/depends/sources/src-ipc-libmultiprocess.tar It might also help to see the command line and complete output including V=1 |
macOS 15.2 with Xcode 16.2
These warnings happen on master too, see bitcoin/bitcoin#30978 I'll omit them:
Full log which includes the successfully built stuff: https://gist.github.com/Sjors/2b966733f511d984e298418e792835bc |
Thanks, I misread the original message and thought it was failing trying to download For debugging, first thing it would be helpful to know if the two printed files exist: native_libmultiprocess_source=/Users/sjors/dev/bitcoin/depends/sources/src-ipc-libmultiprocess.tar before & after running the command. You should also be able to get in a clean state by deleting them before running it. The first file is supposed to contain a tarball of the git subtree, and second file is supposed to contain sha256 checksum file containing a hash of the tarball. In your gist the first indication that there is a problem is line 537 where it appears make is trying to run the It would also be helpful to see output of the following print command to see if build id is including a tarball hash:
And a make --trace command which should reveal why make is trying to build a
It would also be helpful if you can add some debug prints in code supposed to be creating the tarball and hash file: --- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -41,12 +41,15 @@ endef
define int_get_local_dir
$(eval $(1)_sha256_hash:=$(shell
+ set -x; \
+ echo >&2 HELLO HELLO CREATING $($(1)_fetched); \
if ! [ -f $($(1)_fetched) ] || [ $($(1)_fetched) -ot $($(1)_local_dir) ]; then \
mkdir -p $(dir $($(1)_fetched)); \
$(build_TAR) -c --sort=name --mtime=0 --owner=0 --group=0 --numeric-owner -f $($(1)_source) -C $($(1)_local_dir) . && \
$(build_SHA256SUM) $($(1)_source) > $($(1)_fetched); \
fi; \
- cut -d" " -f1 $($(1)_fetched); ))
+ cut -d" " -f1 $($(1)_fetched); \
+ cat >&2 $($(1)_fetched); ))
$(eval $(1)_all_file_checksums+=$($(1)_sha256_hash))
endef
This output should show up early on when running any of the commands above. |
Not before and not after. With the patch applied, there's no
There's no
Hope that helps, happy to test more tomorrow. |
This might be a big hint. My version of make definitely has a --trace ( |
|
It tried using gmake 4.4.1 installed via Homebrew, but that doesn't help. Not even with It does however give me the
|
If I also add
Installing gnu-tar finally does the trick. But this seems a bit too invasive. |
Great! So there are two problems here. (1) The bigger problem is that the makefile code only seems to run in newer version of make to language differences and (2) the smaller problem is tar doesn't accept the same options. The smaller problem (2) can be fixed by just dropping the options. They were added to make tarball generation more deterministic. But this is not actually important. The only thing that is important is that the build hash needs to change if the tarball contents change, it is fine if build hash changes even when tarball contents do not change, since tarball itself is meant to be just cached and used locally and only rebuilt if removed or the source is touched to have a newer mtime. The problem (1) I will need to debug by testing with 3.81 locally. I'm not sure what the issue is but chatgpt had some ideas https://chatgpt.com/share/679a0d79-6e5c-800a-8285-be26d3d017e9 |
If you want to try something else you could try chatgpt's suggestion of splitting the |
I you can make me a patch I'll give it a try. |
This is not the first time when Apple's default Perhaps we should require a minimum version of GNU Make. |
Or switch depends to cmake? I think it's fine to ask Apple users that want to build depends to |
Btw, the |
It is pretty funny how old apple's version of make is. It's from 2006!. But it turned out to be very easy to support and bitcoin/bitcoin#31741 should be fixed now. The new code is actually simpler than the old code, so I am pleased with the result of this. |
I think original issue seems to be fixed so will close this |
Originally posted by @Sjors in bitcoin/bitcoin#31741 (review)
Building
MULTIPROCESS=1
with depends now fails:Before commit 01452f8c0da58db549bc46d0cfa7de715344efc4 depends does build (as you would expect).
The text was updated successfully, but these errors were encountered: