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

list-bin lists wrong binary for versioned dynamic foreign libraries #10763

Open
dmwit opened this issue Jan 19, 2025 · 0 comments
Open

list-bin lists wrong binary for versioned dynamic foreign libraries #10763

dmwit opened this issue Jan 19, 2025 · 0 comments

Comments

@dmwit
Copy link
Collaborator

dmwit commented Jan 19, 2025

If you create a foreign-library stanza with type: native-shared and a lib-version-info field, cabal will create a library with a version number in its name, but tell you about a non-existent unversioned name. Typical example, with both commands executed after running cabal build all:

% cabal list-bin poll_stdin
.../dist-newstyle/build/x86_64-linux/ghc-9.8.1/dasyuridia-0.1.0.0/f/poll_stdin/build/poll_stdin/libpoll_stdin.so
% ls dist-newstyle/build/x86_64-linux/ghc-9.8.1/dasyuridia-0.1.0.0/f/poll_stdin/build/poll_stdin
autogen  poll_stdin-tmp  libpoll_stdin.so.0.0.0

Two plausible solutions are to change list-bin (to include the version number in the reported file name) or to change build (to create an unversioned link to the versioned file); I don't really know enough to be clear on the tradeoffs between them.

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

1 participant