Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vmchale opened this issue May 12, 2024 · 3 comments

Comments

@vmchale
Copy link
Contributor

vmchale commented May 12, 2024

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)
@ffaf1
Copy link
Collaborator

ffaf1 commented May 12, 2024

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

@ffaf1
Copy link
Collaborator

ffaf1 commented May 12, 2024

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
Copy link
Collaborator

ffaf1 commented May 23, 2024

@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 ffaf1 closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants