Comments (8)
Could you provide complete instructions to reproduce and include cabal and OS version please? This works for me:
git clone https://github.com/tibbe/hashable
cd hashable
# Check out master at time of writing:
git checkout -b repro 7438adcfb233eb326a99ea12a8baf3356c93ffc9
cabal configure && cabal sdist
mkdir tmp
cd tmp
tar zxf ../dist/hashable-1.2.3.1.tar.gz
cd hashable-1.2.3.1
cabal test
from hashable.
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
$ curl http://hackage.haskell.org/package/hashable-1.2.3.1/hashable-1.2.3.1.tar.gz | tar xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 23845 100 23845 0 0 149k 0 --:--:-- --:--:-- --:--:-- 253k
$ cd hashable-1.2.3.1
$ ghc --make Setup && ./Setup configure --enable-tests && ./Setup build && ./Setup test
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Configuring hashable-1.2.3.1...
Building hashable-1.2.3.1...
Preprocessing library hashable-1.2.3.1...
[1 of 3] Compiling Data.Hashable.Class ( Data/Hashable/Class.hs, dist/build/Data/Hashable/Class.o )
[2 of 3] Compiling Data.Hashable.Generic ( Data/Hashable/Generic.hs, dist/build/Data/Hashable/Generic.o )
[3 of 3] Compiling Data.Hashable ( Data/Hashable.hs, dist/build/Data/Hashable.o )
In-place registering hashable-1.2.3.1...
Preprocessing test suite 'tests' for hashable-1.2.3.1...
tests/Regress.hs:8:18:
Could not find module `Regress.Mmap'
Use -v to see a list of the files searched for.
With GHC 7.8.4 (a.k.a. Cabal 1.18.x) this works fine.
from hashable.
Still works for me. Try this somewhat more explicit command line, so you see which Cabal version Setup.hs
gets linked against.
ghc-7.6.3 --make Setup -no-user-package-db && ./Setup --version && ./Setup configure -w ghc-7.6.3 --enable-tests --user && ./Setup build && ./Setup test
Note that I
- added
-no-user-package-db
when buildingSetup.hs
to make sure I use the version of Cabal in the global package DB (i.e. the one that shipped with GHC, unless you've installed an updated version in your global package DB), and - added
--user
to theconfigure
step as I have the test dependencies installed in the user package DB.
Also you didn't tell me which OS you're on. Regress.Mmap has an OS guard in front of it in hashable.cabal.
from hashable.
/tmp/hashable-1.2.3.1$ uname -a
Linux peti 3.14.27 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux
/tmp/hashable-1.2.3.1$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
/tmp/hashable-1.2.3.1$ ghc-pkg list
/nix/store/0x4kjirfmwpfpqvfl41q3h7v69rfs6h7-ghc-7.6.3/lib/ghc-7.6.3/package.conf.d
Cabal-1.16.0
HUnit-1.2.5.2
QuickCheck-2.7.6
ansi-terminal-0.6.2.1
ansi-wl-pprint-0.6.7.1
array-0.4.0.1
base-4.6.0.1
bin-package-db-0.0.0.0
binary-0.5.1.1
bytestring-0.10.0.2
containers-0.5.0.0
deepseq-1.3.0.1
directory-1.2.0.1
extensible-exceptions-0.1.1.4
filepath-1.3.0.1
ghc-7.6.3
ghc-prim-0.3.0.0
haskell2010-1.1.1.0
haskell98-2.0.0.2
hoopl-3.9.0.0
hostname-1.0
hpc-0.6.0.0
integer-gmp-0.5.0.0
mtl-2.2.1
old-locale-1.0.0.5
old-time-1.1.0.1
pretty-1.1.1.0
primitive-0.5.4.0
process-1.1.0.2
random-1.1
regex-base-0.93.2
regex-posix-0.95.2
rts-1.0
template-haskell-2.8.0.0
test-framework-0.8.1.1
test-framework-hunit-0.3.0.1
test-framework-quickcheck2-0.3.0.3
text-1.2.0.4
tf-random-0.5
time-1.4.0.1
transformers-0.4.2.0
unix-2.6.0.1
xml-1.3.13
/tmp/hashable-1.2.3.1$ ghc-7.6.3 --make Setup -no-user-package-db && ./Setup --version && ./Setup configure -w ghc-7.6.3 --enable-tests --user && ./Setup build && ./Setup test
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Cabal library version 1.16.0
Configuring hashable-1.2.3.1...
Building hashable-1.2.3.1...
Preprocessing library hashable-1.2.3.1...
[1 of 3] Compiling Data.Hashable.Class ( Data/Hashable/Class.hs, dist/build/Data/Hashable/Class.o )
[2 of 3] Compiling Data.Hashable.Generic ( Data/Hashable/Generic.hs, dist/build/Data/Hashable/Generic.o )
[3 of 3] Compiling Data.Hashable ( Data/Hashable.hs, dist/build/Data/Hashable.o )
In-place registering hashable-1.2.3.1...
Preprocessing test suite 'tests' for hashable-1.2.3.1...
tests/Regress.hs:8:18:
Could not find module `Regress.Mmap'
Use -v to see a list of the files searched for.
from hashable.
I can reproduce it now. It's a bug in Cabal-1.16 that makes it not put the file in the tarball even though it's listed in the .cabal file. Solution: upgrade to a new cabal (backporting the fix is not worth it.)
from hashable.
Why would I want to update Cabal? I have no intention of building a release tarball. I just want to compile the tarball that's published on Hackage.
from hashable.
The tarball on Hackage contains the file:
$ cabal unpack hashable-1.2.3.1
Unpacking to hashable-1.2.3.1/
$ ls hashable-1.2.3.1/tests/Regress
Mmap.hsc
Using a newer cabal to build the test suite works:
Old Cabal:
$ ghc-7.6.3 --make Setup -package Cabal-1.16.0 && ./Setup --version && ./Setup configure -w ghc-7.6.3 --enable-tests --user && ./Setup build && ./Setup test
Cabal library version 1.16.0
Configuring hashable-1.2.3.1...
Building hashable-1.2.3.1...
Preprocessing library hashable-1.2.3.1...
[1 of 3] Compiling Data.Hashable.Class ( Data/Hashable/Class.hs, dist/build/Data/Hashable/Class.o )
[2 of 3] Compiling Data.Hashable.Generic ( Data/Hashable/Generic.hs, dist/build/Data/Hashable/Generic.o )
[3 of 3] Compiling Data.Hashable ( Data/Hashable.hs, dist/build/Data/Hashable.o )
In-place registering hashable-1.2.3.1...
Preprocessing test suite 'tests' for hashable-1.2.3.1...
tests/Regress.hs:8:18:
Could not find module `Regress.Mmap'
Use -v to see a list of the files searched for.
New Cabal:
$ ghc-7.6.3 --make Setup -package Cabal-1.20.0.0 && ./Setup --version && ./Setup configure -w ghc-7.6.3 --enable-tests --user && ./Setup build && ./Setup test
[1 of 1] Compiling Main ( Setup.hs, Setup.o ) [Distribution.Simple changed]
Linking Setup ...
Cabal library version 1.20.0.0
Configuring hashable-1.2.3.1...
Building hashable-1.2.3.1...
Preprocessing library hashable-1.2.3.1...
[1 of 3] Compiling Data.Hashable.Class ( Data/Hashable/Class.hs, dist/build/Data/Hashable/Class.o )
[2 of 3] Compiling Data.Hashable.Generic ( Data/Hashable/Generic.hs, dist/build/Data/Hashable/Generic.o )
[3 of 3] Compiling Data.Hashable ( Data/Hashable.hs, dist/build/Data/Hashable.o )
In-place registering hashable-1.2.3.1...
Preprocessing test suite 'tests' for hashable-1.2.3.1...
[1 of 4] Compiling Regress.Mmap ( dist/build/tests/tests-tmp/Regress/Mmap.hs, dist/build/tests/tests-tmp/Regress/Mmap.o )
[2 of 4] Compiling Regress ( tests/Regress.hs, dist/build/tests/tests-tmp/Regress.o )
[3 of 4] Compiling Properties ( tests/Properties.hs, dist/build/tests/tests-tmp/Properties.o )
tests/Properties.hs:179:1: Warning:
Defined but not used: `pProduct2'
tests/Properties.hs:182:1: Warning:
Defined but not used: `pProduct3'
[4 of 4] Compiling Main ( tests/Main.hs, dist/build/tests/tests-tmp/Main.o )
Linking dist/build/tests/tests ...
Running 1 test suites...
Test suite tests: RUNNING...
Test suite tests: PASS
Test suite logged to: dist/test/hashable-1.2.3.1-tests.log
1 of 1 test suites (1 of 1 test cases) passed.
from hashable.
Ah, okay. Now I see. The file is there, but the old Cabal version doesn't pick it up for the build. Okay. Thank you for your help!
from hashable.
Related Issues (20)
- Add instances for type(s) in Data.Array.Byte (base-4.17)
- Add instances for new types in `filepath`
- Support GHC 9.4 HOT 1
- Allow GHC-9.4? HOT 2
- Unable to compile on Mac M1 architecture HOT 2
- What's the deal with Fixed? HOT 1
- Hash unstable across executions HOT 6
- hashable doesn't compile in ghc 9.6.1-alpha3 HOT 1
- Hashable 1.4.2.0 fails to build on integer-simple GHC HOT 2
- better instance Hashable IntSet? HOT 5
- ( odd x && odd y) ==> hash (x,y) == hash (negate x, negate y ) HOT 10
- using Hashed inside a tuple produces collisions HOT 4
- Caching hash value sometimes leads to equal hashes for different inputs HOT 1
- Minor release 1.4.3.0 introduces semantic changes HOT 1
- Use fromThreadId HOT 1
- Allow containers-0.7 HOT 2
- GHC99 failed to build: perhaps need to add ‘os-string’ to the build-depends HOT 2
- hashable doesn't support filepath-1.5, ghc-9.10 will bump filepath to 1.5 HOT 3
- Could AES-NI instructions be used for better Int hashes? HOT 1
- Could AES-NI instructions be used for better Int hashes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashable.