You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m migrating several MacPorts Haskell builds from stack to cabal to get native arm64 binaries linked to MacPorts libraries.
I observe that cabal version 3.8.1.0 compiles a temporary build path for datadir from store-dir into alex, happy, other binaries it compiles. This breaks projects for which datadir is required.
I’ve tried many different approaches to setting datadir To the correct, permanent location, but none of these methods work:
Because these tools are necessary to bootstrap and use Haskell world, I’ve thrown in the towel and just used an ugly hack of replacing this incorrect path in the binary with the correct path padded with extraneous /‘s. See: macports/macports-ports#16154
How can cabal compile a project like alex from source and set the correct datadir?
The linked ticket cross-links to a large other number of related issues. I really do think we should tackle this for the next cabal release. The problem is I'm not sure what the right design to implement is! If someone wants to propose the exact semantics (perhaps with more flags) that cabal implement, this seems tractable and worthwhile.
The linked ticket cross-links to a large other number of related issues. I really do think we should tackle this for the next cabal release. The problem is I'm not sure what the right design to implement is! If someone wants to propose the exact semantics (perhaps with more flags) that cabal implement, this seems tractable and worthwhile.
Thanks you—that would be much appreciated. I’ve discovered that the slash hack doesn’t work on arm architectures, and even this hack doesn’t provide a viable alternative on that platform. See macports/macports-ports#16228.
Could anybody kindly verify using master branch (or cabal 3.10 when it gets released)? Let me close, but please open a new ticket if problems still occur.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I’m migrating several MacPorts Haskell builds from
stack
tocabal
to get nativearm64
binaries linked to MacPorts libraries.I observe that
cabal
version 3.8.1.0 compiles a temporary build path fordatadir
fromstore-dir
intoalex
,happy
, other binaries it compiles. This breaks projects for whichdatadir
is required.I’ve tried many different approaches to setting
datadir
To the correct, permanent location, but none of these methods work:datadir: …
in theconfig
file: https://github.com/macports/macports-ports/blob/69b89680a5f48245784b8376241f948bbd40a1c6/_resources/port1.0/group/haskell_cabal-1.0.tcl#L105--datadir=…
in the command linePaths_alex.hs
that specifiesdatadir = …
--enable-relocatable
flagBecause these tools are necessary to bootstrap and use Haskell world, I’ve thrown in the towel and just used an ugly hack of replacing this incorrect path in the binary with the correct path padded with extraneous
/
‘s. See: macports/macports-ports#16154How can
cabal
compile a project likealex
from source and set the correctdatadir
?Likely related: #3586
To Reproduce
Compile
cabal build
/install
ofalex
,happy
, and so forth.System information
cabal
3.8.1.0,ghc
9.4.2Additional context
MacPorts build commands:
The text was updated successfully, but these errors were encountered: