Page MenuHomeFreeBSD

Update lang/ghc to 8.0.2 and update hs-* to the newest releases
ClosedPublic

Authored by tcberner on Jul 11 2017, 5:29 PM.

Details

Summary

Everything should be fine now.

  • I dropped the compiler choices
    • BCLANG/PCLANG - this required a dependency on an old llvm37
    • So for now, just USE_GCC always [note, with some changes to compiler/main/*hs we could maybe get it to work with base clang as compiler]-
  • Use SUB_FILES to create the build.mk file
  • Prepare a target to create future bootstrap tarballs
  • Note, I did not yet add the SUBDIR += entries for the new ports or add MOVED entries for hs-directory.
Test Plan

Exp-run

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tcberner created this revision.Jul 11 2017, 5:29 PM
tcberner edited the summary of this revision. (Show Details)Jul 11 2017, 5:33 PM
tcberner edited the summary of this revision. (Show Details)
mat added inline comments.Jul 11 2017, 10:04 PM
lang/ghc/distinfo
5–6 ↗(On Diff #30648)

the i386 distfiles disapeared.

tcberner updated this revision to Diff 30668.Jul 12 2017, 6:47 AM
tcberner edited the summary of this revision. (Show Details)

Readd the i386 boot tarball.

tcberner marked an inline comment as done.Jul 12 2017, 6:47 AM
tcberner edited the summary of this revision. (Show Details)Jul 12 2017, 8:21 AM

The user guide build seems to fail.

Chapter 19.                                                
[473] [474] (./users_guide.ind [475] [476] [477] [478] [479] [480] [481]                                               
[482] [483] [484] [485] [486] [487]                        
Underfull \hbox (badness 10000) in paragraph at lines 1240--1241                                                       
[]\EU1/DejaVuSerif(0)/m/n/10 __GLASGOW_HASKELL_PATCHLEVEL1__,                                                          

Underfull \hbox (badness 10000) in paragraph at lines 1241--1242                                                       
[]\EU1/DejaVuSerif(0)/m/n/10 __GLASGOW_HASKELL_PATCHLEVEL2__,                                                          
[488] [489]                                                
Underfull \hbox (badness 10000) in paragraph at lines 1498--1499                                                       
[]| \EU1/DejaVuSerif(0)/m/n/10 -Wmissing-pattern-synonym-signatures,                                                   
[490] [491] [492] [493] [494] [495] [496] [497] [498] [499]) (./users_guide.aux                                        
)                                                          

LaTeX Warning: There were multiply-defined labels.         

 )                                                         
(see the transcript file for additional information)       
Output written on users_guide.pdf (515 pages).             
Transcript written on users_guide.log.                     
cp docs/users_guide/build-pdf/users_guide/users_guide.pdf docs/users_guide/users_guide.pdf                             
gmake[2]: *** [Makefile:134: all] Error 2                  
gmake[2]: Leaving directory '/usr/home/ports/lang/ghc/work/ghc-8.0.2'                                                  
===> Compilation failed unexpectedly.                      
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to                                            
the maintainer.                                            
*** Error code 1                                           

Stop.                                                      
make[1]: stopped in /usr/home/ports/lang/ghc               
*** Error code 1                                           

Stop.                                                      
make: stopped in /usr/home/ports/lang/ghc                  

===>>> make build failed for lang/ghc                      
===>>> Aborting update                                     


===>>> You can restart from the point of failure with this command line:                                               
       portmaster <flags> lang/ghc                         

This command has been saved to /tmp/portmasterfail.txt

I believe this is the same error I also get when building it outside of poudriere. Let me double check.

If you scroll all the way up you should see

  File "/usr/local/lib/python2.7/site-packages/docutils/writers/_html_base.py", line 671, in depart_document
    assert not self.context, 'len(context) = %s' % len(self.context)
AssertionError: len(context) = 1
The full traceback has been saved in /wrkdirs/usr/local/poudriere/ports/ghc/lang/ghc/work/ghc-8.0.2/tmp/sphinx-err-oiNtsC.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
[213]
ashish added a subscriber: ashish.Jul 16 2017, 11:47 AM

devel/hs-transformers-base is failing with following:

===>  Building for hs-transformers-base-0.4.4
Building transformers-base-0.4.4...
Preprocessing library transformers-base-0.4.4...
[1 of 1] Compiling Control.Monad.Base ( src/Control/Monad/Base.hs, dist/build/Control/Monad/Base.o )
 
src/Control/Monad/Base.hs:22:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
[1 of 1] Compiling Control.Monad.Base ( src/Control/Monad/Base.hs, dist/build/Control/Monad/Base.p_o )
 
src/Control/Monad/Base.hs:48:1: error:
    Failed to load interface for ‘Control.Monad.STM’
    Perhaps you haven't installed the profiling libraries for package ‘stm-2.4.4.1’?
    Use -v to see a list of the files searched for.
*** Error code 1

Complete build log at https://pastebin.com/raw/4V2dkUXv

Is there any reason not to always build with profiling and dynamic ? If not I would also like to get rid of these options. Because, it just makes stuff unnecessary breaky and buggy, as the last comment shows.

Is there any reason not to always build with profiling and dynamic ? If not I would also like to get rid of these options. Because, it just makes stuff unnecessary breaky and buggy, as the last comment shows.

Sorry, this is indeed my fault, I missed resetting hs-stm port's options, while the result. Also, the reason we'd these OPTIONs is so as to not force it on someone, as we're essentially adding another run of compilation cycle per option, so if someone doesn't need/care for these options, can just disable them, and get smaller build times. The breaky, and buggy part was entirely my fault, which I failed to notice.

pgj added a subscriber: pgj.Jul 21 2017, 4:23 AM
pgj added a comment.Jul 21 2017, 4:41 AM

I think there is nothing wrong with the DYNAMIC and PROFILE options. The issue that Ashish was experiencing is due to the fact that GHC cannot build either a dynamically-linked or profiling version of a library/executable if any of the dependencies does not have those versions built and installed. The reason why PROFILE is not enabled by default is also that it is mostly a developer option. The _p version of the libraries contain some extra bits for doing performance profiling and I do not think it would make sense to build and package them unless the user wants to have them specifically. (They can increase the size of the package by about one third, I guess.) On that other hand, as far as I remember, DYNAMIC has been a default option for a while now.

pgj added a comment.Jul 21 2017, 5:45 AM

I have added some comments to the patch inline. In addition to them, a general remark: I believe all ports where there was no version change, the PORTREVISION must be bumped because a major dependency has still changed, the compiler. That is, they will have to rebuilt anyway. I do not know if this is still required these days, though.

Mk/Scripts/check_leftovers.sh
153 ↗(On Diff #30668)

Excellent idea! Thank you.

archivers/hs-zlib-enum/files/patch-zlib-enum.cabal
7 ↗(On Diff #30668)

Why do not you simply disable the test flag explicitly for the build? You can do that with adding FLAGS_DISABLE= test to the Makefile.

devel/hs-MonadRandom/files/patch-MonadRandom.cabal
7 ↗(On Diff #30668)

Why is this dependency removed?

devel/hs-c2hs/Makefile
6 ↗(On Diff #30668)

I think this PORTREVISION reset was missed.

devel/hs-psqueues/pkg-descr
19 ↗(On Diff #30668)

That is a very long line, it should be broken.

devel/hs-text-short/Makefile
8 ↗(On Diff #30668)

The COMMENT might be too long per the recommendations of the Porter's Handbook.

devel/hs-th-abstraction/Makefile
8 ↗(On Diff #30668)

A potentially long COMMENT.

devel/hs-th-lift-instances/pkg-descr
1 ↗(On Diff #30668)

This line is too long for pkg-descr.

devel/hs-utility-ht/Makefile
6 ↗(On Diff #30668)

PORTREVISION must be reset on version upgrade.

lang/ghc/Makefile
96 ↗(On Diff #30668)

The LLVM option activates the LLVM backend for GHC. Although it may not work in every case perfectly, this is still something that the user may want to use for development, for example. That is why it has not been enabled by default.

97 ↗(On Diff #30668)

Well, I guess GHC 8.0 supports a newer, supported version of LLVM in the ports. So, that is all.

100 ↗(On Diff #30668)

Not always. However, base Clang is updated quite often.

200 ↗(On Diff #30668)

That is cool. Great idea!

270 ↗(On Diff #30668)

Perhaps this one should be with gmake?

lang/ghc/bsd.cabal.mk
57 ↗(On Diff #30668)

Why is it broken?

lang/ghc/bsd.hackage.mk
53 ↗(On Diff #30668)

Yeah, that is a good idea.

lang/ghc/files/build.mk.in
19 ↗(On Diff #30668)

I think the output generated by V = 2 is too verbose for the everyday use.

math/hs-Agda/Makefile
4 ↗(On Diff #30668)

I guess this is just temporary?

math/hs-kan-extensions/files/patch-kan-extensions.cabal
7 ↗(On Diff #30668)

Why is this dependency removed?

sysutils/hs-angel/Makefile
1 ↗(On Diff #30668)

I think this is a typo.

textproc/hs-doctemplates/pkg-descr
1 ↗(On Diff #30668)

There is a missing full stop.

Thanks, I'll update the review later.

archivers/hs-zlib-enum/files/patch-zlib-enum.cabal
7 ↗(On Diff #30668)

This is part of an upstream commit, I used as the base for this.
https://github.com/maltem/zlib-enum/commit/675f6c2f04f88a9860a4a1574602e7f4bb5738bd.patch

devel/hs-MonadRandom/files/patch-MonadRandom.cabal
7 ↗(On Diff #30668)

As I understand https://hackage.haskell.org/package/fail this is now in base -- and I did not want to add the "empty" package.

lang/ghc/Makefile
97 ↗(On Diff #30668)

The issue is, its bound to exactly one version of llvm. And old versions of llvm will be dropped from the ports tree sooner or later.

270 ↗(On Diff #30668)

You're probably right. I have not yet tested that :)

lang/ghc/bsd.cabal.mk
57 ↗(On Diff #30668)

I think this was a comment to something I wrote there before and dropped.

lang/ghc/files/build.mk.in
19 ↗(On Diff #30668)

Yes, that is only in there to test at the moment.

math/hs-Agda/Makefile
4 ↗(On Diff #30668)

Yes, I just don't have a clue how you generate that file =)

math/hs-kan-extensions/files/patch-kan-extensions.cabal
7 ↗(On Diff #30668)

see the other comment related to this.

pgj added inline comments.Jul 24 2017, 7:52 PM
math/hs-Agda/Makefile
4 ↗(On Diff #30668)

Install the Agda compiler without this file (it should just work), then use the compiler to build it from Primitive.agda. This file is placed under the datadir of the Agda package (somewhere around lib/prim/Agda).

pgj added inline comments.Jul 25 2017, 3:13 PM
lang/ghc/Makefile
75 ↗(On Diff #30668)

The documentation now requires Sphinx (textproc/py-sphinx) for building as the GHC developers have moved from using DocBook, starting from version 8.

pgj added a comment.Jul 27 2017, 8:29 AM

Do you really want to upgrade hoauth2 to its latest version? gitit uses versions 0.4.x (x >= 2) or 0.5.x, and the Network.Gitit.Authentication.Github module would need to be heavily patched in order to be able to build with version 1.3.0 (due changes in the API).

pgj added a comment.Jul 30 2017, 10:18 AM

I think the following ports could be safely dropped as they got deprecated and unmaintained in upstream:

  • devel/hs-MonadCatchIO-mtl and devel/hs-MonadCatchIO-transformers: Deprecated in favor of the exceptions package.
  • textproc/hs-citeproc-hs: Its functionality has been replaced with that of textproc/hs-pandoc-citeproc.
  • devel/hs-syb-with-class-instances-text: Unmaintained for a while now, and it has no dependents.

Thanks, I'll try to get to it on tuesday.

pgj added a comment.Jul 31 2017, 10:08 AM

Unfortunately, the documentation for lang/ghc cannot yet be built with the current version of textproc/py-sphinx in the tree. This has been reported and fixed upstream but it is not there in the ports. I submitted a bug report for that.

pgj added a comment.Jul 31 2017, 9:02 PM

All right, I have worked myself through all the mentioned issues as part of my more exhaustive review that eventually resulted in an updated version of the published diff. Basically now all the ports build fine, except devel/stack where I could not yet figure out what causes the build to fail.

pgj added a comment.Aug 1 2017, 12:38 PM

I found some additional build problems on i386 that I have now fixed. I updated the previously referenced diff with those changes.

tcberner updated this revision to Diff 31430.Aug 1 2017, 3:30 PM

Update to use the diff from @pgj

pgj added a comment.Aug 2 2017, 7:30 PM

When I was discussing with tobik how to deal with devel/stack, he spotted that lang/ghc does not configure with setting the DOCS option to off. I investigated the issue, and it turned out the X_SUB_LIST_OFF variables do not properly escape the '#' characters so sed(1) fails. They have to be prefixed with a backslash in order to work.

I updated my diff to incorporate this fix.

tcberner updated this revision to Diff 31613.Aug 5 2017, 7:14 AM

Escape the FOO_SUBLIST_OFF values.

I updated my diff to incorporate this fix.

Did it contain any other changes?

pgj added a comment.Aug 7 2017, 9:45 AM

I think it did not, but since I have spotted other problems, I kept working on the diff, which has been updated by now. To the latest version, it features the following changes:

  • Fix build with the DOCS option set to off. It turned out that GHC does not ship the xhtml package if no documentation is generated. (It is a dependency of the built-in Haddock instance, so without Haddock it is not built at all.) I also polished the interaction with the devel/hs-haddock port -- it can be used to re-add or update Haddock that comes with GHC.
  • In coordination with tobik, a new distribution tarball was produced for devel/stack, now it can build with GHC 8. I hacked on the Makefile a little bit more, as devel/stack did not want to build if the dynamically-linked executables were disabled. (It uses cabal-install that pulls in some packages that stack also needs, but only if cabal-install was built with the DYNAMIC option.)
  • Further fixes to lang/ghc to package properly with either DYNAMIC or PROFILE set to off.
tcberner updated this revision to Diff 31713.Aug 7 2017, 5:51 PM

Switch to @pgj's newest diff.

tcberner edited the summary of this revision. (Show Details)Aug 7 2017, 5:54 PM
tcberner updated this revision to Diff 31715.Aug 7 2017, 6:02 PM

Update MOVED.

pgj added a comment.Aug 7 2017, 6:53 PM

@tcberner : You seem to forgot to remove the SUBDIR entry for hs-directory in devel/Makefile, so I fixed it. In addition to that, the new version of my diff now contains:

    • A missing patch for devel/hs-git-annex to have its man pages in the right directory.
  • An entry for UPDATING.
tcberner updated this revision to Diff 31720.Aug 7 2017, 7:20 PM

Switch to new diff.

tcberner updated this revision to Diff 31747.Aug 8 2017, 6:39 AM

Update lang/ghc's plist to include the manpage.

pgj added a reviewer: pgj.Aug 8 2017, 8:26 AM
pgj removed a subscriber: pgj.
pgj accepted this revision.Aug 8 2017, 8:31 AM

I think it is fine now.

pgj added a comment.Aug 8 2017, 10:38 AM

While toying with the related commit message, I realized that your change wants to re-add the math/hs-nats port that was removed on the last major update. It actually had a reason: the functionality of the nats package has been merged in the base package that ships with GHC, and it looks like that is still the case.

I have checked it, and it turned out that only the converters/hs-aeson-compat port would need it. So I changed the port to not to use the nats package, hence there is no need to resurrect the math/hs-nats port.

I updated my diff with this modification.

arrowd accepted this revision.Aug 8 2017, 11:21 AM

Compiled latest revision in 11.0 jail.

This revision was automatically updated to reflect the committed changes.