Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod Install Fails #255

Open
MagicFlow29 opened this issue Aug 22, 2020 · 15 comments
Open

Pod Install Fails #255

MagicFlow29 opened this issue Aug 22, 2020 · 15 comments

Comments

@MagicFlow29
Copy link

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
@iampawan
Copy link

Facing same issue 😑

@tranhoangthanh
Copy link

hj, pro please check email?

@iampawan
Copy link

Anyone found a solution?

@tranhoangthanh
Copy link

tranhoangthanh commented Aug 29, 2020 via email

@MagicFlow29 MagicFlow29 changed the title Pos Install Fails Pod Install Fails Aug 31, 2020
@nabbestemmia
Copy link

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

@ivanlunardi
Copy link

ivanlunardi commented Sep 23, 2020

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

@nabbestemmia
Copy link

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?

@ivanlunardi
Copy link

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

@nabbestemmia
Copy link

nabbestemmia commented Sep 30, 2020

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

@ivanlunardi
Copy link

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 )

@lpardo-atix
Copy link

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

sparklyhiking pushed a commit to sparklyhiking/BitcoinKit that referenced this issue Jan 13, 2021
@shuvayansaha
Copy link

(cd src && ./autogen.sh)

where need to add this?

@CYC666
Copy link

CYC666 commented Mar 4, 2022

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?

@SurpriseMF3000
Copy link

SurpriseMF3000 commented Mar 8, 2022

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?

@OvergrowthZhang
Copy link

face same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants