Opened 8 years ago

Closed 5 years ago

#52550 closed update (fixed)

ghc-bootstrap: bump to 7.6.3

Reported by: grimreaper (Eitan Adler) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: ghc-bootstrap

Description

Confirmed I am able to compile this for amd64. Unable to test on i386, but the comment is untrue.

--->  Fetching archive for ghc-bootstrap
--->  Attempting to fetch ghc-bootstrap-7.6.3_0.darwin_16.x86_64.tbz2 from https://packages.macports.org/ghc-bootstrap
--->  Attempting to fetch ghc-bootstrap-7.6.3_0.darwin_16.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/ghc-bootstrap
--->  Attempting to fetch ghc-bootstrap-7.6.3_0.darwin_16.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/ghc-bootstrap
--->  Fetching distfiles for ghc-bootstrap
--->  Verifying checksums for ghc-bootstrap
--->  Extracting ghc-bootstrap
--->  Configuring ghc-bootstrap
--->  Building ghc-bootstrap
--->  Staging ghc-bootstrap into destroot
--->  Installing ghc-bootstrap @7.6.3_0
--->  Deactivating ghc-bootstrap @7.6.2_1
--->  Cleaning ghc-bootstrap
--->  Activating ghc-bootstrap @7.6.3_0
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.

Attachments (1)

ghc-bootstrap.diff (1.7 KB) - added by grimreaper (Eitan Adler) 8 years ago.
bump to 7.6.3

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by grimreaper (Eitan Adler)

Attachment: ghc-bootstrap.diff added

bump to 7.6.3

comment:1 Changed 8 years ago by neverpanic (Clemens Lang)

Thanks, but here's the tested patch for an update to 7.10.3 that I have locally:

  • Portfile

     
    66
    77name                ghc-bootstrap
    88set canonicalname   ghc
    9 # Note: 7.6.3 doesn't have a i386 darwin version at http://www.haskell.org/ghc/dist/7.6.3
    10 version             7.6.2
    11 revision            1
     9
     10version             7.10.3
    1211categories          lang haskell
    1312maintainers         cal openmaintainer
    1413license             BSD
    1514platforms           darwin
    16 supported_archs     i386 x86_64
     15
     16# Warning: http://downloads.haskell.org/~ghc/7.10.3/ does not have a i386
     17# darwin build and 7.6.2 (which seems to be the latest build that has it) is
     18# affected by https://github.com/haskell/unix/pull/18, which causes the GHC
     19# build to fail on El Capitan and later. This means that
     20#  (a) I (or somebody else) would have to build a i386 ghc-bootstrap
     21#  (b) i386 builds of GHC are no longer supported.
     22# I'm going with (b) until somebody on i386 volunteers to build a ghc-bootstrap
     23# or convinces upstream to do so.
     24supported_archs     x86_64
     25
    1726universal_variant   no
    1827installs_libs       no
    1928
    2029description         The Glorious Glasgow Haskell Compilation System
    21 long_description    \
    22                     This is a package that installs a binary \
    23                     bootstrap ghc compiler.
     30long_description    This is a package that installs a binary GHC compiler for bootstrapping.
    2431
    25 homepage            http://haskell.org/${canonicalname}
    26 master_sites        ${homepage}/dist/${version}/
     32homepage            https://haskell.org/${canonicalname}
     33master_sites        https://downloads.haskell.org/~${canonicalname}/${version}/
    2734distname            ${canonicalname}-${version}-${build_arch}-apple-darwin
    2835worksrcdir          ${canonicalname}-${version}
    29 use_bzip2           yes
     36use_xz              yes
    3037
    31 checksums           ${canonicalname}-${version}-i386-apple-darwin${extract.suffix} \
    32                         rmd160  232b3aa4ed9e2ff09d520f4ae02fa572a671178a \
    33                         sha256  c1da502fa7d99f3d87370c65d705a7e8ee4c900fdb62df6f71696c5432047059 \
    34                     ${canonicalname}-${version}-x86_64-apple-darwin${extract.suffix} \
    35                         rmd160  b0870a4a292fae7248f9b0be485affa4a5a76a2d \
    36                         sha256  eb0dd19bd5a6eede332d58de219437b9c2b186c72a1fc0c60fa1095b0c2d2789
    37 
    38 post-extract {
    39     # Copy clang-wrapper for re-inplace during configure
    40     xinstall -m 644 ${filespath}/clang-wrapper ${workpath}/clang-wrapper
    41 }
     38checksums           ${canonicalname}-${version}-x86_64-apple-darwin${extract.suffix} \
     39                    rmd160  4f556937880d853448b482bfc7d7f1a6a0dd220f \
     40                    sha256  852781d43d41cd55d02f818fe798bb4d1f7e52f488408167f413f7948cf1e7df
     41
     42#post-extract {
     43#    # Copy clang-wrapper for re-inplace during configure
     44#    xinstall -m 644 ${filespath}/clang-wrapper ${workpath}/clang-wrapper
     45#}
    4246
    4347# Compilation (of the final non-bootstrap GHC, which uses the C compiler
    4448# configured in this port) fails with older versions of clang. clang-4.1 from
     
    5660configure.pre_args  --prefix=${prefix}/share/ghc-bootstrap
    5761configure.args      --with-gcc=${configure.cc}
    5862
    59 pre-configure {
    60     # OK so because this binary has been prebuilt for libraries
    61     # in /usr/lib we search these before macports stuff so (hopefully)
    62     # weird things don't happen
    63     configure.ldflags  -L/usr/lib
    64     configure.cppflags -I/usr/include
    65 
    66     # patch clang-wrapper and make sure it is used by patching settings.in
    67     reinplace "s#@clang@#${configure.cc}#g" ${workpath}/clang-wrapper
    68     reinplace "s#@SettingsCCompilerCommand@#${prefix}/share/ghc-bootstrap/libexec/clang-wrapper#g" ${worksrcpath}/settings.in
    69 }
     63#pre-configure {
     64#    # OK so because this binary has been prebuilt for libraries
     65#    # in /usr/lib we search these before macports stuff so (hopefully)
     66#    # weird things don't happen
     67#    configure.ldflags  -L/usr/lib
     68#    configure.cppflags -I/usr/include
     69#
     70#    # patch clang-wrapper and make sure it is used by patching settings.in
     71#    reinplace "s#@clang@#${configure.cc}#g" ${workpath}/clang-wrapper
     72#    reinplace "s#@SettingsCCompilerCommand@#${prefix}/share/ghc-bootstrap/libexec/clang-wrapper#g" ${worksrcpath}/settings.in
     73#}
    7074
    7175build {}
    7276
    7377post-destroot {
    74     # install clang-wrapper to libexec
    75     xinstall -d -m 755 ${destroot}${prefix}/share/ghc-bootstrap/libexec
    76     xinstall -m 755 ${workpath}/clang-wrapper ${destroot}${prefix}/share/ghc-bootstrap/libexec
    77 
    78     # Delete all .dylib files, because their load commands would have to be
    79     # fixed or rev-upgrade complains and tries to rebuild the port. However, we
    80     # cannot correctly fix all .dylibs, because the have not been built with
    81     # -headerpad_max_install_names. Deleting them fixes the problem and GHC
    82     # still seems to compile correctly.
    83 
    84     # We also delete all the .html files, because we really don't need the
    85     # documentation in a bootstrap port.
    86 
     78    ## install clang-wrapper to libexec
     79    #xinstall -d -m 755 ${destroot}${prefix}/share/ghc-bootstrap/libexec
     80    #xinstall -m 755 ${workpath}/clang-wrapper ${destroot}${prefix}/share/ghc-bootstrap/libexec
     81
     82    # Delete all .dylib files, because some of them reference nonexistant
     83    # libraries (e.g.
     84    #   /opt/local/share/ghc-bootstrap/lib/ghc-7.10.3/Cabal_3ux67khMI118y6VpwrFnXN/libHSCabal-1.22.5.0-3ux67khMI118y6VpwrFnXN-ghc7.10.3.dylib
     85    # references
     86    #   /usr/local/lib/gcc/5/libgcc_s.1.dylib
     87    # which does not exist) and rev-upgrade complains and tries to rebuild the
     88    # port. Deleting them breaks bootstrapping using dynamic libraries in GHC,
     89    # but since the static libraries are still there, that is not a serious
     90    # problem.
     91    set nametool "install_name_tool -change /usr/local/lib/gcc/5/libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib"
    8792    fs-traverse f ${destroot}${prefix} {
    8893        if {[file isfile ${f}]} {
    8994            set ext [file extension ${f}]
    90             if {${ext} eq ".html" || ${ext} eq ".dylib"} {
    91                 delete ${f}
     95            if {${ext} eq ".dylib"} {
     96                system "${nametool} ${f}"
    9297            }
    9398        }
    9499    }
     100    fs-traverse f ${destroot}${prefix}/share/ghc-bootstrap/lib/ghc-${version}/bin {
     101        if {[file type $f] eq "file"} {
     102            system "${nametool} ${f}"
     103        }
     104    }
     105
     106    # We also delete $prefix/share/ghc-bootstrap/share/doc, because we
     107    # really don't need the documentation in a bootstrap port.
     108    delete ${destroot}${prefix}/share/ghc-bootstrap/share/doc
    95109}
    96110
    97111livecheck.type      none

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to neverpanic
Status: newassigned
Version: 2.3.4

comment:3 Changed 5 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

This is fixed with the recent update to GHC 8.6 as merged in ​https://github.com/macports/macports-ports/pull/4794.

Note: See TracTickets for help on using tickets.