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

Linker error on Arch #1022

Closed
pkookrthy opened this issue Aug 6, 2022 · 5 comments · Fixed by #1023
Closed

Linker error on Arch #1022

pkookrthy opened this issue Aug 6, 2022 · 5 comments · Fixed by #1023
Labels

Comments

@pkookrthy
Copy link
Contributor

pkookrthy commented Aug 6, 2022

I get a Linker error on Arch:

libHScryptonite-0.29-717e3026048e355515ccc1fd8abeed450db0ef8d63bbf8bb8b1a7d87bbff5b11.a(ed25519.o): multiple definition of 'batch_point_buffer'

libHSed25519-donna-0.1.1-1239fe7092277c5cdd70eb45b6e85454704fc0d908ec7072245a1d50122627d5.a(ed25519.o): previous definition here

collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

ghc-8.6.5
cabal-3.6.2.0

@emilypi
Copy link
Member

emilypi commented Aug 6, 2022

This is not pact problem (it's a problem with your Haskell setup on Arch), but I'm willing to keep this issue open and hash this out so it doesn't come up again as an issue.

Have you tried deleting your ~/.cabal/store and retrying from scratch? Multiple object file definitions are often the result of corrupt build caches for Cabal in your home directory.

@pkookrthy
Copy link
Contributor Author

pkookrthy commented Aug 6, 2022

deleted ~/.cabal and installed fresh ghc with ghcup, the problem still persists.
is there a different build system than cabal v2-build?
If I remember correctly a few month ago there were stack .yaml files and it built fine

@emilypi
Copy link
Member

emilypi commented Aug 6, 2022

Can you paste the rest of the log output? If this is a linker error, then it may be a problem with not being able to link libgmp-dev, which is required for GHC usage.

@pkookrthy
Copy link
Contributor Author

thanks for the "quick google search" but gmp is already installed, even if I am missing a library it must be a cryptography related one no? the error clearly is coming from some kind of conflict between cryptonite and ed25519-donna.

what is the purpose of these sussy flags in the cabal file?

flag cryptonite-ed25519
  description: use cryptonite instead of ed25519-donna
  default:     False
  manual:      True

and also

    if flag(cryptonite-ed25519)
      cpp-options: -DCRYPTONITE_ED25519
    else
      build-depends:
        , crypto-api
        , ed25519-donna

seems to me someone was solving a similar problem in a hacky way.

@pkookrthy
Copy link
Contributor Author

pkookrthy commented Aug 7, 2022

this solved the probem:

first

cabal v2-configure -f cryptonite-ed25519

and then

cabal v2-build

pkookrthy added a commit to pkookrthy/pact that referenced this issue Aug 7, 2022
stack is no longer available as a build method. 
fix cabal build complains about cryptonite and ed25519. closed kadena-io#1022
emilypi pushed a commit that referenced this issue Aug 10, 2022
stack is no longer available as a build method. 
fix cabal build complains about cryptonite and ed25519. closed #1022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants