In commit "depends: build libmultiprocess with position independant code" (c3a962be10a98192a93518b0222c21fc7f115404)
I don't think I really understand what's going on here, but this seems like a reasonable change given that --with-pic seems to be used on so many other depends builds [^1]. I guess it is a little unclear why in the other depends builds, the --with-pic option seems to be selectively applied for individual platforms like linux, freebsd, netbsd, openbsd (and never darwin), while this PIC option apples to all platforms. But maybe always setting the option for cmake is fine.
[^1]: I asked chatgpt to explain the link error https://chat.openai.com/share/6d5445a7-14ac-493b-a41a-d2b23899caa6 but didn't have enough details about the build to be able to narrow down specifically what is happening.
I guess I have 3 questions:
- Is this workaround still needed if you add
--disable-shared to the capnp build for this platform like we are already doing the for the android platform? Maybe we should just be building capnp with --disable-shared unconditionally?
https://github.com/bitcoin/bitcoin/blob/d752349029ec7a76f1fd440db2ec2e458d0f3c99/depends/packages/capnp.mk#L14
Opposite question: is the android --disable-shared workaround needed anymore if -DCMAKE_POSITION_INDEPENDENT_CODE=ON is used here? Maybe we could partially revert #25322 after this?
Is this workaround still needed with #28856? That PR seems to drop the android workaround, so maybe switching both of these libraries to cmake would just fix the problem automatically.