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

Build fails: 'can't find include file HsTimeConfig.h' and other errors #85

Closed
yurivict opened this issue Feb 16, 2023 · 6 comments
Closed

Comments

@yurivict
Copy link

yurivict commented Feb 16, 2023

log

hs-cabal-install-3.6.2.0_1
ghc-9.2.5
FreeBSD 13.1

@yurivict yurivict changed the title Build fails: can't find include file HsTimeConfig.h Build fails: 'can't find include file HsTimeConfig.h' and other errors Feb 16, 2023
@dwRchyngqxs
Copy link
Collaborator

The missing header is required because of the dependency on time. This issue might be related haskell/cabal#5223 . I will try to reproduce and investigate the issue on my FreeBSD install.

@yurivict
Copy link
Author

yurivict commented Feb 16, 2023

In particular, I tried to create a FreeBSD port for verismith and it fails to build.
Here is the shar of the port: https://people.freebsd.org/~yuri/hs-verismith.shar

@yurivict
Copy link
Author

#86

@dwRchyngqxs
Copy link
Collaborator

dwRchyngqxs commented Feb 18, 2023

I tried to reproduce the issue. I'm now pretty sure the issue is that the archive distributed at https://hackage.haskell.org/package/time-1.9.3/time-1.9.3.tar.gz is missing some files. This issue should be fixed by the maintainers of the time package, not us. #86 EDIT: the archive is not missing the files, it is moved at the configuration step to work/verismith-1.0.0.2-39-g2523998/dist-newstyle/build/x86_64-freebsd/ghc-9.2.6/time-1.9.3/build/lib/include/. It builds fine when running cabal update then cabal build manually without the file cabal.project.local. I don't know what the bsd make script for ports is doing wrong.

@yurivict
Copy link
Author

This issue should be fixed by the maintainers of the time package, not us.

The last version 1.12.2 has it fixed. The proposed patch just moves the requirement to the version that works.

@dwRchyngqxs
Copy link
Collaborator

dwRchyngqxs commented Feb 18, 2023

I finished investigating this bug on FreeBSD 13.1, using hs-cabal-install-3.6.2.0_2 and ghc-9.2.6 (latest available versions). Here are my results:

  • Cloning the repo and running cabal update followed by cabal build, works fine, same with cabal install
  • Using your shar archive that calls cabal with the bsd ports build system fails.
  • Applying the change recommended by @arrowd in Fix build issue due to the outdated 'time' module #86 and fixing your shar archive so that it uses time-1.12.2 works fine.

The way to solve this issue seems to be the following:

  1. Fix your shar archive to use the latest time version and apply the change recommended by @arrowd in your pull request; We'll then merge your pull request.
  2. Report the cabal build issue using the port build system to the port build system maintainers.

If there are still issues with that solution, please let us know.

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

3 participants