cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Cabal 3.12 objects to building foreign libraries on Mac where Cabal 3.10 worked.

Open vmchale opened this issue 1 year ago • 3 comments

Describe the bug

Cabal 3.12 fails to build foreign libraries, objecting because I specify lib-version-info:

Configuring foreign library 'apple' for apple-0.1.0.0...
Error: [Cabal-4574]
Cannot build some foreign libraries: Foreign library versioning not currently supported on OSX

Error: [Cabal-7125]
Failed to build flib:apple from apple-0.1.0.0. The failure occurred during the configure step.

Cabal 3.10 would simply go ahead. I can build successfully if I remove the lib-version-info from the stanza

To Reproduce

My apple repo has a foreign library:

cabal build flib:apple

Expected behavior

Ideally it would work, including foreign library version info. Failing that, it should be a warning that library version info is not supported on Mac, without actually failing the configure step. That way I could keep lib-version-info for Linux.

System information

  • OSX
  • Cabal 3.12 and 3.10
  • GHC 9.8 (and 9.10)

vmchale avatar May 12 '24 15:05 vmchale

I wonder whether it is an unintended consequence of 54183f2353dfa730d86e1503abc792f49f85c586 #9555 @sheaf

ffaf1 avatar May 12 '24 16:05 ffaf1

Hello @vmchale

Failing that, it should be a warning that library version info is not supported on Mac, without actually failing the configure step. That way I could keep lib-version-info for Linux.

Let us see what other people have to say, I am personally wonder if a warning is strict enough. Meanwhile, would

if os(linux)

or similar work?

ffaf1 avatar May 12 '24 19:05 ffaf1

@vmchale and other MacOS users, do you think using conditionals is enough? If so I would close this, as the warning seems reasonable (indeed lib-version-info is not supported on OSX).

ffaf1 avatar May 23 '24 17:05 ffaf1