-
Notifications
You must be signed in to change notification settings - Fork 37.8k
depends: some base fixes/changes #7809
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
Conversation
These add very simple sanity checks to ensure that the build/host toolchains have not changed since the last run. If they have, all ids will change and packages will be rebuilt. For more complicated usage (like parsing dpkg), HOST_ID_SALT/BUILD_ID_SALT may be used to introduce arbitrary data to the ids.
In some cases, failed downloads wouldn't trigger a fallback download attempt. Namely, checksum mismatches.
Checksums were being verified after download, but not again before extraction
So the patch to the fallback logic will fix checksum issues like https://travis-ci.org/bitcoin/bitcoin/jobs/112855470#L831 ? But does it also fix the issues where the fallback logic itself appeared to fail? (c.f. https://travis-ci.org/bitcoin/bitcoin/jobs/112846086#L4033 ) |
Concept ACK, nice! |
Yes, it should fix both. It broadens the retry logic, so that a "try" becomes fetch+validate. If the first try fails, it's retried with the fallback url. In the first example, the download appears to succeed but the checksum doesn't match. Since the download was "successful", it doesn't retry. Now it retries the whole thing with the fallback url. A hacked test (i purposely broke the checksum): cory@cory-i7:~/dev/bitcoin/depends(depends-updates)$ make download
Checksum missing or mismatched for qrencode source. Forcing re-download.
Fetching qrencode-3.4.4.tar.bz2 from https://fukuchi.org/works/qrencode/
2016-04-05 13:20:14 URL:https://fukuchi.org/works/qrencode//qrencode-3.4.4.tar.bz2 [369136/369136] -> "/home/cory/dev/bitcoin/depends/work/download/qrencode-3.4.4/qrencode-3.4.4.tar.bz2.temp" [1]
/home/cory/dev/bitcoin/depends/work/download/qrencode-3.4.4/qrencode-3.4.4.tar.bz2.temp: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match
Fetching qrencode-3.4.4.tar.bz2 from https://bitcoincore.org/depends-sources
2016-04-05 13:20:15 URL:http://dev.bitcoincore.org/depends-sources/qrencode-3.4.4.tar.bz2 [369136/369136] -> "/home/cory/dev/bitcoin/depends/work/download/qrencode-3.4.4/qrencode-3.4.4.tar.bz2.temp" [1]
/home/cory/dev/bitcoin/depends/work/download/qrencode-3.4.4/qrencode-3.4.4.tar.bz2.temp: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match
make[1]: *** [/home/cory/dev/bitcoin/depends/sources/download-stamps/.stamp_fetched-qrencode-qrencode-3.4.4.tar.bz2.hash] Error 1
make: *** [download-osx] Error 2 For the second, I'm not sure why that was a problem before. As-is, it looks like it should try to re-download. But as a test, I've forced a similar failure, and it works as intended. cory@cory-i7:~/dev/bitcoin/depends(depends-updates)$ make download
Checksum missing or mismatched for qrencode source. Forcing re-download.
Fetching qrencode-3.4.4.tar.bz2 from https://fukuchi.org/works/qrencode/
OpenSSL: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
Unable to establish SSL connection.
Fetching qrencode-3.4.4.tar.bz2 from https://bitcoincore.org/depends-sources
OpenSSL: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
Unable to establish SSL connection.
make[1]: *** [/home/cory/dev/bitcoin/depends/sources/download-stamps/.stamp_fetched-qrencode-qrencode-3.4.4.tar.bz2.hash] Error 4
make: *** [download-osx] Error 2 |
Tested ACK dc4ec6d with my crosstool-ng ARM build |
build_id_string+=$(shell $(build_AR) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_CXX) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_RANLIB) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_STRIP) --version 2>/dev/null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also want to get the linker info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's tricky because we don't use the linker directly. It's not specified in depends, because there's no generic way to handle it. I think in 99% of the cases, if the linker changed, one of the above would've changed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True - we never use ld
directly, and we shouldn't, for example it would be quite annoying to figure out what the linker is (and what plugin it is using - turns out it is loading /opt/clang39/lib/LLVMgold.so
) in my lto setup testing the clang master branch:
CC="${CLANGPATH}/bin/clang "
CXX="${CLANGPATH}/bin/clang++"
CFLAGS="-flto -O2 -g" CXXFLAGS="-flto -O2 -g" LDFLAGS="-flto -O2 -fuse-ld=gold"
RANLIB="${CLANGPATH}/bin/llvm-ranlib"
So yes just wanted to ask to be sure.
Enable macOS cross-compilation Includes code cherry-picked from the following upstream PRs: - bitcoin/bitcoin#7809 - The `native_cctools` fix. - bitcoin/bitcoin#8210 - The macOS toolchain bump. - bitcoin/bitcoin#9891 - bitcoin/bitcoin#15581 - The `tar` change. - bitcoin/bitcoin#16049 - The `native_cctools` change. Build instructions: - Fetch `MacOSX10.11.sdk` from e.g. https://github.com/phracker/MacOSX-SDKs/releases - Extract it into `depends/SDKs` (creating that folder first) - `HOST=x86_64-apple-darwin11 ./zcutil/build.sh`
I'm pushing these all in one PR because most of these changes will cause full cache invalidation, so we may as well try to only do it once.