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 from source #2

Closed
joeyh opened this issue Aug 6, 2016 · 2 comments
Closed

fails to build from source #2

joeyh opened this issue Aug 6, 2016 · 2 comments

Comments

@joeyh
Copy link
Contributor

joeyh commented Aug 6, 2016

Fails to build on Debian unstable. There are different build failures depending on whether or not. I have the debian package libargon2-0-dev installed

joey@darkstar:~/tmp>cabal install argon2
Resolving dependencies...
Configuring argon2-1.1.0...
Building argon2-1.1.0...
Preprocessing library argon2-1.1.0...
[1 of 2] Compiling Crypto.Argon2.FFI ( dist/build/Crypto/Argon2/FFI.hs, dist/build/Crypto/Argon2/FFI.o )
[2 of 2] Compiling Crypto.Argon2    ( src/Crypto/Argon2.hs, dist/build/Crypto/Argon2.o )

phc-winner-argon2/src/argon2.c:19:22:
     fatal error: encoding.h: No such file or directory
compilation terminated.
Failed to install argon2-1.1.0
cabal: Error: some packages failed to install:
argon2-1.1.0 failed during the building phase. The exception was:
ExitFailure 1
- exit 1
joey@darkstar:~/tmp>sudo apt-get remove libargon2-0
libargon2-0      libargon2-0-dev  
joey@darkstar:~/tmp>sudo apt-get remove libargon2-0-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gstreamer0.10-alsa gstreamer0.10-plugins-bad libapache2-mod-dnssd
  libargon2-0 libc6-i686:i386 libcdaudio1 libgnome-bluetooth13
  libgstreamer-plugins-bad0.10-0 libkeybinder0 libqtwebkit4 libslv2-9
  libstd-rust-1.8 linux-image-3.2.0-4-amd64 vlc-plugin-samba xfce4-volumed
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libargon2-0-dev
0 upgraded, 0 newly installed, 1 to remove and 408 not upgraded.
After this operation, 88.1 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 305707 files and directories currently installed.)
Removing libargon2-0-dev:amd64 (0~20160406-2) ...
joey@darkstar:~/tmp>cabal install argon2
Resolving dependencies...
Configuring argon2-1.1.0...
Building argon2-1.1.0...
Preprocessing library argon2-1.1.0...
FFI.hsc:6:20: fatal error: argon2.h: No such file or directory
compilation terminated.
compiling dist/build/Crypto/Argon2/FFI_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c dist/build/Crypto/Argon2/FFI_hsc_make.c -o dist/build/Crypto/Argon2/FFI_hsc_make.o -fno-stack-protector -D__GLASGOW_HASKELL__=710 -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iphc-winner-argon2/src -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/lib/ghc/bytes_6VWy06pWzJq9evDvK2d4w6/include -I/usr/lib/ghc/base_HQfYBxpPvuw8OunzQu6JGM/include -I/usr/lib/ghc/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include -I/usr/lib/ghc/include -I/usr/lib/ghc/include/
Failed to install argon2-1.1.0
cabal: Error: some packages failed to install:
argon2-1.1.0 failed during the building phase. The exception was:
ExitFailure 1

@joeyh
Copy link
Contributor Author

joeyh commented Aug 6, 2016

My workaround was to use the debian package of the library, and in the cabal file replace the embedded C library lines with "extra-libraries: argon2"

It would be good to have a build flag to build using the system argon2 library even once this bug gets fixed.

@joeyh
Copy link
Contributor Author

joeyh commented Aug 15, 2016

This build failure occurs when the source is unpacked by cabal. Cloning the source from github avoids the problem.

Apparently files in phc-winner-argon2 are left out of the hackage tarball. Including phc-winner-argon2/src/argon2.h

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

1 participant