-
Notifications
You must be signed in to change notification settings - Fork 37.7k
depends: remove dependency on Darwin libtool #29232
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
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Looks good. Have tested this in the LLD PR. Will ACK after rebase and adding the PIC fix for libnatpmp. |
ba009b9
to
623d75a
Compare
Rebased on master and fixed up pic. |
Actually, you'll also need to move |
Patch taken from upstream: miniupnp/miniupnp#604
Note that this is completely unrelated to gnu usage of libtool.
623d75a
to
a28c6bb
Compare
Thanks, done. |
Guix build (aarch64 & x86_64): 73062e70b4ec1fa814c0c25f12cbbcfbabfd3a5e82827a3bfeb2f29b30d0b84f guix-build-a28c6bbde0bc/output/aarch64-linux-gnu/SHA256SUMS.part
0965ed91f84129a64b6e0873b5feb182d83cae0dac6d89a51667d5fbe46fc68c guix-build-a28c6bbde0bc/output/aarch64-linux-gnu/bitcoin-a28c6bbde0bc-aarch64-linux-gnu-debug.tar.gz
87ee5bc2103fc10b8e7acbfa776430918538f05fccf024b624f224f73987f745 guix-build-a28c6bbde0bc/output/aarch64-linux-gnu/bitcoin-a28c6bbde0bc-aarch64-linux-gnu.tar.gz
c9bad44733b9f9a90d26e7d82b50bd2d11586723ec2fc330d47924e520d4d4a2 guix-build-a28c6bbde0bc/output/arm-linux-gnueabihf/SHA256SUMS.part
6c6d4bfd8e3db6509c0e3710b78b2e78fef7d17f7779db9ad16da4e4987cdb23 guix-build-a28c6bbde0bc/output/arm-linux-gnueabihf/bitcoin-a28c6bbde0bc-arm-linux-gnueabihf-debug.tar.gz
29de9c2f7b4196e56a30a31ced90693a5040dca8464383a4989e28bab411a73e guix-build-a28c6bbde0bc/output/arm-linux-gnueabihf/bitcoin-a28c6bbde0bc-arm-linux-gnueabihf.tar.gz
962d22bb3927fa32b92fb6eca5b9d783bd06eb9543910bd84a916c6664a3fc78 guix-build-a28c6bbde0bc/output/arm64-apple-darwin/SHA256SUMS.part
57c30bca8156b16b6d49327fb5fa67adade9126553ab4dbbd40eb154bf093bc1 guix-build-a28c6bbde0bc/output/arm64-apple-darwin/bitcoin-a28c6bbde0bc-arm64-apple-darwin-unsigned.tar.gz
06b291838e73557b6f7d104216b63c1d93da3db8300bb9923e9785efcad87e1c guix-build-a28c6bbde0bc/output/arm64-apple-darwin/bitcoin-a28c6bbde0bc-arm64-apple-darwin-unsigned.zip
5046771fa256969d780c479498d22f420cfc59a7a9b52a1cf906d2f0e1d351f1 guix-build-a28c6bbde0bc/output/arm64-apple-darwin/bitcoin-a28c6bbde0bc-arm64-apple-darwin.tar.gz
459a0433a4b275b38db0010972de6bc2bd81f107f30fdac81c205c7cd2f4202c guix-build-a28c6bbde0bc/output/dist-archive/bitcoin-a28c6bbde0bc.tar.gz
34c599140cd538ebedf3e1443eb9ade80a3f649cdfcb56d3adb2bba2c05d1e3d guix-build-a28c6bbde0bc/output/powerpc64-linux-gnu/SHA256SUMS.part
3d37246d4b3a9bf64746bae08e25fae938cc11a1d88d5fadd804bbc195adbf26 guix-build-a28c6bbde0bc/output/powerpc64-linux-gnu/bitcoin-a28c6bbde0bc-powerpc64-linux-gnu-debug.tar.gz
4d594e1e7ac8c3dcb41852583a0e574bd919e8d166f1f463bb0f01792e55b35f guix-build-a28c6bbde0bc/output/powerpc64-linux-gnu/bitcoin-a28c6bbde0bc-powerpc64-linux-gnu.tar.gz
13f5630869aae0b628d5a7163fed467df05b0d83e9d5ead22db1f57c3915128d guix-build-a28c6bbde0bc/output/powerpc64le-linux-gnu/SHA256SUMS.part
26577922d5c1eb9f125b87876ffb3b1572c60597fb362347db97bf2c7acc7824 guix-build-a28c6bbde0bc/output/powerpc64le-linux-gnu/bitcoin-a28c6bbde0bc-powerpc64le-linux-gnu-debug.tar.gz
1c1ecb9fca5bed82b5f342310573ad16720516d338dfdf10d8e2dfece18e61d3 guix-build-a28c6bbde0bc/output/powerpc64le-linux-gnu/bitcoin-a28c6bbde0bc-powerpc64le-linux-gnu.tar.gz
a9dd2a4b8e612c1c514e5f08cd14b603bd7e5699319b903c84d93fc6bdd07936 guix-build-a28c6bbde0bc/output/riscv64-linux-gnu/SHA256SUMS.part
b4306afe81a87e3b616ca4da28d17644a9ea1af1fde894a07c1f3aff685d1d38 guix-build-a28c6bbde0bc/output/riscv64-linux-gnu/bitcoin-a28c6bbde0bc-riscv64-linux-gnu-debug.tar.gz
8c3fe1305e1030fe5b8d6b519148dc4385428a685e2cbc2c6ea665ac6ebbb594 guix-build-a28c6bbde0bc/output/riscv64-linux-gnu/bitcoin-a28c6bbde0bc-riscv64-linux-gnu.tar.gz
a7eefad4e2d73c46ffa711d16901348ee9b353ce8f5d9f3b77ff379472ff938a guix-build-a28c6bbde0bc/output/x86_64-apple-darwin/SHA256SUMS.part
e38858ef2a2a45cb2a882eb7921f3db28492e28c5f9ee9782346a4155f3dc983 guix-build-a28c6bbde0bc/output/x86_64-apple-darwin/bitcoin-a28c6bbde0bc-x86_64-apple-darwin-unsigned.tar.gz
8623edd712e843a1186175e89fadf1b78e67ace0f8daec1f9eb6e3981d4058f8 guix-build-a28c6bbde0bc/output/x86_64-apple-darwin/bitcoin-a28c6bbde0bc-x86_64-apple-darwin-unsigned.zip
1031b5fe622ffc1aa0adfdb57cfe271e2c09226d99e1389fcd9204c2c839c400 guix-build-a28c6bbde0bc/output/x86_64-apple-darwin/bitcoin-a28c6bbde0bc-x86_64-apple-darwin.tar.gz
29989368d745d3fd84b02839edff446f2bc8be877eeb0067d8f65e0eab0f9093 guix-build-a28c6bbde0bc/output/x86_64-linux-gnu/SHA256SUMS.part
4f879a6d03df624ffb5c0ba9de2547ff3fea5692c184658feb38838911627214 guix-build-a28c6bbde0bc/output/x86_64-linux-gnu/bitcoin-a28c6bbde0bc-x86_64-linux-gnu-debug.tar.gz
9c5d3373134aefd4d2144c4913436e0a75fff73c977b0f54a3f9d25b18b580da guix-build-a28c6bbde0bc/output/x86_64-linux-gnu/bitcoin-a28c6bbde0bc-x86_64-linux-gnu.tar.gz
85d5d934d4ae09426bf6235b6e81b3ed722905a4eaf5169212d712fac08754a4 guix-build-a28c6bbde0bc/output/x86_64-w64-mingw32/SHA256SUMS.part
d7a6e9bea26b1b856d8017d8f1fb17b5868080e2d0971e746b2d1157f6c2cb1e guix-build-a28c6bbde0bc/output/x86_64-w64-mingw32/bitcoin-a28c6bbde0bc-win64-debug.zip
b93f1e6c307cefbba41bb274d6e49673530f930e37cd9919317da0678a0d1c3c guix-build-a28c6bbde0bc/output/x86_64-w64-mingw32/bitcoin-a28c6bbde0bc-win64-setup-unsigned.exe
7cb9624ca622e5430dc4aef39ca30a3858ee558c2eff8a77e00bbc212b8661e1 guix-build-a28c6bbde0bc/output/x86_64-w64-mingw32/bitcoin-a28c6bbde0bc-win64-unsigned.tar.gz
f3f1fba109ebfe22fa74930a80902e868b0640413cc1d52297d060977e1e6e4d guix-build-a28c6bbde0bc/output/x86_64-w64-mingw32/bitcoin-a28c6bbde0bc-win64.zip |
Guix builds (x86):
|
Concept ACK. |
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.
ACK a28c6bb
mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\ | ||
install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\ | ||
install libminiupnpc.a $($(package)_staging_prefix_dir)/lib | ||
$(MAKE) DESTDIR=$($(package)_staging_dir) install |
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.
nit: Using the underlying build system call directly makes CMake re-build all targets again. That could be avoided by using CMake's invocation like that:
$(MAKE) DESTDIR=$($(package)_staging_dir) install | |
cmake --install . --prefix $($(package)_staging_prefix_dir) |
Could be verified by building sequentially the miniupnpc_built
and miniupnpc_staged
targets.
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.
Incorporated into #29707.
$(package)_config_opts = -DUPNPC_BUILD_SAMPLE=OFF -DUPNPC_BUILD_SHARED=OFF | ||
$(package)_config_opts += -DUPNPC_BUILD_STATIC=ON -DUPNPC_BUILD_TESTS=OFF | ||
$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
$(package)_cppflags_mingw32=-U_WIN32_WINNT -D_WIN32_WINNT=0x0601 |
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.
nit: Maybe add a comment that this line might be revised in the future considering miniupnp/miniupnp#659?
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.
It's weird that miniupnpc would add a special build system option for setting a single, Windows-only define. It's not really clear what the benefits of that are over just using CPPFLAGS
, which should always work. The only rationale from the PR author for not doing that was I don't like it.
.
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.
Also incoroprated this in #29707.
index 433fc732..007ac729 100644 | ||
--- a/miniupnpc/CMakeLists.txt | ||
+++ b/miniupnpc/CMakeLists.txt | ||
@@ -99,7 +99,7 @@ if (UPNPC_BUILD_STATIC) |
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.
@@ -99,7 +99,7 @@ if (UPNPC_BUILD_STATIC) | |
@@ -116,7 +116,7 @@ if (UPNPC_BUILD_STATIC) |
to avoid Hunk #1 succeeded at 116 (offset 17 lines).
endef | ||
|
||
define $(package)_stage_cmds | ||
mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib &&\ | ||
install *.h $($(package)_staging_prefix_dir)/include &&\ | ||
install ../*.h $($(package)_staging_prefix_dir)/include &&\ |
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.
nit: Maybe skip headers that are used only to build the package:
install ../*.h $($(package)_staging_prefix_dir)/include &&\ | |
install ../natpmp.h ../natpmp_declspec.h $($(package)_staging_prefix_dir)/include &&\ |
?
I spoke too soon. There are multiple issues here. The main one is differences in the upstream Autotools & CMake buildsystems that make master and this PR produce completely different output. One example, when building miniupnpc, its Autotools build sets # master
nm -C depends/aarch64-unknown-linux-gnu/lib/libminiupnpc.a | grep recv
U recvfrom
# this PR
nm -C depends/aarch64-unknown-linux-gnu/lib64/libminiupnpc.a | grep recv
U recv So CMake isn't a drop-in replacement; and I'm assuming there will be other subtle differences (which may or may not matter to us). Anything we find are probably bugs that should be fixed upstream, unless they are not concerned about keeping the two build systems in sync? Another issue is the same one that we had to fix in #28846. The upstream CMake build system uses checking for miniupnpc/miniupnpc.h... yes
checking for miniupnpc/upnpcommands.h... yes
checking for miniupnpc/upnperrors.h... yes
checking for upnpDiscover in -lminiupnpc... no
...
with upnp = no |
Closing in favor of #29298. |
5b9d5bf depends: remove (darwin) libtool now that it's no longer used (Cory Fields) 3ef6563 depends: use ar rather than libtool for miniupnpc/libnatpmp (Cory Fields) Pull request description: An alternative to #29232 Rather than switching to the CMake builds which [proved problematic](#29232 (comment)), do the quick and dirty thing of just patching out libtool. Doesn't seem to introduce any new issues. This should buy us time to upstream the necessary CMake fixes. ACKs for top commit: TheCharlatan: ACK 5b9d5bf fanquake: ACK 5b9d5bf Tree-SHA512: c75c4bcc9332d8c1fc3395e2b5fc7265849186afc7005700f662ab291e6ea1f111025fad733d0b0b39d35029d1b757d3f1937d63aad3c0c3b88d0f8ac902ee18
Sent a change upstream miniupnp/miniupnp#721 |
Nice, thanks! |
3c1ae3e depends: switch libnatpmp to CMake (Cory Fields) 72ba7b5 depends: libnatpmp f2433bec24ca3d3f22a8a7840728a3ac177f94ba (fanquake) Pull request description: This picks up one of the changes from #29232, which is a switch to building libnatpmp with CMake. It includes an update to the most recent version of libnatpmp (miniupnp/libnatpmp@f2433be), which includes (miniupnp/libnatpmp#43). From an initial look I couldn't find any significant difference between the Autotools and CMake produced libs. ACKs for top commit: m3dwards: ACK 3c1ae3e hebasto: ACK 3c1ae3e. TheCharlatan: ACK 3c1ae3e Tree-SHA512: 1dd9d9933a5fceb9f8c4e1d68cd5cb4456a10a6dd27a6f6316f14493f9d2efad981ef8be9570c09ca82d45163aebd7f4cb2b2449989ec6084268ddba9a564c83
5195baa depends: fix miniupnpc snprintf usage on Windows (fanquake) 3c2d440 depends: switch miniupnpc to CMake (Cory Fields) f5618c7 depends: add upstream CMake patch to miniupnpc (fanquake) 6866b57 depends: miniupnpc 2.2.7 (fanquake) Pull request description: This picks up one of the changes from #29232, which is a switch to building miniupnpc with CMake. It includes an update to the most recent version of miniupnpc (2.2.7), which means we can drop one patch from that commit, and includes a new patch for a change I've upstreamed miniupnp/miniupnp#721, as well as some suggestions from the previous PR. ACKs for top commit: theuni: ACK 5195baa. TheCharlatan: utACK 5195baa Tree-SHA512: 5b27e132cd5eed285e9be34c8b96893417d92a1ae55c99345c9a89e1c1c5e40e4bc840bc061b879758b2b11fcb520cd98c3da985c1e153f2e5380cf63efe2d69
Split out of #21778.
cctools' libtool (and llvm's clone) are unnecessary these days, and were only used (unnecessarily) in miniupnpc and libnatpnp. Both of those projects now have CMake support which eliminates their use.
This PR switches those builds to use CMake, then removes our libtool machinery.