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

ghc: Update to 8.6.5 and major Portfile refactoring #4794

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

essandess
Copy link
Contributor

@essandess essandess commented Jul 10, 2019

  • Download x86_64-apple-darwin version from haskell.org
  • Include gpg signature verification
  • Bootstrap from source
  • Eliminate old patch files, compiler incompatibilities

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.x
Xcode 8.x

Verification

Have you

  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@macportsbot
Copy link

Notifying maintainers:
@neverpanic for port ghc.

@macportsbot macportsbot added maintainer: open Affects an openmaintainer port type: update labels Jul 10, 2019
@essandess
Copy link
Contributor Author

See also #4699. Some rebase issue created this new PR.

@neverpanic @pmetzger @mojca @ryandesign @cjones051073

@cjones051073
Copy link
Member

It was completely unnecessary to close the previous PR and open this one. This PR is using exactly the same branch....

@macportsbot
Copy link

Travis Build #7239 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

Port ghc's dependencies fail on xcode9.4. Log

The build timed out.

@essandess
Copy link
Contributor Author

It was completely unnecessary to close the previous PR and open this one. This PR is using exactly the same branch....

You presume git intent…

@mojca
Copy link
Member

mojca commented Jul 10, 2019

Feel free to ask for help if you require some help with git magic next time when you end up in fight with the tools :)

@cjones051073
Copy link
Member

The point is as this PR is using the same feature branch as the old one, whatever was done to fix it would have worked just fine there. If we where to close this PR now and reopen the old one, the diffs/commits would be exactly as they are here. opening this second PR was just a waste of time...

@essandess
Copy link
Contributor Author

Feel free to ask for help if you require some help with git magic next time when you end up in fight with the tools :)

#4699 (comment)

You all can do whatever git magic you want to clean this up the way you want.

In my experience the most efficient way of handling inscrutable git issues is not to chase hashes on a directed acyclic graph, but just delete and start over unless there would be some data loss issue.

@cjones051073
Copy link
Member

Feel free to ask for help if you require some help with git magic next time when you end up in fight with the tools :)

#4699 (comment)

You all can do whatever git magic you want to clean this up the way you want.

In my experience the most efficient way of handling inscrutable git issues is not to chase hashes on a directed acyclic graph, but just delete and start over unless there would be some data loss issue.

Thats fine. But still, a second PR is not required as you used the same branch name. Even if you deleted the branch locally, remade it from scratch and then (force) pushed it to github, the original PR would have reflected those changes. Please don't mix up rebuilding a branch with opening a new PR.

@essandess
Copy link
Contributor Author

The build fail here is caused by not specifying a necessary dependency. I can easily add the python37 dependency, but I don’t know how to tell the Portfile build system to point python3 to python37. Just issue a port select --set command within system? Something else?

Error:

env: python3: No such file or directory

@cjones051073
Copy link
Member

The build fail here is caused by not specifying a necessary dependency. I can easily add the python37 dependency, but I don’t know how to tell the Portfile build system to point python3 to python37. Just issue a port select --set command within system? Something else?

Error:

env: python3: No such file or directory

You cannot use/rely on port select in a portfile. The canonical solution, if the upstream build system does not have an option to explicitly set the full path to the python executable, is to patch the build source to change the instances of 'python3' to directly refer to the required python version. see, for instance

# Fix python version in scripts

where I do something like this this for root6. A combination of a for loop, a find and a reinplace does the trick.

@essandess
Copy link
Contributor Author

@cjones051073 Thanks! Fix added.

@macportsbot
Copy link

Travis Build #7248 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

Port ghc's dependencies fail on xcode8.3. Log

The build timed out.

@essandess
Copy link
Contributor Author

essandess commented Jul 12, 2019

@pmetzger This is ready to commit, and is in the critical path of other pending submissions.

I figured out how to modify the build jobs and use thesysctl Function per previous discussion. This will build mod some minor issues. It’s ready when it builds.

@macportsbot
Copy link

Travis Build #7300 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

Port ghc's dependencies fail on xcode8.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #7312 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

The build timed out.

@macportsbot
Copy link

Travis Build #7314 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

The build timed out.

@essandess
Copy link
Contributor Author

This is ready to commit.

lang/ghc/Portfile Outdated Show resolved Hide resolved
lang/ghc/Portfile Outdated Show resolved Hide resolved
lang/ghc/Portfile Outdated Show resolved Hide resolved
lang/ghc/Portfile Outdated Show resolved Hide resolved
lang/ghc/Portfile Outdated Show resolved Hide resolved
lang/ghc/Portfile Outdated Show resolved Hide resolved
@mf2k
Copy link
Contributor

mf2k commented Jul 23, 2019

On the Mojave builder, the error appears to be:

Error: Failed to destroot ghc: can't read "configure.args": no such variable

@mf2k
Copy link
Contributor

mf2k commented Jul 23, 2019

Looking at the output, in the destroot phase it has just executed the system command starting at line 154. But fails somewhere after that. Maybe it doesn't like configure commands/variables in the destroot phase?

@essandess
Copy link
Contributor Author

@mf2k Thanks.

I believe I found the issue: parallel builds during the install phases. The make -j flag is being set implicitly and sometime explicitly in the bootstrap. Sometimes the stars line up and the workers don't conflict, sometimes they conflict and cause existing directory/file errors, as @mojca observed above.

I've been barking up a bunch of wrong trees because of this, assuming this is the fundamental cause. I refactored the Portfile and will try another push.

@essandess
Copy link
Contributor Author

I'm trying to keep use_parallel_build yes for the stage 1 and 2 builds in this latest push, because I'm greedy. If that fails I'll roll back and just do exactly the build commands that the Makefile says should be done. That worked reliably before.

@essandess
Copy link
Contributor Author

The penultimate push builds for me. In the latest push I've moved all bootstrapping phases into a post-build block to address a review comment from @neverpanic above. I believe that will get destrooted correctly from post-build

@macportsbot
Copy link

Travis Build #7429 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

The build timed out.

@macportsbot
Copy link

Travis Build #7431 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

Port ghc's dependencies fail on xcode8.3. Log

The build timed out.

@essandess
Copy link
Contributor Author

@mf2k @pmetzger @neverpanic @mojca @cjones051073

Thanks everyone for your help and comments.

This port is, finally, ready to commit.

@mf2k
Copy link
Contributor

mf2k commented Jul 23, 2019

LGTM!

@essandess
Copy link
Contributor Author

I added test support. I expect/hope this Portfile will also work.

@macportsbot
Copy link

Travis Build #7492 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

The build timed out.

@macportsbot
Copy link

Travis Build #7493 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

The build timed out.

* Download x86_64-apple-darwin version from haskell.org
* Include gpg signature verification
* Bootstrap from source
* Eliminate old patch files, compiler incompatibilities
@macportsbot
Copy link

Travis Build #7506 Errored.

Lint results
--->  Verifying Portfile for ghc
--->  0 errors and 0 warnings found.

Port ghc's dependencies fail on xcode9.4. Log
Port ghc's dependencies fail on xcode8.3. Log

The build timed out.

@essandess
Copy link
Contributor Author

@mf2k @pmetzger @neverpanic @mojca @cjones051073

This Portfile is working great, and there’s no more tests or bells to add.

Would you all please take a look and merge if you agree? It’s in the critical path of a couple other PRs.

@mf2k
Copy link
Contributor

mf2k commented Jul 30, 2019

I was hoping that the maintainer @neverpanic would do that.

@essandess
Copy link
Contributor Author

@neverpanic @mf2k @pmetzger @mojca @cjones051073

This port update works. I’ve had the ghc binaries deployed for well over a month without issue. The previous version is years out of date.

May we please merge or identify any remaining issues?

@essandess
Copy link
Contributor Author

@neverpanic @pmetzger @mojca @cjones051073

Ping. Would one of you please merge or call out any outstanding issues?

@cjones051073
Copy link
Member

Was hoping to hear from @neverpanic but its been long enough now.

@cjones051073 cjones051073 merged commit 2f22825 into macports:master Aug 18, 2019
@essandess essandess deleted the ghc branch August 18, 2019 18:29

name ghc
# Do not update GHC separate from Haskell Platform.
# When updating GHC, make sure to revbump all Haskell ports.
# Also make sure to update the version in the Haskell PortGroup.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments were deleted but it doesn't seem like required actions were documented anywhere else or were rendered unnecessary: I am currently unable to build something with the new ghc because all existing hs-* ports' binaries install for ghc 7.8.3.

What is the intended solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer: open Affects an openmaintainer port type: update
7 participants