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

Could not find module ‘Data.Time.Calendar.Compat’ #9

Closed
jose1711 opened this issue Apr 9, 2021 · 2 comments
Closed

Could not find module ‘Data.Time.Calendar.Compat’ #9

jose1711 opened this issue Apr 9, 2021 · 2 comments
Assignees
Labels

Comments

@jose1711
Copy link

jose1711 commented Apr 9, 2021

Trying to compile:

Configuring hsemail-2.2.1...
Preprocessing library for hsemail-2.2.1..
Building library for hsemail-2.2.1..

on the commandline: warning: ignoring -split-objs
[2 of 2] Compiling Text.Parsec.Rfc2822 ( src/Text/Parsec/Rfc2822.hs, dist/build/Text/Parsec/Rfc2822.o, dist/build/Text/Parsec/Rfc2822.dyn_o )

src/Text/Parsec/Rfc2822.hs:26:1: error:
    Could not find module ‘Data.Time.Calendar.Compat’
    There are files missing in the ‘time-compat-1.9.5’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
26 | import Data.Time.Calendar.Compat
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I do have time-compat installed:

pacman -Q haskell-time-compat 
haskell-time-compat 1.9.5-47

Is that some sort of compatibility issue? Distro: Arch Linux x86_64, rolling

@peti
Copy link
Owner

peti commented Apr 9, 2021

I have built hsemail successfully with time-compat version 1.9.5. I don't see the error message you reported. Looking at the exact message, however, it looks like

There are files missing in the ‘time-compat-1.9.5’ package, try running 'ghc-pkg check'.

is a system-level error, not an actual compiler error. Is it possible that your installation has been corrupted in some way? Could you please run ghc-pkg check? Also, it might be a good idea to re-install time-compat from scratch to make sure all files that it's supposed to contain are actually there.

@peti peti self-assigned this Apr 9, 2021
@peti peti added the invalid label Apr 9, 2021
@jose1711
Copy link
Author

jose1711 commented Apr 9, 2021

is a system-level error, not an actual compiler error. Is it possible that your installation has been corrupted in some way?

Thank you, turns out that incorrect configure parameters were passed in PKGBUILD . Since the package was disowned I adopted and fixed it so that it compiles. Truth be told I have zero knowledge how haskell compilation works - it was more like trial & error. You can see the changes made here: https://aur.archlinux.org/cgit/aur.git/commit/?h=haskell-hsemail&id=51c785ce76196fa9f0b298839d6b69b601affc71.

Closing.

@jose1711 jose1711 closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants