Opened 4 years ago
Closed 4 years ago
#61263 closed defect (fixed)
Linking errors in multiple haskell ports
Reported by: | nickgaya (Nick Gaya) | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | essandess (Steve Smith) | |
Port: | hs-alex hs-cabal-install hs-happy hs-hscolour |
Description
When upgrading haskell-platform, macports detected linking errors for several ports.
hs-alex @3.1.3 hs-cabal-install @1.18.0.5 hs-happy @1.19.4 hs-hscolour @1.20.3
Rebuilding with port rev-upgrade
failed to fix the errors.
Actually there seem to be two levels of errors.
- The pre-built ports from packages.macports.org have linking errors
- Rebuilding each port fails for various reasons (see attached build logs)
- hs-alex and hs-happy fail during the configure stage due to a Haskell "Variable not in scope" error for
rawSystemProgramConf
- hs-cabal-install fails during the configure stage with a Haskell "Encountered missing or private dependencies" message
- hs-hscolour fails during the build stage with an iconv linking error
- hs-alex and hs-happy fail during the configure stage due to a Haskell "Variable not in scope" error for
Possibly related: https://github.com/macports/macports-ports/pull/8523
My computer is running macOS 10.13.16 17G14033. I have libiconv @1.16_1 installed.
Attachments (4)
Change History (19)
Changed 4 years ago by nickgaya (Nick Gaya)
Attachment: | hs-alex.log added |
---|
Changed 4 years ago by nickgaya (Nick Gaya)
Attachment: | hs-cabal-install.log added |
---|
hs-cabal-install build log
Changed 4 years ago by nickgaya (Nick Gaya)
Attachment: | hs-hscolour.log added |
---|
hs-hscolour build log
comment:1 Changed 4 years ago by essandess (Steve Smith)
The hs-*
ports are broken and obsolete and should be deleted.
comment:2 follow-up: 4 Changed 4 years ago by nickgaya (Nick Gaya)
Is there a recommended replacement for haskell-platform
? I know very little about the Haskell ecosystem.
comment:3 Changed 4 years ago by kencu (Ken)
they appear to have pretty much removed haskell-platform.
I just cabal install XYZ
whatever I want to install.
comment:4 Changed 4 years ago by essandess (Steve Smith)
Replying to nickgaya:
Is there a recommended replacement for
haskell-platform
? I know very little about the Haskell ecosystem.
Yes, use stack
or cabal
. For example, see the ports alex
, happy
, hscolour
, and so forth.
There may be edge case reasons for resurrecting specific Haskell libraries in the Haskell platform to use with ghc
, but for the most part this approach is very fragile and difficult to maintain. This is why everyone uses stack
and/or cabal
.
comment:5 Changed 4 years ago by nickgaya (Nick Gaya)
Looking around haskell.org I found a couple of bits of information.
- https://www.haskell.org/platform/contents.html
However, from 8.8 onwards, the platform has moved to core-only-installers, as the current best practices for managing packages have shifted to "nixlike-sandboxed" rather than global installs.
- https://www.haskell.org/platform/mac.html#osx
The recommended way to install the components of the mac platform is using ghcup to install ghc and cabal-install, and following the instructions at haskellstack.org to install stack.
Based on this, what do you think about changing the haskell-platform
port to be a "virtual package" with dependencies on ghc
, cabal
, and stack
? I'm not sure whether having a port that only exists as a collection of dependencies goes against the design philosophy of MacPorts. Another suggestion is for haskell-platform
to be a no-op with a notice suggesting that users install the aforementioned three ports. For a point of comparison, see: https://github.com/Homebrew/homebrew-cask/pull/47908
Since the hs-*
ports are unsupported/broken, they should definitely get cleaned up too. Has there been any progress on that since https://github.com/macports/macports-ports/pull/5050 was closed in April? I may be able to help with some of the busy-work if someone can advise me on what steps are needed. I haven't been able to find documentation for how port deprecation/deletion works in MacPorts. Maybe the broken ports could be replaced with a placeholder message advising users to use cabal/stack to install Haskell packages instead?
comment:6 Changed 4 years ago by kencu (Ken)
I think haskell-platform is now dead, as you point out (and as I pointed out above you). So just delete it, and any remaining hs-* ports. Not sure exactly what we're waiting for, TBH.
comment:7 Changed 4 years ago by nickgaya (Nick Gaya)
Based on the links, the "Haskell platform" in the sense of "Haskell with batteries included" still exists, but without the globally-installed packages.
comment:8 Changed 4 years ago by kencu (Ken)
As you said (and as I read) the "platform" of installed "ports" no longer exists for current ghc:
However, from 8.8 onwards, the platform has moved to core-only-installers, as the current best practices for managing packages have shifted to "nixlike-sandboxed" rather than global installs.
ghc / stack / cabal are the way to go, as we all keep saying.
comment:9 Changed 4 years ago by neverpanic (Clemens Lang)
We should just outright delete haskell-platform and all hs-* ports.
The only reason why I haven't done it, is that we need to check which of the ports are still referenced from other Portfiles (hopefully none), and what to do about them.
There's little point in making haskell-platform an alias for a combination of (ghc, cabal, stack), because by definition (see https://www.haskell.org/platform/contents.html), haskell-platform is ghc + a number of tools + a number of libraries. It does not make sense for us to offer a haskell-platform port that does not install this set of tools and libraries (which we wouldn't be doing, if we only added dependencies on cabal and stack).
There's also little point in keeping the ports around and marking them as deleted or obsolete, since as you know, they can currently not be installed, so there can't be any users that still have them installed, and those users on old systems that actually still have a copy would likely rather keep their working copy rather than being upgraded to a notice that says "these files are now all gone".
Help is very welcome in opening a PR that will just delete all hs-* ports.
comment:10 Changed 4 years ago by neverpanic (Clemens Lang)
Deleting haskell-platform and all hs-* ports would currently break hedgewars, hsshellscript, distract and buddha. Suggestions on fixing those (e.g. by using stack) or figuring out whether those ports are no longer relevant and should also be deleted are welcome.
comment:11 Changed 4 years ago by neverpanic (Clemens Lang)
Help wanted here: https://github.com/macports/macports-ports/pull/8636
comment:12 follow-up: 13 Changed 4 years ago by kencu (Ken)
hedgewars does use haskell in a couple of places. I see it's been updated to 1.0.0; perhaps it incorporates the newer ghc build mechanisms now. I'll have to see.
comment:13 Changed 4 years ago by neverpanic (Clemens Lang)
Replying to kencu:
hedgewars does use haskell in a couple of places. I see it's been updated to 1.0.0; perhaps it incorporates the newer ghc build mechanisms now. I'll have to see.
Thanks. I've tried getting it to build with fpc instead of the bundled pascal-to-C converter written in Haskell to just avoid the dependency completely, but after an hour, internal compiler errors of fpc and linking errors with lua, I just had to cut my losses on how much time I invest into this.
comment:14 Changed 4 years ago by neverpanic (Clemens Lang)
comment:15 Changed 4 years ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
hs-alex build log