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

tonlib-sys failure with libsecp256k1-dev #61

Open
trevor-crypto opened this issue Jun 11, 2024 · 1 comment
Open

tonlib-sys failure with libsecp256k1-dev #61

trevor-crypto opened this issue Jun 11, 2024 · 1 comment

Comments

@trevor-crypto
Copy link

Hi,
Can you tell me which version of libsecp256k1-dev` is needed for tonlib-sys to compile?

I am using:

Package: libsecp256k1-dev                                                                                                                                                                   
Version: 0.2.0-2        

Build error:

 /usr/bin/ld: libton_crypto_core.a(secp256k1.cpp.o): in function `td::ecrecover(unsigned char const*, unsigned char const*, unsigned char*)':
  secp256k1.cpp:(.text._ZN2td9ecrecoverEPKhS1_Ph+0x82): undefined reference to `secp256k1_ecdsa_recoverable_signature_parse_compact'
  /usr/bin/ld: secp256k1.cpp:(.text._ZN2td9ecrecoverEPKhS1_Ph+0xa2): undefined reference to `secp256k1_ecdsa_recover'
  collect2: error: ld returned 1 exit status
  gmake[3]: *** [crypto/CMakeFiles/fift.dir/build.make:116: crypto/fift] Error 1
  gmake[2]: *** [CMakeFiles/Makefile2:1916: crypto/CMakeFiles/fift.dir/all] Error 2
  gmake[1]: *** [CMakeFiles/Makefile2:3128: tonlib/CMakeFiles/tonlibjson.dir/rule] Error 2
  gmake: *** [Makefile:1258: tonlibjson] Error 2
  thread 'main' panicked at /home/trevorarjeski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@pymongo
Copy link

pymongo commented Jul 15, 2024

got same error on ubuntu 20.04

= note: ld.lld-16: error: undefined symbol: secp256k1_ecdsa_recoverable_signature_parse_compact

here is my .cargo/config.toml

[env]
# ton C++ source require clang 16
CC = { value = "/usr/bin/clang-16", force = true }
CXX = { value = "/usr/bin/clang++-16", force = true }
[target.x86_64-unknown-linux-gnu]
linker="clang"
rustflags = ["-Clink-arg=-fuse-ld=/usr/bin/ld.lld-16"]

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

2 participants