Opened 6 months ago

Last modified 6 months ago

#8414 new bug

ghc-pkg prevents dynamic library only packages

Reported by: AndreasVoellmy Owned by:
Priority: normal Milestone:
Component: ghc-pkg Version:
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

GHC supports compiling Haskell libraries as dynamic libraries and building executables against dynamic libraries. GHCi seems to support loading modules from dynamic libraries, too. So it would seem that it should be possible to have packages that only include dynamic libraries, omitting the .a and .o files typically generated.

cabal-install allows building dynamic libraries only, for example with the command "cabal install --disable-library-vanilla --enable-shared --disable-library-profiling". However, ghc-pkg register refuses to install the package without the .a files present. This seems to be a bug with ghc-pkg.

Change History (1)

comment:1 Changed 6 months ago by AndreasVoellmy

I can provide a patch to ghc-pkg to change how it validates packages. However, before I do this, I would like someone to verify that a dynamic-library only package is reasonable and should be allowed. Things seem to work correctly for me if I allow it, but maybe I just got lucky on my platform.

Note: See TracTickets for help on using tickets.