Bug 262083

Summary: lang/twelf: Fix build with modern lang/mlton version. Fix build on FreeBSD 12,13
Product: Ports & Packages Reporter: Timothy Beyer <beyert>
Component: Individual Port(s)Assignee: Li-Wen Hsu <lwhsu>
Status: Open ---    
Severity: Affects Many People CC: beyert, lwhsu
Priority: --- Keywords: needs-qa
Version: LatestFlags: beyert: maintainer-feedback+
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261820
Bug Depends on: 261820    
Bug Blocks:    
Attachments:
Description Flags
[PATCH] fix build of lang/twelf with modern lang/mlton versions, adding mlton mlb build files from svn, use svnliteversion in base system, add LIB_DEPENDS, fix portlint warnings
none
[PATCH] fix build of lang/twelf and confirm working with poudriere
beyert: maintainer-approval+
[PATCH] fix build of lang/twelf and confirm working with poudriere beyert: maintainer-approval+

Description Timothy Beyer 2022-02-21 05:09:31 UTC
Created attachment 231980 [details]
[PATCH] fix build of lang/twelf with modern lang/mlton versions,  adding mlton mlb build files from svn, use svnliteversion in base system, add  LIB_DEPENDS, fix portlint warnings

This patch makes the following changes:

  *  Fixes build of lang/twelf, both on modern versions of FreeBSD (see next point), but also with modern versions of lang/mlton

  *  Unbreak port for modern FreeBSD versions such as 12, 13, and likely 14

  *  Bring in mlb files from SVN to get this version to build with modern mlton versions

  *  update LIB_DEPENDS with new dependencies (tested with empty build on FreeBSD 13 amd64 bhyve VM)

  *  address missing executable svnversion on some machines (patches build system to use base system svnliteversion instead, in case this is needed later)

  *  address portlint warnings

Much like lang/urweb, lang/twelf may require PR #261820 to be applied, at least for i386 and FreeBSD 14 to work:

I strongly recommend to apply the patch from PR #261820 "lang/mlton: Maintainer potential fix for build on FreeBSD 14, potential fix for i386 (all versions)", where I am also the maintainer, as this should resolve issues with building the build dependency mlton on i386 as well as FreeBSD 14:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261820
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-02-22 00:32:33 UTC
^Triage: If any issue patch *requires* another issue/patch to be committed first, please add all dependent issue ID's to this issues "Depends On" field.

It is difficult to understand the nature of these multiple changes, particularly with "may require" and "potential fix" language.

Explicit and specific clarity on the nature of the dependencies between these multilke issues would be greatly appreciated, along with confirmation that all changes for all relevent ports also pass tests when applied together.
Comment 2 Timothy Beyer 2022-02-22 02:52:50 UTC
(In reply to Kubilay Kocak from comment #1)

Point taken about the Depends on field, I set "Depends on" just now, and will set that field going forward.

My apologies about the imprecise language.

In both cases, when I say "may require" and "potential fix", I mean that since lang/twelf has BUILD_DEPENDS on lang/mlton, i386 for any version and FreeBSD 14 won't build packages on the build servers, since mlton won't be available at least on the build servers, this port will also not have packages until that is resolved.

I mean "may require" is that if you are on amd64 FreeBSD 12 and 13, then it will work fine, but for i386 or FreeBSD 14 (it needs a matching bootstrap compiler, which I haven't had a chance to make yet, but most likely a FreeBSD 13 bootstrap compiler will work, I just don't know for sure since I need to make a 14 VM), then this port will be much harder to install until that issue is resolved.

I say "potential fix" for i386 because I cannot easily reproduce the exact memory or addressing conditions of the build servers, but I know that even before this change, it narrowly completed by builds on i386 for my bhyve VMs, but I think it is well worth trying my patch to lang/mlton (I can test in poudriere if needed, but I think the exact conditions on the hardware are a more  significant factor than just using a vanilla bhyve VM with nothing else installed).
Comment 3 Timothy Beyer 2022-05-17 04:28:28 UTC
Created attachment 233982 [details]
[PATCH] fix build of lang/twelf and confirm working with poudriere

As with my updated and corrected patch to lang/mlton, here is a revised patch that is built on poudriere in numerous configurations.  I'm not sure if it is any different from what I already submitted, but the patch to lang/mlton is significantly more robust than previously, so I would recommend getting it committed very soon.

To clarify, I am the maintainer of both this port and lang/mlton.
Comment 4 Timothy Beyer 2022-05-17 04:52:42 UTC
Created attachment 233987 [details]
[PATCH] fix build of lang/twelf and confirm working with poudriere

fix subject in patch, but otherwise identical