#68488 closed defect (fixed)

mlton on 10.6 x86_64 tries to build for 32 bit (and fails on linking)

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: snowleopard, x86_64 Cc:
Port: mlton

Change History (3)

comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Indeed, it is using the -m32 flag, which is probably a result of the erroneous assumption that the output of uname -m is the desired userland architecture. On macOS, it's the kernel architecture, and on some x86_64 machines running Mac OS X 10.6 the kernel is 32-bit, which is of course not a problem at all for running 64-bit userland programs.

https://github.com/MLton/mlton/blob/92137753df8c003e0628bf10a676eef492fe47b3/bin/platform#L73-L75
https://github.com/MLton/mlton/blob/92137753df8c003e0628bf10a676eef492fe47b3/bin/platform#L146-L148
https://github.com/MLton/mlton/blob/92137753df8c003e0628bf10a676eef492fe47b3/runtime/Makefile#L105-L107

While that's a bug that could be reported upstream if they care to fix their assumptions about ancient versions of macOS, for MacPorts we should fix the Portfile so that it does not allow the build system to make assumptions; MacPorts should dictate to the build system what architecture to build for, since the user may wish to override it by setting build_arch in macports.conf.

comment:2 in reply to:  1 Changed 13 months ago by barracuda156

Replying to ryandesign:

Yeah, I can just add a conditional fix for x86_64. The issue was mentioned to upstream, the response: https://github.com/MLton/mlton/issues/502#issuecomment-1650010095

comment:3 Changed 10 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 425ca72f0905176d0bdf17d2d8d4131e02924a2d/macports-ports (master):

mlton: update to 20240119, fix older Intel builds

Fixes: #68488
Closes: #40022

Note: See TracTickets for help on using tickets.