Guix build script incorrectly reporting there is no Mac SDK #29449

issue gdiscord openend this issue on February 19, 2024
  1. gdiscord commented at 11:40 am on February 19, 2024: none

    Trying Guix build for the first time and hitting this seemingly unexplainable issue

    macOS SDK does not exist at ‘/root/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers’, please place the extracted, untarred SDK there to perform darwin builds, or define SDK_PATH environment variable. Exiting…

    I’ve tried placing it in the depends folder, and the error is the same.

    Makes me think I’m probably missing something that is undocumented

    Screenshot 2024-02-19 at 11 35 17

  2. fanquake commented at 11:44 am on February 19, 2024: member
    Looks like you’ve got the SDK in ~/BITCOIN/SDKs/, but you’re telling the build script it’s at ~/SDKs/ ?
  3. maflcko added the label Questions and Help on Feb 19, 2024
  4. gdiscord commented at 11:53 am on February 19, 2024: none

    The SDK is in ~/BITCOIN/SDKs/ I’ve tried various kinds of combinations also.

    Screenshot 2024-02-19 at 11 52 31

  5. maflcko commented at 12:02 pm on February 19, 2024: member
    Please read the error message carefully. Not sure what your question is.
  6. maflcko closed this on Feb 19, 2024

  7. gdiscord commented at 12:13 pm on February 19, 2024: none

    Should have used the appropriate screenshot.

    The issue is indeed puzzling, and as said I’ve tried various kinds of combinations with the same result. Screenshot 2024-02-19 at 12 10 23

  8. maflcko commented at 12:17 pm on February 19, 2024: member
    “Please place the extracted, untarred SDK there”
  9. gdiscord commented at 12:32 pm on February 19, 2024: none

    My apologies, but this are the steps I followed from the ReadMe page: https://github.com/bitcoin/bitcoin/blob/master/contrib/macdeploy/README.md#sdk-extraction

    1. apt install cpio
    2. git clone https://github.com/bitcoin-core/apple-sdk-tools.git
    3. python3 apple-sdk-tools/extract_xcode.py -f Xcode_15.xip | cpio -d -I
    4. ./contrib/macdeploy/gen-sdk ‘/path/to/Xcode.app’

    The resulting file from step 4 is what I’ve placed in the SDKs folder.

    Is there another step after 4 to get untarred SDK?

    I had already tried an extra step of extracting the resulting file, but there was no change. Just did it again now and still same error. Screenshot 2024-02-19 at 12 30 07

  10. maflcko commented at 12:42 pm on February 19, 2024: member
  11. gdiscord commented at 12:49 pm on February 19, 2024: none

    Nice - working now. thanks.

    Perhaps worth updating the ReadMe to include the extra step?

    1. tar xfz Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar.gz
  12. maflcko commented at 1:15 pm on February 19, 2024: member
    Sure, but I think this should be mentioned in the doc that describes how to use the tar.gz, not in the doc on how to generate the tar.gz, or maybe just put the command in the error message?
  13. gdiscord commented at 1:43 pm on February 19, 2024: none
    It can be in both the doc and error message if possible?
  14. maflcko commented at 1:44 pm on February 19, 2024: member
    Sure, pull requests welcome :)
  15. gdiscord commented at 3:32 pm on February 19, 2024: none
    sure, will oblige.
  16. gdiscord commented at 1:39 pm on February 22, 2024: none

    Been trying to work out where this error is coming from. Openssl is supposed to have been completely removed, right?

    Pointers on how to resolve will be appreciated.

    checking whether the linker accepts -Wl,–exclude-libs,ALL… yes checking for openssl/crypto.h… no configure: error: libcrypto headers missing

  17. fanquake commented at 1:52 pm on February 22, 2024: member

    Openssl is supposed to have been completely removed

    It has been completely removed. For many years. What source code are you building?

  18. gdiscord commented at 2:05 pm on February 22, 2024: none

    Building main branch.

    Perhaps I’ve introduced a code during my experiments that have triggered it. Have now gone through configure.ac as well as src/Makefile.am, and I don’t see any reference to either openssl or libcrypto.

    But interestingly openssl appears in contrib/guix/manifest.com, and there is also a patch under contrib/guix/patches that seems to suggest a manual control of openssl integration through an environment variable.

    This is the note within the content of the patch:

    +paths = ‘@GUIX_OSCRYPTO_USE_OPENSSL@’.split(’,’) +assert len(paths) == 2, ‘Value for OSCRYPTO_USE_OPENSSL env var must be two paths separated by a comma’ +use_openssl(*paths)

    Do I need to pass this variable to the build command? And if what should it be contrasted like?

  19. fanquake commented at 2:10 pm on February 22, 2024: member

    OpenSSL is still a subdependency of packages used in Guix. It’s hard to debug anything here without more output. i.e the output you’ve posted above looks like configure output, which cannot find libcrypto. Which part of your Guix build is that coming from? Can you post you’re full looks.

    Do I need to pass this variable to the build command?

    No.

  20. gdiscord commented at 2:36 pm on February 22, 2024: none

    The part it comes from is indeed at the configure stage. Depends build complete successfully, then ./autogen.sh excuted, after which ./configure is called, then the error occurs:

    This is the command I ran: env HOSTS=“x86_64-linux-gnu x86_64-w64-mingw32” SOURCES_PATH="$HOME/depends-SOURCES_PATH" BASE_CACHE="$HOME/depends-BASE_CACHE" SDK_PATH="$HOME/SDKs" FORCE_DIRTY_WORKTREE=1 V=1 ./contrib/guix/guix-build

    here’s the last several lines leading to the error

    checking whether to build wallet with support for sqlite… yes checking whether Userspace, Statically Defined Tracing tracepoints are supported… yes checking for miniupnpc/miniupnpc.h… yes checking for upnpDiscover in -lminiupnpc… yes checking for miniupnpc/upnpcommands.h… yes checking for upnpDiscover in -lminiupnpc… (cached) yes checking for miniupnpc/upnperrors.h… yes checking for upnpDiscover in -lminiupnpc… (cached) yes checking whether miniUPnPc API version is supported… yes checking for natpmp.h… yes checking for initnatpmp in -lnatpmp… yes checking for boostlib >= 1.64.0 (106400) includes in “/bitcoin/depends/x86_64-linux-gnu/include”… yes checking for boostlib >= 1.64.0 (106400) lib path in “/bitcoin/depends/x86_64-linux-gnu/lib/x86_64-linux-gnu”… no checking for boostlib >= 1.64.0 (106400) lib path in “/bitcoin/depends/x86_64-linux-gnu/lib64”… no checking for boostlib >= 1.64.0 (106400) lib path in “/bitcoin/depends/x86_64-linux-gnu/libx32”… no checking for boostlib >= 1.64.0 (106400) lib path in “/bitcoin/depends/x86_64-linux-gnu/lib”… yes checking for Boost headers >= 1.64.0 (106400)… yes checking whether C++ preprocessor accepts -DBOOST_NO_CXX98_FUNCTION_BASE… yes checking whether Boost.Process can be used… no checking whether C++ compiler accepts -fvisibility=hidden… yes checking whether the linker accepts -Wl,–exclude-libs,ALL… yes checking for openssl/crypto.h… no configure: error: libcrypto headers missing

  21. fanquake commented at 2:40 pm on February 22, 2024: member

    Building main branch.

    checking for openssl/crypto.h… no configure: error: libcrypto headers missing

    This is impossible given the output you are showing here. Where did you get the source from. What is the commit hash? etc.

  22. gdiscord commented at 2:42 pm on February 22, 2024: none

    fyi: I’ve also tried doing a gitian build, and though the build was not successful( expected that because I have not taken the time to properly configure gitian descriptors) , this particular error did not occur. Will revisit gitian build at some point.

    Now my main goal is to achieve a successful guix build.

  23. gdiscord commented at 2:53 pm on February 22, 2024: none

    Pulled the main branch, but I’ve experimented a lot with the code.

    I can do a clean bitcoin pull and build it untouched to see what happens.

  24. gdiscord commented at 7:14 pm on February 22, 2024: none

    I can confirm that a clean pull builds successfully(took a good while, but I remained patient). So the issue I’m facing has to do with the modifications I’ve made during my experiments.

    Digging a little further I’ve noted the files in the build-aux/m4 directory under the top directory are getting called, so it must be one of them doing the checks.

    Screenshot 2024-02-22 at 19 14 21

    Then there is another one under src/secp256k1/build-aux/m4/bitcoin_secp.m4.

    What I find a little puzzling is that there is no reference to openssl in any of these files.

    In any case, will the build system break if I were to get rid of those files, or are they absolutely required?

  25. fanquake commented at 7:18 pm on February 22, 2024: member
    Thanks for clarifying that building our source (as-is) works fine. Outside of that, this isn’t a support forum for developing altcoins/testing “modifications”. If you have a specific issue with our (unmodified) source, feel free to open a new issue.
  26. gdiscord commented at 7:20 pm on February 22, 2024: none
    specifically this seems to be the one responsible for the particular error: build-aux/m4/bitcoin_subdir_to_include.m4
  27. gdiscord commented at 8:43 pm on February 24, 2024: none

    Thanks for clarifying that building our source (as-is) works fine. Outside of that, this isn’t a support forum for developing altcoins/testing “modifications”. If you have a specific issue with our (unmodified) source, feel free to open a new issue.

    Totally understand.

    I’m only tinkering in order to learn how things work.

    Can I add a package manually and still have it picked up by the guix build system, either by passing include=/usr/include and lib=/usr/lib to the ./configure command, or through a other means apart from integrating openssl.mk?

    I’ve already experimented but without success, and would like to know if it just me not correctly understanding how it works , or rather that it is not actually possible.

    Would be grateful if you can point me to a resource that I can consult to learn.

  28. gdiscord commented at 2:24 pm on February 25, 2024: none

    Finally cracked it, so all good on my end now. Satisfying to know my theoretical experiment works in practice.

    Thanks guys for the earlier pointers.

  29. gdiscord commented at 4:26 pm on February 28, 2024: none

    when I use guix build to create windows binaries this error occurs right at the end:

    mv: cannot stat ‘bitcoin-d5e55808e576/bin/*.dll’: No such file or directory

    Do I need to do something else besides the instructions in the ReadMe to get the process to finish 100% sucessfully?

    I’m using Debian 12 as the build machine.

    and this is the command I used:

    env HOSTS=“x86_64-w64-mingw32” SOURCES_PATH="$HOME/depends-SOURCES_PATH" BASE_CACHE="$HOME/depends-BASE_CACHE" SDK_PATH="$HOME/SDKs" FORCE_DIRTY_WORKTREE=1 ./contrib/guix/guix-build

  30. hebasto commented at 5:36 pm on February 28, 2024: member

    when I use guix build to create windows binaries this error occurs right at the end:

    mv: cannot stat ‘bitcoin-d5e55808e576/bin/*.dll’: No such file or directory

    Our git tree has no d5e55808e576 commit.

    Again:

    Thanks for clarifying that building our source (as-is) works fine. Outside of that, this isn’t a support forum for developing altcoins/testing “modifications”. If you have a specific issue with our (unmodified) source, feel free to open a new issue.

  31. gdiscord commented at 9:06 pm on February 28, 2024: none
    was hoping to get some pointers on what might be causing it; trying to understand how the system has been put together.
  32. gdiscord commented at 7:07 pm on March 1, 2024: none
    What is the hash of v27.0 (per announcement)?

github-metadata-mirror

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: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me