Skip to content

GHC99 failed to build: perhaps need to add ‘os-string’ to the build-depends #291

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

Closed
futu2 opened this issue Feb 17, 2024 · 2 comments
Closed

Comments

@futu2
Copy link

futu2 commented Feb 17, 2024

Configuring library for hashable-1.4.3.0..
Preprocessing library for hashable-1.4.3.0..
Building library for hashable-1.4.3.0..
[1 of 7] Compiling Data.Hashable.Imports ( src/Data/Hashable/Imports.hs, dist/build/Data/Hashable/Imports.o )
[2 of 7] Compiling Data.Hashable.LowLevel ( src/Data/Hashable/LowLevel.hs, dist/build/Data/Hashable/LowLevel.o )

/tmp/ghc985652_0/ghc_8.c:11:221: error:
     warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
       11 | HsWord32 ghczuwrapperZC1ZChashablezm1zi4zi3zi0zm7ac6542072cd042b9ee3c6ad06eda0521f254b34a3408c1c856e5b8981845cc0ZCDataziHashableziLowLevelZChashablezufnvzuhash(char* a1, HsInt32 a2, HsInt32 a3) {return hashable_fnv_hash(a1, a2, a3);}
          |                                                                                                                                                                                                                             ^~
   |
11 | HsWord32 ghczuwrapperZC1ZChashablezm1zi4zi3zi0zm7ac6542072cd042b9ee3c6ad06eda0521f254b34a3408c1c856e5b8981845cc0ZCDataziHashableziLowLevelZChashablezufnvzuhash(char* a1, HsInt32 a2, HsInt32 a3) {return hashable_fnv_hash(a1, a2, a3);}
   |                                                                                                                                                                                                                             ^

include/HsHashable.h:19:53: error:
     note: passing argument to parameter 'str' here
       19 | FNV_UNSIGNED hashable_fnv_hash(const unsigned char* str, FNV_SIGNED len, FNV_UNSIGNED salt);
          |                                                     ^
   |
19 | FNV_UNSIGNED hashable_fnv_hash(const unsigned char* str, FNV_SIGNED len, FNV_UNSIGNED salt);
   |                                                     ^
1 warning generated.
[3 of 7] Compiling Data.Hashable.Class ( src/Data/Hashable/Class.hs, dist/build/Data/Hashable/Class.o )

src/Data/Hashable/Class.hs:167:1: error: [GHC-87110]
    Could not load module ‘System.OsString.Internal.Types’.
    It is a member of the hidden package ‘os-string-2.0.2’.
    Perhaps you need to add ‘os-string’ to the build-depends in your .cabal file.
    It is a member of the hidden package ‘filepath-1.4.100.4’.
    Perhaps you need to add ‘filepath’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
    |
167 | import System.OsString.Internal.Types (OsString (..), PosixString (..), WindowsString (..))
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@futu2 futu2 changed the title GHC98 failed to build: perhaps need to add ‘os-string’ to the build-depends GHC99 failed to build: perhaps need to add ‘os-string’ to the build-depends Feb 17, 2024
@phadej
Copy link
Contributor

phadej commented Feb 17, 2024

Do you use allow-newer, which filepath version you are building hashable against.

Currently, hashable doesn't support filepath-1.5.

@futu2
Copy link
Author

futu2 commented Feb 17, 2024

Thx, it works after removing allow-newer in cabal.project.

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