yenom/BitcoinKit

Pod Install Fails

MagicFlow29 opened this issue · 15 comments

Current behavior

Pod Install fails with the following:

`++ xcrun -sdk iphoneos --show-sdk-path

  • ./configure --host=arm-apple-darwin CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 'CFLAGS=-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -fembed-bitcode -mios-version-min=8.0' CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 'CXXFLAGS=-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -fembed-bitcode -mios-version-min=8.0' --prefix=/var/folders/t7/sx80rz396g98rcy3q3s4z6cw0000gn/T/tmp.yj70e617/.build/iphonesimulator
    configure: WARNING: using cross tools not prefixed with host triplet
    ./configure: line 12069: PKG_PROG_PKG_CONFIG: command not found
  • make install
    libtool: warning: remember to run 'libtool --finish /var/folders/t7/sx80rz396g98rcy3q3s4z6cw0000gn/T/tmp.yj70e617/.build/iphoneos/lib'
  • cd -
  • mkdir -p ./../Libraries/secp256k1/lib
  • xcrun lipo -create /var/folders/t7/sx80rz396g98rcy3q3s4z6cw0000gn/T/tmp.yj70e617/.build/iphoneos/lib/libsecp256k1.a /var/folders/t7/sx80rz396g98rcy3q3s4z6cw0000gn/T/tmp.yj70e617/.build/iphonesimulator/lib/libsecp256k1.a -o ./../Libraries/secp256k1/lib/libsecp256k1.a
    fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /var/folders/t7/sx80rz396g98rcy3q3s4z6cw0000gn/T/tmp.yj70e617/.build/iphoneos/lib/libsecp256k1.a and /var/folders/t7/sx80rz396g98rcy3q3s4z6cw0000gn/T/tmp.yj70e617/.build/iphonesimulator/lib/libsecp256k1.a have the same architectures (i386) and can't be in the same fat output file`

Expected behavior

Steps to reproduce

  1. Follow instructions - run pod. (After installing l$ brew install autoconf automake and libtools

Environment

  • BitcoinKit: 1.1.3
  • Xcode Version: 12. beta 5
  • Swift Version: 5.0

Facing same issue 😑

hj, pro please check email?

Anyone found a solution?

Any news about this issue? I am stuck on the same problem, with Big Sur. Xcode 11 or 12 doesn't change anything

I made a lot of test:
if you try to add
(cd src && make distclean > /dev/null)
(cd src && ./autogen.sh)
after line 22 in setup/build_secp256k1.sh
it seems works

I made a lot of test:
if you try to add
(cd src && make distclean > /dev/null)
(cd src && ./autogen.sh)
after line 22 in setup/build_secp256k1.sh
it seems works

So according to your suggestion lines 21-25 would become


(cd src && ./autogen.sh)
(cd src && ./configure --host=x86_64-apple-darwin CC=`xcrun -find clang` CFLAGS="-O3 -arch i386 -arch x86_64 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path` -fembed-bitcode-marker -mios-simulator-version-min=8.0" CXX=`xcrun -find clang++` CXXFLAGS="-O3 -arch i386 -arch x86_64 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path` -fembed-bitcode-marker -mios-simulator-version-min=8.0" --prefix="$TARGETDIR_IPHONEOS" && make install)
(cd src && make distclean > /dev/null)
(cd src && ./autogen.sh)
(cd src && ./configure --host=arm-apple-darwin CC=`xcrun -find clang` CFLAGS="-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot `xcrun -sdk iphoneos --show-sdk-path` -fembed-bitcode -mios-version-min=8.0" CXX=`xcrun -find clang++` CXXFLAGS="-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot `xcrun -sdk iphoneos --show-sdk-path` -fembed-bitcode -mios-version-min=8.0" --prefix="$TARGETDIR_SIMULATOR" && make install)

Am I correct?

Yes,

I made a lot of test:
if you try to add
(cd src && make distclean > /dev/null)
(cd src && ./autogen.sh)
after line 22 in setup/build_secp256k1.sh
it seems works

So according to your suggestion lines 21-25 would become


(cd src && ./autogen.sh)
(cd src && ./configure --host=x86_64-apple-darwin CC=`xcrun -find clang` CFLAGS="-O3 -arch i386 -arch x86_64 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path` -fembed-bitcode-marker -mios-simulator-version-min=8.0" CXX=`xcrun -find clang++` CXXFLAGS="-O3 -arch i386 -arch x86_64 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path` -fembed-bitcode-marker -mios-simulator-version-min=8.0" --prefix="$TARGETDIR_IPHONEOS" && make install)
(cd src && make distclean > /dev/null)
(cd src && ./autogen.sh)
(cd src && ./configure --host=arm-apple-darwin CC=`xcrun -find clang` CFLAGS="-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot `xcrun -sdk iphoneos --show-sdk-path` -fembed-bitcode -mios-version-min=8.0" CXX=`xcrun -find clang++` CXXFLAGS="-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot `xcrun -sdk iphoneos --show-sdk-path` -fembed-bitcode -mios-version-min=8.0" --prefix="$TARGETDIR_SIMULATOR" && make install)

Am I correct?

Yes

I forked this project on my account and tried you suggestion but it did not work unfortunately. It actually works for simulator but not on my physical device

I forked this project on my account and tried you suggestion but it did not work unfortunately. It actually works for simulator but not on my physical device

the setup/build_secp256k1.sh end without error ?
Have you try to remove from cocoapods cache ? ( if you use cocoapods )

Facing same issue 😑 in a new project, in an old one works fine

(cd src && ./autogen.sh)

where need to add this?

pod 'BitcoinCore.swift', :path => './BTCSDK/'
pod 'BitcoinKit.swift', :path => './BTCSDK/'
pod 'BitcoinCashKit.swift', :path => './BTCSDK/'
pod 'Hodler.swift', :path => './BTCSDK/'
pod 'HsToolKit.swift', git: 'https://github.com/horizontalsystems/hs-tool-kit-ios'

It seems OK. But I Cann't send BTC to any wallet. Can you help me?

Same issue here.

Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '14.7'

target 'btctransaction' do
  use_frameworks!
  pod 'BitcoinKit', '~> 1.1.0'


end

Error:
xctoolchain/usr/bin/lipo: /var/folders/gp/zf5ylzvn7d326cwb67646j6c0000gn/T/tmp.8tza5xtA/.build/iphoneos/lib/libsecp256k1.a and /var/folders/gp/zf5ylzvn7d326cwb67646j6c0000gn/T/tmp.8tza5xtA/.build/iphonesimulator/lib/libsecp256k1.a have the same architectures (i386) and can't be in the same fat output file

...have the same architectures (i386) and can't be in the same fat output file

Without this package works everything fine.

Apple M1
MacOS: 15.2
Big Sur

Are there any solutions?