Closed vmchale closed 5 years ago
Huh! That's not just a new-install
problem, then. new-install
works the same way that Hackage installations work (that's why it sdist
s, there's no difference between a Hackage package being built with the tarball cached and how new-install
builds stuff, it's using the exact same codepath to do so), so the issue is more a combination of a bug with new-build
that's making it not fail when it's supposed to (maybe a dupe of #5430?) and an issue with how you're using Cabal that's not putting the right stuff in the right places.
It may also be related to the fact that cardano-crypto
is a git
-based dependency (in fact, I have not seen this problem without using git
-based dependencies).
Hmm, that might also be it! It is new-sdist
ing cardano-crypto
, though. What's in that tarball?
Ah that seems to be it! /home/vanessa/work/haskell/plutus/dist-newstyle/sdist/cardano-crypto-1.1.0.tar.gz
does not contain ed25519-donna.h
.
Then it's an issue with the .cabal
file for cardano-crypto
.
Ahh okay. Thanks!
I think that it's deeper than that. Is it in the tarball you get when you new-sdist
in a clone of cardano-crypto
? The .cabal
file looks right.
Could you paste the output of cabal new-sdist --list-only
in the folder?
The output of cabal new-sdist --list-only
in cardano-crypto
is
./LICENSE
./README.md
./Setup.hs
./benchs/Bench.hs
./cardano-crypto.cabal
./cbits/ed25519/ed25519.c
./cbits/encrypted_sign.c
./src/Cardano/Crypto/Encoding/BIP39.hs
./src/Cardano/Crypto/Encoding/Seed.hs
./src/Cardano/Crypto/Praos/VRF.hs
./src/Cardano/Crypto/Wallet.hs
./src/Cardano/Crypto/Wallet/Encrypted.hs
./src/Cardano/Crypto/Wallet/Pure.hs
./src/Cardano/Crypto/Wallet/Types.hs
./src/Cardano/Internal/Compat.hs
./src/Crypto/DLEQ.hs
./src/Crypto/ECC/Ed25519BIP32.hs
./src/Crypto/ECC/Ed25519Donna.hs
./src/Crypto/ECC/P256.hs
./src/Crypto/Encoding/BIP39.hs
./src/Crypto/Encoding/BIP39/Dictionary.hs
./src/Crypto/Encoding/BIP39/English.hs
./src/Crypto/Math/Bits.hs
./src/Crypto/Math/Bytes.hs
./src/Crypto/Math/Edwards25519.hs
./src/Crypto/Math/NatMath.hs
./test/GoldenTest.hs
./test/Spec.hs
./test/Test/Cardano.hs
./test/Test/Cardano/Crypto.hs
./test/Test/Cardano/Crypto/Encoding.hs
./test/Test/Cardano/Crypto/Encoding/Seed.hs
./test/Test/Cardano/Crypto/Praos.hs
./test/Test/Cardano/Crypto/Praos/VRF.hs
./test/Test/Crypto.hs
./test/Test/Crypto/Encoding.hs
./test/Test/Crypto/Encoding/BIP39.hs
./test/Test/Orphans.hs
./test/Utils.hs
Ah! I see it. You've got to have the headers in extra-source-files
.
@typedrat I tried using extra-source-files
with new-sdist
using Cabal 2.4.1.0 and the tarball still doesn't include the header file, and --list-only
doesn't include it either. Shouldn't listing it in install-includes
be enough, i.e. shouldn't a file that will be installed in the system also be in the source tarball?
When buliding plutus, I can run
cabal new-build exe:plc
without any problems. However,cabal new-install exe:plc
fails with...which leads me to believe that headers are not being copied appropriately or perhaps include paths are not being set appropriately.
Thanks!