Cross Compile QT Wallet for Mac on Debian #17780

issue ghost opened this issue on December 20, 2019
  1. ghost commented at 10:38 AM on December 20, 2019: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. <!-- Describe the issue -->

    I want to build the Mac Wallet (branch: master) on my Debian 9 VM but I get stuck with the dependencies always at the same time. I am running make HOST=x86_64-apple-darwin16 -j2 in the depends folder and that's what I get:

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    In file included from ./boost/thread/detail/config.hpp:11:
    In file included from ./boost/config.hpp:57:
    In file included from ./boost/config/platform/macos.hpp:28:
    ./boost/config/detail/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
    #     include <unistd.h>
                  ^
    1 error generated.
    ...failed clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/future.o...
    clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o
    
        "clang++" "-target" "x86_64-apple-darwin16" "-mmacosx-version-min=10.12" "--sysroot" "/root/bitcoin/depends/SDKs/MacOSX10.11.sdk" "-mlinker-version=253.9" "-stdlib=libc++" -x c++ -fvisibility-inlines-hidden -std=c++11 -fvisibility=hidden     -I/root/bitcoin/depends/x86_64-apple-darwin16/include     -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -Wextra -Wno-long-long -Wno-unused-parameter -Wno-variadic-macros -Wunused-function -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"
    
    In file included from libs/thread/src/pthread/thread.cpp:9:
    In file included from ./boost/thread/detail/config.hpp:11:
    In file included from ./boost/config.hpp:57:
    In file included from ./boost/config/platform/macos.hpp:28:
    ./boost/config/detail/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found
    #     include <unistd.h>
                  ^
    1 error generated.
    ...failed clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
    ...skipped <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a(clean) for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
    ...skipped <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
    ...skipped <p/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-7789d044840/stage/lib>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a...
    ...failed updating 37 targets...
    ...skipped 24 targets...
    ...updated 43 targets...
    funcs.mk:251: recipe for target '/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-7789d044840/./.stamp_built' failed
    make: *** [/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-7789d044840/./.stamp_built] Error 1
    

    (The MacOSX10.11.sdk.tar.gz is located in depends/SDKs.)

    With google I found out that it might be a problem with clang, and while analyzing the make output I found that line: /root/bitcoin/depends/sources/clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz: OK This looks not right for me, but I don't know if the issue is because of that.

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

  2. fanquake commented at 11:53 AM on December 20, 2019: member

    The MacOSX10.11.sdk.tar.gz is located in depends/SDKs.

    Did you untar it? The problem is not with Clang, it’s that depends cannot find the files from the SDK.

  3. ghost commented at 1:00 PM on December 20, 2019: none

    Oh... looks like that was the problem, but now a new problem appeared:

    ...
    In file included from libs/thread/src/pthread/thread.cpp:11:
    In file included from ./boost/thread/thread_only.hpp:17:
    In file included from ./boost/thread/pthread/thread_data.hpp:10:
    In file included from ./boost/thread/exceptions.hpp:22:
    In file included from ./boost/system/system_error.hpp:11:
    In file included from ./boost/system/error_code.hpp:17:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/ostream:138:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/ios:216:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/__locale:18:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:182:
    /root/bitcoin/depends/SDKs/MacOSX10.11.sdk/usr/include/sched.h:1:1: error: unknown type name 'pthread'
    pthread/sched.h
    ^
    /root/bitcoin/depends/SDKs/MacOSX10.11.sdk/usr/include/sched.h:1:8: error: expected unqualified-id
    pthread/sched.h
           ^
    In file included from libs/thread/src/pthread/thread.cpp:11:
    In file included from ./boost/thread/thread_only.hpp:17:
    In file included from ./boost/thread/pthread/thread_data.hpp:10:
    In file included from ./boost/thread/exceptions.hpp:22:
    In file included from ./boost/system/system_error.hpp:11:
    In file included from ./boost/system/error_code.hpp:17:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/ostream:138:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/ios:216:
    In file included from /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/__locale:18:
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:196:5: error: unknown type name 'pthread_mutex_t'
        pthread_mutex_t __m_;
        ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:211:13: error: unknown type name 'pthread_mutex_t'
        typedef pthread_mutex_t* native_handle_type;
                ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:263:5: error: unknown type name 'pthread_t'
        pthread_t          __id_;
        ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:289:5: error: unknown type name 'pthread_t'
        pthread_t __id = pthread_self();
        ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:289:22: error: use of undeclared identifier 'pthread_self'
        pthread_t __id = pthread_self();
                         ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:363:9: error: use of undeclared identifier 'sched_yield'
            sched_yield();
            ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:372:9: error: use of undeclared identifier 'sched_yield'
            sched_yield();
            ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:397:13: error: use of undeclared identifier 'sched_yield'
                sched_yield();
                ^
    /root/bitcoin/depends/x86_64-apple-darwin16/native/bin/../include/c++/v1/mutex:413:13: error: use of undeclared identifier 'sched_yield'
                sched_yield();
                ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    ...failed clang-darwin.compile.c++ bin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
    ...skipped <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a(clean) for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
    ...skipped <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
    ...skipped <p/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-aba19446cd8/stage/lib>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/clang-darwin-3.7/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a...
    ...failed updating 33 targets...
    ...skipped 18 targets...
    ...updated 53 targets...
    funcs.mk:251: recipe for target '/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-aba19446cd8/./.stamp_built' failed
    make: *** [/root/bitcoin/depends/work/build/x86_64-apple-darwin16/boost/1_70_0-aba19446cd8/./.stamp_built] Error 1
    
    
  4. ghost commented at 11:09 PM on December 22, 2019: none

    Does anyone have an idea? I found nothing on google... as still has smth to do with boost, is there a possibility to install it otherwise?

  5. fanquake commented at 11:13 PM on December 22, 2019: member

    Try running:

    make clean
    

    then building again.

  6. ghost commented at 11:24 PM on December 22, 2019: none

    Try running:

    make clean
    

    then building again.

    Nope.... same result...

    /root/bitcoin/depends/SDKs/MacOSX10.11.sdk/usr/include/pthread.h:1:1: error: unknown type name 'pthread'
    pthread/pthread.h
    ^
    /root/bitcoin/depends/SDKs/MacOSX10.11.sdk/usr/include/pthread.h:1:8: error: expected unqualified-id
    pthread/pthread.h
    
  7. ghost commented at 3:36 PM on December 24, 2019: none

    I still have no solution for that, but it worked with the Mac of a friend. Thanks anyways for the help

  8. unknown closed this on Dec 24, 2019

  9. DrahtBot locked this on Dec 16, 2021
Contributors

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: 2026-04-17 15:14 UTC

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