Upgrading Pandoc

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading Pandoc

Mark Anderson-10
So I started trying to move pandoc from some older version to 2.1.1 but then I realized I needed to upgrade the Haskell compiler and libraries to do that. I got started, but wow, this is something else. Does anyone have tips about upgrading Haskell? Is there a magic to it or should I just keep slogging along and open a ticket? 

Thanks everyone,
—Mark

P.S. – To anyone who cares, I'm also fixing my own tickets too, and seeing which ones are still real, but that I can do myself. If you have a favorite tesseract ticket, let me know :-)
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Pandoc

Andrew Moore

On Mar 4, 2018, at 2:18 PM, Mark Anderson <[hidden email]> wrote:

So I started trying to move pandoc from some older version to 2.1.1 but then I realized I needed to upgrade the Haskell compiler and libraries to do that. I got started, but wow, this is something else. Does anyone have tips about upgrading Haskell? Is there a magic to it or should I just keep slogging along and open a ticket? 



Attached is a patch to the cryptonite library that's needed by older (pre-2012) computers.  Unfortunately, the patch is incomplete because it disables the rdrand instruction unconditionally.  Upstream has not been notified about the issue, as far as I’m aware… 

If you’re building for an older computer, in order to use the patched library to build pandoc, pandoc’s stack.yaml needs to be updated accordingly.  A sample patch for stack.yaml is also attached.  It assumies that the (patched) cryptonite library is in the root of the pandoc source tree.

Yes, there is a bit too much magic involved.  I started with Haskell Platform “core installer” rather than MacPorts' haskell.  This might be a good starting point for an MacPorts update…
-AM





Thanks everyone,
—Mark

P.S. – To anyone who cares, I'm also fixing my own tickets too, and seeing which ones are still real, but that I can do myself. If you have a favorite tesseract ticket, let me know :-)


cryptonite-v0.24-cbits_cryptonite_rdrand.c.diff (647 bytes) Download Attachment
pandoc-stack.yaml.diff (288 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Pandoc

Ken Cunningham
In reply to this post by Mark Anderson-10
Upgrading haskell looks to be super complicated. Best bet is to work with Clement on it if you have skills for that. Otherwise wait until he has time.

Best, K

Sent from my iPhone

> On Mar 4, 2018, at 11:18 AM, Mark Anderson <[hidden email]> wrote:
>
> So I started trying to move pandoc from some older version to 2.1.1 but then I realized I needed to upgrade the Haskell compiler and libraries to do that. I got started, but wow, this is something else. Does anyone have tips about upgrading Haskell? Is there a magic to it or should I just keep slogging along and open a ticket?
>
> Thanks everyone,
> —Mark
>
> P.S. – To anyone who cares, I'm also fixing my own tickets too, and seeing which ones are still real, but that I can do myself. If you have a favorite tesseract ticket, let me know :-)
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Pandoc

Ryan Schmidt-24
In reply to this post by Mark Anderson-10

On Mar 4, 2018, at 13:18, Mark Anderson wrote:

> So I started trying to move pandoc from some older version to 2.1.1 but then I realized I needed to upgrade the Haskell compiler and libraries to do that. I got started, but wow, this is something else.

You probably already found that we have a ticket for this.

https://trac.macports.org/ticket/48324


Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Pandoc

Clemens Lang-2
In reply to this post by Mark Anderson-10
Hi,

On Sun, Mar 04, 2018 at 02:18:24PM -0500, Mark Anderson wrote:
> So I started trying to move pandoc from some older version to 2.1.1
> but then I realized I needed to upgrade the Haskell compiler and
> libraries to do that. I got started, but wow, this is something else.
> Does anyone have tips about upgrading Haskell?

I'm attaching my current progress as a patch. It should apply cleanly to
the current master.

I didn't package stack. It has way too many dependencies to get this
done without automation, and unless somebody picks up
https://github.com/neverpanic/cabal2port (or re-writes a similar tool
from scratch), that's not happening.

Current state of this patch is that I'd need to commit this together
with a revbump of every haskell port (because otherwise the libraries
installed by these ports link against libraries built against the old
GHC, which will not work). That's probably simple enough, so if you want
to prepare a PR with my changes + the revbumps, that'd be welcome.

Of course, somebody would also have to test build this (or at least some
large and important haskell ports).

> Is there a magic to it or should I just keep slogging along and open a
> ticket?

It's magic, unfortunately. ;-)

--
Clemens

ghc-8.0.1.diff (76K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Pandoc

Mark Anderson-10
Thanks everyone. I hadn't seen that ticket - I've been experimenting with Haskell and boy getting it to run IS magic. Writing a parser, super easy. Compiling it? That's a pain.

—Mark
_______________________
Mark E. Anderson <[hidden email]>

On Wed, Mar 7, 2018 at 6:35 PM, Clemens Lang <[hidden email]> wrote:
Hi,

On Sun, Mar 04, 2018 at 02:18:24PM -0500, Mark Anderson wrote:
> So I started trying to move pandoc from some older version to 2.1.1
> but then I realized I needed to upgrade the Haskell compiler and
> libraries to do that. I got started, but wow, this is something else.
> Does anyone have tips about upgrading Haskell?

I'm attaching my current progress as a patch. It should apply cleanly to
the current master.

I didn't package stack. It has way too many dependencies to get this
done without automation, and unless somebody picks up
https://github.com/neverpanic/cabal2port (or re-writes a similar tool
from scratch), that's not happening.

Current state of this patch is that I'd need to commit this together
with a revbump of every haskell port (because otherwise the libraries
installed by these ports link against libraries built against the old
GHC, which will not work). That's probably simple enough, so if you want
to prepare a PR with my changes + the revbumps, that'd be welcome.

Of course, somebody would also have to test build this (or at least some
large and important haskell ports).

> Is there a magic to it or should I just keep slogging along and open a
> ticket?

It's magic, unfortunately. ;-)

--
Clemens

Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Pandoc

Ryan Schmidt-24
In reply to this post by Clemens Lang-2

On Mar 7, 2018, at 17:35, Clemens Lang wrote:

> I'm attaching my current progress as a patch. It should apply cleanly to
> the current master.

> <ghc-8.0.1.diff>

Just glancing at this, I see that since haskell-platform's version "decreases" from 2014.2.0.0 to 8.0.1, its epoch needs to be increased.