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

Fails to build on mac using libsodium-1.0.19 via homebrew #126

Open
agevelt opened this issue Nov 17, 2023 · 1 comment
Open

Fails to build on mac using libsodium-1.0.19 via homebrew #126

agevelt opened this issue Nov 17, 2023 · 1 comment
Labels
libsodium-bindings libsodium-bindings package

Comments

@agevelt
Copy link

agevelt commented Nov 17, 2023

Currently libsodium-bindings won't build on mac when using homebrew because homebrew recently updated the libsodium recipe and now only carries libsodium-1.0.19.

This fails on any combination of the flags use-pkg-config and homebrew-libsodium.

Using use-pkg-config with or without homebrew-libsodium:

libsodium-bindings           > Error: Cabal-simple_6HauvNHV_3.8.1.0_ghc-9.4.7: The pkg-config package                                                
libsodium-bindings           > 'libsodium' version ==1.0.18 is required but the version installed on the                                             
libsodium-bindings           > system is version 1.0.19                                                                                              
libsodium-bindings           >       

Using no flags or homebrew-libsodium:

libsodium-bindings           > Error: Cabal-simple_6HauvNHV_3.8.1.0_ghc-9.4.7: Missing dependency on a                                    
libsodium-bindings           > foreign library:                                                                                           
libsodium-bindings           > * Missing (or bad) C library: sodium                                                                       
libsodium-bindings           > This problem can usually be solved by installing the system package that                                   
libsodium-bindings           > provides this library (you may need the "-dev" version). If the library is                                 
libsodium-bindings           > already installed but in a non-standard location then you can use the flags                                
libsodium-bindings           > --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the                                  
libsodium-bindings           > library file does exist, it may contain errors that are caught by the C                                    
libsodium-bindings           > compiler at the preprocessing stage. In this case you can re-run configure                                 
libsodium-bindings           > with the verbosity flag -v3 to see the error messages.                                                     
libsodium-bindings           >                                                            

I've tested relaxing the libsodium dependency in libsodium-bindings.cabal: pkgconfig-depends: libsodium ==1.0.18 || ==1.0.19

That seems to build, though I haven't checked if any breaking changes have been introduced as a result.

@Kleidukos
Copy link
Member

Lovely, thank you for the update, I was wondering when that would happen. :)
Reading the changelog there does not seem to be any breaking change, although we don't support the additions that have been introduced yet.

@Kleidukos Kleidukos added the libsodium-bindings libsodium-bindings package label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libsodium-bindings libsodium-bindings package
Projects
None yet
Development

No branches or pull requests

2 participants