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

Compiled error on mac #17

Open
sc0Vu opened this issue Jan 22, 2019 · 2 comments
Open

Compiled error on mac #17

sc0Vu opened this issue Jan 22, 2019 · 2 comments

Comments

@sc0Vu
Copy link

sc0Vu commented Jan 22, 2019

Hi

Thanks for this great library. Recently I got error on my mac pro when I want to compile this library.
OS: Mojave 10.14.2
XCODE version: 10.1

  1. The first error: configure error at line 77
    After I compiled the source code from bitcoin (clone in another directory), and it worked fine.
    So I checked the file permission in mix directory, found that it happened because the wrong permission in the cloned repo: c_src/libsecp256k1.
    Maybe we can put libsecp256k1 in this repo?

  2. The second error: ld: library not found for -lgmp
    I removed the flag and it worked!. I have no idea how to fix it properly.

Thanks!

@tzumby
Copy link

tzumby commented Mar 28, 2019

@sc0Vu, to fix #2 you need to install the GMP package

brew install gmp

I think I'm trying to debug #1 in Mac OS as well.

This is the config.log after I run mix compile

configure:3547: checking whether the C compiler works
configure:3569: gcc  -I/usr/local/opt/qt/include -L/usr/local/opt/qt/lib -dynamiclib -undefined dynamic_lookup c_src/secp256k1/.libs/libsecp256k1.a -lgmp conftest.c  >&5
clang: error: no such file or directory: 'c_src/secp256k1/.libs/libsecp256k1.a'

If I cd into deps/libsecp256k1/c_src and run build_deps from there it works.

./build_deps.sh

This tells me the main Makefile executing the build_deps bash script doesn't get access to the same bash environment variables ?

@ppraisethesun
Copy link

@sc0Vu, to fix #2 you need to install the GMP package

brew install gmp

I think I'm trying to debug #1 in Mac OS as well.

This is the config.log after I run mix compile

configure:3547: checking whether the C compiler works
configure:3569: gcc  -I/usr/local/opt/qt/include -L/usr/local/opt/qt/lib -dynamiclib -undefined dynamic_lookup c_src/secp256k1/.libs/libsecp256k1.a -lgmp conftest.c  >&5
clang: error: no such file or directory: 'c_src/secp256k1/.libs/libsecp256k1.a'

If I cd into deps/libsecp256k1/c_src and run build_deps from there it works.

./build_deps.sh

This tells me the main Makefile executing the build_deps bash script doesn't get access to the same bash environment variables ?

Having the same issue with gmp. brew install gmp doesn't work, it just says I already have it installed.

Did you manage to solve this issue or is there any alternative?

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

3 participants