Coder Social home page Coder Social logo

Building Wallet example (from workspace) - throws <unknown>:0: error: could not build Objective-C module 'crypto' - 'openssl/e_os2.h' file not found about bitcoinkit HOT 12 CLOSED

yenom avatar yenom commented on August 30, 2024
Building Wallet example (from workspace) - throws :0: error: could not build Objective-C module 'crypto' - 'openssl/e_os2.h' file not found

from bitcoinkit.

Comments (12)

johndpope avatar johndpope commented on August 30, 2024

think this is a side effect of the path not setup correctly on #3

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

/Users/johndpope/Documents/cryptoWorkspace/BitcoinKit/Libraries/crypto/include/openssl/bn.h:129:11: error: 'openssl/e_os2.h' file not found

include <openssl/e_os2.h>

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

believe this is related to
carthage update --platform iOS --no-use-binaries

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

going to try brew upgrade

from bitcoinkit.

kishikawakatsumi avatar kishikawakatsumi commented on August 30, 2024

@johndpope Can you make sure you’re using V0.1.1 or master? Homebrew is unlikely cause of the issue. libcrypto is built from source automatically as dependency

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

Errors Installing the "cryptography" Package
If you see the error shown below on OS X, then there was an issue installing the cryptography package.

build/temp.macosx-10.10-x86_64-2.7/_openssl.c:423:10: fatal error: 'openssl/e_os2.h' file not found
#include <openssl/e_os2.h>
To fix this issue, try upgrading Xcode Command Line Tools:

$ xcode-select --install
Then, make sure that openssl is installed and re-link it:

$ brew install openssl
$ brew link openssl --force

https://github.com/blockstack-packages/blockstack-profiles-py/blob/8d76651959847aa49c8e1d0714da4407c19c0cd4/troubleshooting.md

found this - it's out of date.

➜ BitcoinKit git:(btc) βœ— brew link --force openssl
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

brew info openssl
openssl: stable 1.0.2n (bottled) [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/usr/local/Cellar/openssl/1.0.2l (1,701 files, 12.2MB)
Built from source on 2017-09-09 at 20:27:15
/usr/local/Cellar/openssl/1.0.2m (1,792 files, 12.3MB)
Poured from bottle on 2017-11-06 at 12:40:57
/usr/local/Cellar/openssl/1.0.2n (1,792 files, 12.3MB)
Poured from bottle on 2018-02-06 at 12:15:02
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb
==> Dependencies
Build: makedepend βœ”
==> Options
--without-test
Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

openssl version -a
OpenSSL 1.0.2n 7 Dec 2017
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: x86_64-apple-darwin13.4.0-clang -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/johndpope/miniconda3/include -I. -I.. -I../include -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/Users/johndpope/miniconda3/ssl"

from bitcoinkit.

kishikawakatsumi avatar kishikawakatsumi commented on August 30, 2024

No need to install OpenSSL to use this library. Can you try clone the repo then just build it?

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

I'm on latest branch - bitcoinkit compiles fine - but with wallet - this is similar error I get.
screen shot 2018-02-06 at 12 20 52 pm

I'm using iterm / zsh / mini conda - could have something to do with it.
will keep digging.

from bitcoinkit.

johndpope avatar johndpope commented on August 30, 2024

screen shot 2018-02-06 at 12 27 01 pm

joy. adding /usr/local/opt/openssl/include + /usr/local/opt/openssl/lib to header search path resolved this for me. not ideal I guess - but finally up and running.
happy to leave this open until a better solution arises.
or can close.

from bitcoinkit.

kishikawakatsumi avatar kishikawakatsumi commented on August 30, 2024

Hmm, it seems something wrong my side. I'll investigate it. Thank you for reporting!

from bitcoinkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.