Opened 8 years ago

Closed 5 years ago

#52551 closed defect (wontfix)

ghc: bump llvm dep

Reported by: grimreaper (Eitan Adler) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc: frankdean, tobypeterson
Port: ghc

Description

This allows me to build on macOS sierra. No idea if this really is the 'right' thing to do or not though.

Attachments (3)

cal.diff (495 bytes) - added by grimreaper (Eitan Adler) 8 years ago.
3.5 -> 3.9
ghc-8.diff (19.2 KB) - added by neverpanic (Clemens Lang) 8 years ago.
Patch for GHC 8.0.1
ghc-and-deps-to-8.diff (61.6 KB) - added by neverpanic (Clemens Lang) 8 years ago.
WIP state of updating haskell-platform

Download all attachments as: .zip

Change History (17)

Changed 8 years ago by grimreaper (Eitan Adler)

Attachment: cal.diff added

3.5 -> 3.9

comment:1 Changed 8 years ago by grimreaper (Eitan Adler)

hrm, I spoke too early: this gets father but actually fails

:info:build
:info:build rts/posix/GetTime.c:44:5:
:info:build      error: use of undeclared identifier 'mach_timebase_info_data_t'
:info:build         mach_timebase_info_data_t info;
:info:build         ^
:info:build
:info:build rts/posix/GetTime.c:45:12:
:info:build      warning: implicit declaration of function 'mach_timebase_info' is invalid in C99 [-Wimplicit-function-declaration]
:info:build         (void) mach_timebase_info(&info);
:info:build                ^
:info:build
:info:build rts/posix/GetTime.c:45:32:
:info:build      error: use of undeclared identifier 'info'; did you mean 'sinf'?
:info:build         (void) mach_timebase_info(&info);
:info:build                                    ^~~~
:info:build                                    sinf

This may still be a useful patch but ignore my confirmation that it builds.

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

Cc: cal removed
Owner: changed from macports-tickets@… to cal@…

The Cc field needs full email addresses

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

You must increase revision for this change. Your failure might be a missing header, I assume you have the command line tools installed?

Note that because GHC probably doesn't build reproducibly, this change might require rev-bumping all Haskell ports. Let me know if you see this on your system.

Changed 8 years ago by neverpanic (Clemens Lang)

Attachment: ghc-8.diff added

Patch for GHC 8.0.1

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

I'm also attaching the patch I have locally for GHC 8.0.1; maybe it helps you to figure out what went wrong with your build.

comment:5 Changed 8 years ago by jmgc

I have tried the patch, and it still fails:

:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ghc/ghc/work/ghc-8.0.1" && ./configure --prefix=/opt/local --with-ghc=/opt/local/share/ghc-bootstrap/bin/ghc --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --with-ffi-includes=/opt/local/lib/libffi-3.2.1/include --with-ffi-libraries=/opt/local/lib --with-system-libffi --with-gcc="/usr/bin/clang" --with-llc=/opt/local/libexec/llvm-3.7/bin/llc --with-opt=/opt/local/libexec/llvm-3.7/bin/opt --with-nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm-classic'
:debug:configure Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ghc/ghc/work/ghc-8.0.1" && ./configure --prefix=/opt/local --with-ghc=/opt/local/share/ghc-bootstrap/bin/ghc --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --with-ffi-includes=/opt/local/lib/libffi-3.2.1/include --with-ffi-libraries=/opt/local/lib --with-system-libffi --with-gcc="/usr/bin/clang" --with-llc=/opt/local/libexec/llvm-3.7/bin/llc --with-opt=/opt/local/libexec/llvm-3.7/bin/opt --with-nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm-classic 
:info:configure checking for gfind... no
:info:configure checking for find... /usr/bin/find
:info:configure checking for sort... /usr/bin/sort
:info:configure checking for GHC Git commit id... given 4986837f8168cacf95c24fecc84d7b36c47f3c11
:info:configure checking version of ghc... 7.6.2
:info:configure configure: error: GHC version 7.8 or later is required to compile GHC.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ghc/ghc/work/ghc-8.0.1" && ./configure --prefix=/opt/local --with-ghc=/opt/local/share/ghc-bootstrap/bin/ghc --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib --with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib --with-ffi-includes=/opt/local/lib/libffi-3.2.1/include --with-ffi-libraries=/opt/local/lib --with-system-libffi --with-gcc="/usr/bin/clang" --with-llc=/opt/local/libexec/llvm-3.7/bin/llc --with-opt=/opt/local/libexec/llvm-3.7/bin/opt --with-nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm-classic 
:info:configure Exit code: 1
:error:configure Failed to configure ghc, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ghc/ghc/work/ghc-8.0.1/config.log
:error:configure org.macports.configure for port ghc returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
    while executing
"portconfigure::configure_main org.macports.configure"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:configure Warning: targets not executed for ghc: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:error:configure Failed to install ghc
:debug:configure could not read "/opt/local/share/doc/llvm-3.7/html/Dummy.html": no such file or directory
    while executing
"::file type $file"
:notice:configure Please see the log file for port ghc for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ghc/ghc/main.log
Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 8 years ago by frankdean

Cc: frank@… added

Cc Me!

Changed 8 years ago by neverpanic (Clemens Lang)

Attachment: ghc-and-deps-to-8.diff added

WIP state of updating haskell-platform

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

That's because I only attached the patch against GHC; you'd also need to update the ghc-bootstrap port. I'm attaching my current WIP state; not that it contains some junk in the haskell-platform portfile listing the dependencies of stack, some of which need porting.

comment:8 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

comment:9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: tobypeterson added
Resolution: fixed
Status: newclosed

comment:10 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Well, that commit didn't revbump the port as Clemens said was necessary, and Brandon asked for the commit to be reverted because he says it will build a broken ghc.

comment:11 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Apparently, upstream believes 3.4 to be the newest version of LLVM that supports ghc-7.8.3. See maxSupportLlvmVersion in compiler/llvmGen/LlvmCodeGen/Base.hs.

Given that ghc-7.8.3 is about 3 years old and the current release version is 8.2.2, can we just bump to a newer version of ghc and its supported version of llvm?

comment:12 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

If not, given that 3.4 is what is claimed to be the max supported by ghc-7.8.x, should we have it use llvm-3.4 instead and at least bump to ghc-7.8.4?

comment:13 Changed 7 years ago by kencu (Ken)

I believe our version of ghc is tied specifically to llvm-3.5 (given the previous discussions we had about this with the maintainer, and what I read in the Portfile and in the ghc docs). We did go through this quite a bit when someone bumped it to llvm-3.9 and it failed to build. There are some early PRs about this in Github.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

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

Resolution: wontfix
Status: reopenedclosed

GHC no longer needs LLVM as of https://github.com/macports/macports-ports/pull/4794. Additionally, I'm dropping GHC maintainership in https://github.com/macports/macports-ports/pull/5049.

Note: See TracTickets for help on using tickets.