objcopy isn’t currently used for the Darwin build (only for Linux and splitting the debug symbols), but we shouldn’t be producing a toolchain file that refers to nonexistent tools.
depends: add missing Darwin objcopy
Our CMake toolchain for a Darwin cross build currently contains:
```bash
set(CMAKE_AR "/usr/bin/llvm-ar")
set(CMAKE_RANLIB "/usr/bin/llvm-ranlib")
set(CMAKE_STRIP "/usr/bin/llvm-strip")
set(CMAKE_OBJCOPY "arm64-apple-darwin-objcopy")
set(CMAKE_OBJDUMP "/usr/bin/llvm-objdump")
```
`objcopy` isn't currently used for the Darwin build (only for Linux and
splitting the debug symbols), but we shouldn't be producing a toolchain
file that refers to nonexistent tools.
3edaf0b428
DrahtBot
commented at 10:56 am on February 11, 2025:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
objcopy isn’t currently used for the Darwin build (only for Linux and splitting the debug symbols), but we shouldn’t be producing a toolchain file that refers to nonexistent tools.
From CMake’s perspective, the complete toolchain for the Darwin platform additionally includes install_name_tool. It seems reasonable to reconsider 3bee51427a05075150721f0a05ead8f92e1ba019 to avoid the following hack:https://github.com/bitcoin/bitcoin/blob/c242fa5be358150d83c2446896b6f4c45c6365e9/CMakeLists.txt#L62-L66
theuni
commented at 5:18 pm on February 13, 2025:
member
@hebasto Agreed as long as it’s trivial. From what I can tell llvm-install-name-tool is just as available as the rest of the tools, so even though it’s annoying because it’s not actually necessary, I don’t see much harm in setting it. @fanquake ?
fanquake
commented at 5:55 pm on February 13, 2025:
member
even though it’s annoying because it’s not actually necessary, I don’t see much harm in setting it. @fanquake ?
I’m just not sure of us having to setup/provide tools because CMake thinks they should be available, when we don’t use them. iirc one of the issues with install-name-tool was that it was only available version-suffixed on certain distros (even when the main llvm install was not suffixed), making it hard to find.
This hack is only to work around other Boost/CMake issues right? (CMake wants a tool available to compile libraries just for us to throw those libraries away anyways). I’m not sure redundantly compiling things is a great argument for setting up tools we don’t otherwise need.
I’m assuming there are likely other tools/programs for various toolchains that CMake might expect in some sense, that we aren’t providing (or using) or ensuring are available?
theuni
commented at 6:32 pm on February 13, 2025:
member
even though it’s annoying because it’s not actually necessary, I don’t see much harm in setting it. @fanquake ?
I’m just not sure of us having to setup/provide tools because CMake thinks they should be available, when we don’t use them. iirc one of the issues with install-name-tool was that it was only available version-suffixed on certain distros (even when the main llvm install was not suffixed), making it hard to find.
Ah right, I’d forgotten that bit. Blah.
Yeah, ok, nevermind. I figured there was no harm in adding this if it was trivial, but indeed the missing prefix makes it annoying enough to treat differently.
hebasto
commented at 8:53 am on February 14, 2025:
member
iirc one of the issues with install-name-tool was that it was only available version-suffixed on certain distros (even when the main llvm install was not suffixed), making it hard to find.
If it’s not too much trouble, could you recall which distros those were?
fanquake referenced this in commit
109bfe9573
on Feb 14, 2025
fanquake
commented at 1:44 pm on February 14, 2025:
member
If it’s not too much trouble, could you recall which distros those were?
It’s still the case with Ubuntu, i.e 24.04:
0# apt install llvm1# ls /usr/bin/llvm-* | grep objdump2/usr/bin/llvm-objdump
3/usr/bin/llvm-objdump-18
4# ls /usr/bin/llvm-* | grep install-name5/usr/bin/llvm-install-name-tool-18
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2025-02-22 06:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me