apotocki / boost-iosx

Builds Boost C++ libraries and packages them as XCFrameworks for iOS (simulator and device), visionOS (simulator and device), macOS, and Mac Catalyst (Intel & Apple Silicon M1).
Boost Software License 1.0
60 stars 17 forks source link

pod install fails #6

Closed peetonn closed 3 years ago

peetonn commented 3 years ago

Running pod install fails on macOS 11.4 with many errors similar to:

...failed darwin.compile.asm bin.v2/libs/context/build/darwin-ios/release/abi-aapcs/architecture-arm/instruction-set-arm64/link-static/target-os-iphone/threading-multi/visibility-hidden/asm/jump_arm64_aapcs_macho_gas.o...
darwin.compile.asm bin.v2/libs/context/build/darwin-ios/release/abi-aapcs/architecture-arm/instruction-set-arm64/link-static/target-os-iphone/threading-multi/visibility-hidden/asm/ontop_arm64_aapcs_macho_gas.o
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:58:21: error: unexpected token in argument list
    ; prepare stack for GP + FPU
                    ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:59:17: error: unknown token in expression
    sub sp, sp, #0xb0
                ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:61:7: error: invalid instruction mnemonic 'save'
    ; save d8 - d15
      ^~~~
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:62:17: error: brackets expression not supported on this target
    stp d8, d9, [sp, #0x00]
                ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:63:19: error: brackets expression not supported on this target
    stp d10, d11, [sp, #0x10]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:64:19: error: brackets expression not supported on this target
    stp d12, d13, [sp, #0x20]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:65:19: error: brackets expression not supported on this target
    stp d14, d15, [sp, #0x30]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:67:7: error: invalid instruction mnemonic 'save'
    ; save x19-x30
      ^~~~
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:68:19: error: brackets expression not supported on this target
    stp x19, x20, [sp, #0x40]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:69:19: error: brackets expression not supported on this target
    stp x21, x22, [sp, #0x50]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:70:19: error: brackets expression not supported on this target
    stp x23, x24, [sp, #0x60]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:71:19: error: brackets expression not supported on this target
    stp x25, x26, [sp, #0x70]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:72:19: error: brackets expression not supported on this target
    stp x27, x28, [sp, #0x80]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:73:19: error: brackets expression not supported on this target
    stp x29, x30, [sp, #0x90]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:75:15: error: unexpected token in argument list
    ; save LR as PC
              ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:76:14: error: brackets expression not supported on this target
    str x30, [sp, #0xa0]
             ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:78:18: error: expected register here
    ; store RSP (pointing to context-data) in X5
                 ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:79:5: error: unknown use of instruction mnemonic without a size suffix
    mov x4, sp
    ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:81:20: error: expected register here
    ; restore RSP (pointing to context-data) from X1
                   ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:82:5: error: unknown use of instruction mnemonic without a size suffix
    mov sp, x0
    ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:84:7: error: invalid instruction mnemonic 'load'
    ; load d8 - d15
      ^~~~
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:85:17: error: brackets expression not supported on this target
    ldp d8, d9, [sp, #0x00]
                ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:86:19: error: brackets expression not supported on this target
    ldp d10, d11, [sp, #0x10]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:87:19: error: brackets expression not supported on this target
    ldp d12, d13, [sp, #0x20]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:88:19: error: brackets expression not supported on this target
    ldp d14, d15, [sp, #0x30]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:90:7: error: invalid instruction mnemonic 'load'
    ; load x19-x30
      ^~~~
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:91:19: error: brackets expression not supported on this target
    ldp x19, x20, [sp, #0x40]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:92:19: error: brackets expression not supported on this target
    ldp x21, x22, [sp, #0x50]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:93:19: error: brackets expression not supported on this target
    ldp x23, x24, [sp, #0x60]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:94:19: error: brackets expression not supported on this target
    ldp x25, x26, [sp, #0x70]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:95:19: error: brackets expression not supported on this target
    ldp x27, x28, [sp, #0x80]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:96:19: error: brackets expression not supported on this target
    ldp x29, x30, [sp, #0x90]
                  ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:98:25: error: unexpected token in argument list
    ; return transfer_t from jump
                        ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:99:23: error: unexpected token in argument list
    ; pass transfer_t as first arg in context function
                      ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:100:10: error: unknown token in expression
    ; X0 == FCTX, X1 == DATA
         ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:101:5: error: unknown use of instruction mnemonic without a size suffix
    mov x0, x4
    ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:103:7: error: invalid instruction mnemonic 'skip'
    ; skip pc
      ^~~~
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:104:21: error: unexpected token in argument list
    ; restore stack from GP + FPU
                    ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:105:17: error: unknown token in expression
    add sp, sp, #0xb0
                ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:107:15: error: unexpected token in argument list
    ; jump to ontop-function
              ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:108:5: error: unknown use of instruction mnemonic without a size suffix
    ret x2
    ^
libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S:109:1: error: assembler local symbol 'LR' not defined

^

    "g++" -x assembler-with-cpp -pthread -O3 -Wall -fvisibility=hidden -gdwarf-2 -fexceptions -Wno-inline  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DBOOST_SPIRIT_THREADSAFE -DBOOST_TEST_NO_MAIN -DNDEBUG -D_LITTLE_ENDIAN -I"." -c -o "bin.v2/libs/context/build/darwin-ios/release/abi-aapcs/architecture-arm/instruction-set-arm64/link-static/target-os-iphone/threading-multi/visibility-hidden/asm/ontop_arm64_aapcs_macho_gas.o" "libs/context/src/asm/ontop_arm64_aapcs_macho_gas.S"

...failed darwin.compile.asm bin.v2/libs/context/build/darwin-ios/release/abi-aapcs/architecture-arm/instruction-set-arm64/link-static/target-os-iphone/threading-multi/visibility-hidden/asm/ontop_arm64_aapcs_macho_gas.o...
darwin.compile.c++ bin.v2/libs/container/build/darwin-ios/release/architecture-arm/instruction-set-arm64/link-static/target-os-iphone/threading-multi/visibility-hidden/synchronized_pool_resource.o
boost-install.generate-cmake-config- bin.v2/libs/context/build/stage/boost_context-config.cmake
apotocki commented 3 years ago

Mac architecture? Xcode version? Complete log? (at least from the start of "pod install" until the first errors)

peetonn commented 3 years ago

x86_64; Xcode; 12.5.1;

Analyzing dependencies
Downloading dependencies
Installing boost-iosx (1.76.0.2)
[!] /bin/bash -c 
set -e
sh scripts/build.sh

extracting boost_1_76_0.tar.bz2 ...
~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f/boost ~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f
Building B2 engine..

###
###
### Using 'clang' toolset.
###
###

Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

###
###

> clang++ -x c++ -std=c++11 -O3 -s -DNDEBUG builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd.cpp debug.cpp debugger.cpp execcmd.cpp execnt.cpp execunix.cpp filesys.cpp filent.cpp fileunix.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam_strings.cpp jam.cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp object.cpp option.cpp output.cpp parse.cpp pathnt.cpp pathsys.cpp pathunix.cpp regexp.cpp rules.cpp scan.cpp search.cpp startup.cpp subst.cpp sysinfo.cpp timestamp.cpp variable.cpp w32_getreg.cpp modules/order.cpp modules/path.cpp modules/property-set.cpp modules/regex.cpp modules/sequence.cpp modules/set.cpp -o b2
> cp b2 bjam
tools/build/src/engine/b2
Detecting Python version... 3.7
Detecting Python root... /Users/peetonn/miniconda3
Unicode/ICU support for Boost.Regex?... /Users/peetonn/miniconda3
Generating B2 configuration in project-config.jam for clang...

Bootstrapping is done. To build, run:

    ./b2

To generate header files, run:

    ./b2 headers

The configuration generated uses clang to build by default. If that is
unintended either use the --with-toolset option or adjust configuration, by
editing 'project-config.jam'.

Further information:

   - Command line help:
     ./b2 --help

   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html

   - B2 documentation:
     http://www.boost.org/build/

~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f
~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f/scripts ~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-ICUdep`: (``)

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: all_pods_versions_b_4_6.txt exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/b/4/6/icu4c-iosx/69.1.2/icu4c-iosx.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/b/4/6/icu4c-iosx/69.1.2/icu4c-iosx.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/b/4/6/icu4c-iosx/69.1.1/icu4c-iosx.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/b/4/6/icu4c-iosx/68.2.1/icu4c-iosx.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/b/4/6/icu4c-iosx/68/icu4c-iosx.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/b/4/6/icu4c-iosx/62.2.1/icu4c-iosx.podspec.json exists! Returning local because checking is only perfomed in repo update

Comparing resolved specification to the sandbox manifest
  A icu4c-iosx

Downloading dependencies

-> Installing icu4c-iosx (69.1.2)
  > Copying icu4c-iosx from `/Users/peetonn/Library/Caches/CocoaPods/Pods/Release/icu4c-iosx/69.1.2-b3465` to `Pods/icu4c-iosx`
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Installing files into Pods project
    - Adding source files
    - Adding frameworks
    - Adding libraries
    - Adding resources
    - Linking headers
  - Installing Pod Targets
    - Installing target `icu4c-iosx` macOS 11.0
  - Installing Aggregate Targets
    - Installing target `Pods-ICUdep` macOS 12.0
      - Generating Info.plist file at `Pods/Target Support Files/Pods-ICUdep/Pods-ICUdep-Info.plist`
      - Generating module map file at `Pods/Target Support Files/Pods-ICUdep/Pods-ICUdep.modulemap`
      - Generating umbrella header at `Pods/Target Support Files/Pods-ICUdep/Pods-ICUdep-umbrella.h`
      - Generating dummy source at `Pods/Target Support Files/Pods-ICUdep/Pods-ICUdep-dummy.m`
  - Integrating targets

Integrating target `icu4c-iosx`
    Adding Build Phase '[CP] Copy XCFrameworks' to project.
  - Generating deterministic UUIDs
  - Stabilizing target UUIDs
  - Running post install hooks
  - Writing Xcode project file to `Pods/Pods.xcodeproj`
  Cleaning up sandbox directory

Integrating client project

[!] Please close any current Xcode sessions and use `ICUdep.xcworkspace` for this project from now on.

Integrating target `Pods-ICUdep` (`ICUdep.xcodeproj` project)
  Adding Build Phase '[CP] Check Pods Manifest.lock' to project.
  - Running post integrate hooks
  - Writing Lockfile in `Podfile.lock`
  - Writing Manifest in `Pods/Manifest.lock`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update

-> Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f
~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f/boost ~/Library/Caches/CocoaPods/Pods/Release/boost-iosx/1.76.0.2-9cf6f
patching boost...
patching file tools/build/src/tools/gcc.jam
patching file tools/build/src/tools/features/instruction-set-feature.jam
Performing configuration checks

    - default address-model    : 64-bit [1]
    - default architecture     : x86 [1]

Building the Boost C++ Libraries.

    - compiler supports SSE2   : yes [2]
    - compiler supports SSE4.1 : yes [2]
    - C++11 mutex              : yes [2]
    - lockfree boost::atomic_flag : yes [2]
    - has stat::st_mtim        : no [2]
    - has stat::st_mtimensec   : no [2]
    - has stat::st_mtimespec   : yes [2]
    - has stat::st_birthtim    : no [2]
    - has stat::st_birthtimensec : no [2]
    - has stat::st_birthtimespec : yes [2]
    - has statx                : no [2]
    - has statx syscall        : no [2]
    - cxx11_auto_declarations  : yes [2]
    - cxx11_constexpr          : yes [2]
    - cxx11_defaulted_functions : yes [2]
    - cxx11_final              : yes [2]
    - cxx11_hdr_mutex          : yes [2]
    - cxx11_hdr_tuple          : yes [2]
    - cxx11_lambdas            : yes [2]
    - cxx11_noexcept           : yes [2]
    - cxx11_nullptr            : yes [2]
    - cxx11_rvalue_references  : yes [2]
    - cxx11_template_aliases   : yes [2]
    - cxx11_thread_local       : yes [2]
    - cxx11_variadic_templates : yes [2]
    - cxx11_auto_declarations  : yes [3]
    - cxx11_constexpr          : yes [3]
    - cxx11_defaulted_functions : yes [3]
    - cxx11_final              : yes [3]
    - cxx11_hdr_mutex          : yes [3]
    - cxx11_hdr_tuple          : yes [3]
    - cxx11_lambdas            : yes [3]
    - cxx11_noexcept           : yes [3]
    - cxx11_nullptr            : yes [3]
    - cxx11_rvalue_references  : yes [3]
    - cxx11_template_aliases   : yes [3]
    - cxx11_thread_local       : yes [3]
    - cxx11_variadic_templates : yes [3]
    - has_icu builds           : yes [2]
    - zlib                     : yes [4]
    - bzip2                    : yes [4]
    - lzma                     : yes [4]
    - zstd                     : yes [4]
    - has_lzma_cputhreads builds : yes [2]
    - cxx11_decltype           : yes [2]
    - cxx11_basic_alignas      : yes [2]
    - iconv (libc)             : no [2]
    - iconv (separate)         : yes [2]
    - icu                      : yes [2]
    - native atomic int32 supported : yes [2]
    - native syslog supported  : yes [2]
    - pthread supports robust mutexes : no [2]
    - compiler supports SSSE3  : yes [2]
    - compiler supports AVX2   : no [2]
    - gcc visibility           : yes [2]
    - sfinae_expr              : yes [2]
    - cxx11_unified_initialization_syntax : yes [2]
    - cxx11_hdr_initializer_list : yes [2]
    - cxx11_hdr_chrono         : yes [2]
    - cxx11_numeric_limits     : yes [2]
    - cxx11_hdr_array          : yes [2]
    - cxx11_hdr_atomic         : yes [2]
    - cxx11_hdr_type_traits    : yes [2]
    - cxx11_allocator          : yes [2]
    - cxx11_explicit_conversion_operators : yes [2]
    - long double support      : yes [2]
    - cxx11_static_assert      : yes [2]
    - std::fstream is moveable and swappable : yes [2]
    - Has Large File Support   : yes [2]
    - libbacktrace builds      : no [2]
    - libbacktrace builds      : no [3]
    - addr2line builds         : yes [2]
    - WinDbg builds            : no [2]
    - WinDbg builds            : no [3]
    - WinDbgCached builds      : no [2]
    - WinDbgCached builds      : no [3]
    - BOOST_COMP_GNUC >= 4.3.0 : no [2]

[1] darwin-12.0.5
[2] darwin-12.0.5/release/link-static/python-3.7/threadapi-pthread/threading-multi/visibility-hidden
[3] darwin-12.0.5/release/build-no/link-static/python-3.7/threadapi-pthread/threading-multi/visibility-hidden
[4] link-static

Component configuration:

    - atomic                   : building
    - chrono                   : building
    - container                : building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : not building
    - headers                  : not building
    - iostreams                : building
    - json                     : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : not building
    - nowide                   : building
    - program_options          : building
    - python                   : not building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - stacktrace               : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - type_erasure             : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...patience...
...found 14525 targets...
...updating 1015 targets...
apotocki commented 3 years ago

@peetonn looks like you have your own user-config.jam file in your home directory. In that case, the config generated by the build script doesn't work (due to less priority). Just find and remove it.