Opened 6 weeks ago

Last modified 6 weeks ago

#74080 assigned defect

pandoc@3.9.0.2 upgrade (build from source) fails; Tahoe 26.5.1 arm64

Reported by: kwolcott Owned by: judaew (Vadym-Valdis Yudaiev)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: essandess (Steve Smith), dershow, hapaguy (Brian Kurt Fujikawa), cooljeanius (Eric Gallager)
Port: pandoc

Description

I don't see the pertinent error(s) in the log file

Attachments (1)

pandoc_upgrade_fails.log.bz2 (11.7 KB) - added by kwolcott 6 weeks ago.

Download all attachments as: .zip

Change History (13)

Changed 6 weeks ago by kwolcott

comment:1 Changed 6 weeks ago by amadeus24

Had same problem. The problem is that pandoc-3.9.0.2 source expects the older typst API. But MacPorts builds with --allow-newer.
That lets Cabal ignore normal upper version bounds and choose newer Hackage packages. Cabal selected:

typst 0.10
typst-symbols 0.2

But pandoc-3.9.0.2 was compatible with:

typst 0.9.0.1
typst-symbols 0.1.9.1

To put it in one sentence, Cabal should not pick newer Typst libraries than pandoc-3.9.0.2 expects.
Created a local Portfile, portindexed it and changed the Portfile.
From:

        build.post_args-append \
                 --allow-newer \

To:

        build.post_args-append \
                 --allow-newer \
                {--constraint=typst==0.9.0.1} \
                {--constraint=typst-symbols==0.1.9.1}

And from:

        destroot.post_args-append \
                 --allow-newer \

To:

        destroot.post_args-append \
                 --allow-newer \
                {--constraint=typst==0.9.0.1} \
                {--constraint=typst-symbols==0.1.9.1}

After those changes, pandoc build successfully.

comment:2 Changed 6 weeks ago by reneeotten (Renee Otten)

Cc: essandess added
Owner: set to judaew
Status: newassigned

comment:3 Changed 6 weeks ago by nilason (Nicklas Larsson)

I also had this problem and the fix by amadeus24 made the trick. Thanks!

comment:4 Changed 6 weeks ago by rswail (Ron Wail)

Wouldn't it be better not to allow newer than what pandoc source specifies?

I'm wading through how to set up a local port build from source, but not sure the pain is worth the reward :)

comment:5 in reply to:  4 Changed 6 weeks ago by essandess (Steve Smith)

Replying to rswail:

Wouldn't it be better not to allow newer than what pandoc source specifies?

It would, except for when adding the --allow-newer flag is needed to get pandoc to build at all. That’s when that flash gets tossed in. I expect simply removing it now has a good chance to fix this current issue, until some other hackage dependency breaks.

Would someone please try that and post a PR without --allow-newer so we don’t have specific version pinning in the Portfile? I only have mobile device ssh right now and am unable to post a PR.

comment:6 Changed 6 weeks ago by dershow

Cc: dershow added

comment:7 Changed 6 weeks ago by hapaguy (Brian Kurt Fujikawa)

Cc: hapaguy added

comment:8 in reply to:  4 ; Changed 6 weeks ago by amadeus24

Replying to rswail:

I'm wading through how to set up a local port build from source, but not sure the pain is worth the reward :)

It' quite simple.
Create first a directory. Let's say something like /opt/local/myports/textproc/pandoc.
You copy the pandoc Portfile in this directory, adjust it & portindex it.
Next you clean pandoc and the install.
Commands in this case would be:

  1. sudo mkdir -p /opt/local/myports/textproc/pandoc
  2. sudo cp $(port file pandoc) /opt/local/myports/textproc/pandoc

or
sudo cp /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/textproc/pandoc/Portfile \ /opt/local/myports/textproc/pandoc

Then edit the copied Portfile with your preferred editor (in this case I use vi):

  1. sudo vi /opt/local/myports/textproc/pandoc/Portfile

Make your changes in the Portfile, followed by portindex since port should know which Portfile should be used:

  1. cd /opt/local/myports/ && sudo portindex
  2. As next you install pandoc, while port will now use the changed Portfile in /opt/local/myports/. But first you should check if the new Portfile is considered by port.

port file pandoc -> this should now show /opt/local/myports/textproc/pandoc/Portfile

  1. Now clean pandoc and install:

sudo port clean --all pandoc
sudo port -v install pandoc

  1. After successful install removing the changed Portfile, portindexing and checking if the upstream Portfile is active again:

sudo rm -r /opt/local/myports/textproc/pandoc
cd /opt/local/myports && sudo portindex
port file pandoc -> Now you should see:
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/textproc/pandoc/Portfile

Last edited 6 weeks ago by amadeus24 (previous) (diff)

comment:9 Changed 6 weeks ago by amadeus24

Anyway, with the new version pandoc@3.10_0 build is successful. Thanks a lot to the maintainers!

comment:10 in reply to:  8 Changed 6 weeks ago by rswail (Ron Wail)

Replying to amadeus24:

Thanks for the instructions, I got most of the way and didn't actually see the portfile commands... doh!

I'll remember for next time!

comment:11 in reply to:  9 Changed 6 weeks ago by rswail (Ron Wail)

Replying to amadeus24:

Anyway, with the new version pandoc@3.10_0 build is successful. Thanks a lot to the maintainers!

Ditto! Talk about responsive, thanks people.

comment:12 Changed 6 weeks ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.