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

fatal error: codec.h: No such file or directory #2

Open
joehealy opened this Issue Apr 4, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@joehealy
Copy link

joehealy commented Apr 4, 2018

Compiling emailparse seems to give the error:

[10 of 10] Compiling Network.Mail.Parse ( src/Network/Mail/Parse.hs, dist/build/Network/Mail/Parse.p_o )

csrc/codec.c:7:10: error:
fatal error: codec.h: No such file or directory
#include "codec.h"
^~~~~~~~~
|
7 | #include "codec.h"
| ^
compilation terminated.
cc' failed in phase C Compiler'. (Exit code: 1)

Any hints as to what this missing file belongs to?

@ghost

This comment has been minimized.

Copy link

ghost commented May 6, 2018

Can you fix this issue ?
I got it ...

@mkawalec

This comment has been minimized.

Copy link
Owner

mkawalec commented Jun 16, 2018

sure thing. Which GHC version are you using @ghost ?

@exaexa

This comment has been minimized.

Copy link

exaexa commented Jun 16, 2018

I had the same bug on 8.0.2 (debian buster, ghc from apt packages), 8.2.x from stack works okay (going to verify if 8.2.x from packages will work too).

A quick workaround is to use a version several commits back (I guess it's 0.2.0.7).

@mkawalec

This comment has been minimized.

Copy link
Owner

mkawalec commented Jun 17, 2018

I can't actually get the library to build with cabal (I guess stack insulated me from the fun of haskell packages on arch in particular and cabal in general), does the latest version through stack work for you? I've updated the resolver.

@exaexa

This comment has been minimized.

Copy link

exaexa commented Jun 17, 2018

Works through stack. I wasn't able to get non-stack 8.2.x yet but judging from the error message (it's only a missing include path in gcc parameters) it's a ghc version problem. Which is a pity, it's the only reason why it doesn't work with 8.0.2 cabal. I'll try to get some quick fix for that.

@exaexa

This comment has been minimized.

Copy link

exaexa commented Jun 17, 2018

Interesting, the build works manually from git now even with cabal (I upgraded from ghc-8.0 to 8.2 and cabal 1.24 to 2.0), but fails in the same way when I let cabal download the emailparse package (0.2.0.10) from hackage.

Is there any debug info I can produce to help fixing this? (I'm quite new in debugging such stuff)

@mkawalec

This comment has been minimized.

Copy link
Owner

mkawalec commented Jun 17, 2018

I'm unsure myself, but a rather quick fix could be to use http://hackage.haskell.org/package/base64-bytestring-1.0.0.1/docs/Data-ByteString-Base64.html or similar for base64 encode/decode instead of that rather ugly C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment