| Summary: | haskell-cabal.eclass (ghc) should allow to build non-dynamic executable | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Peter Valach <pvalach> |
| Component: | Eclasses | Assignee: | Gentoo's Haskell Language team <haskell> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | jstein |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Peter Valach
2018-06-18 12:23:47 UTC
haskell-cabal.eclass has CABAL_EXTRA_CONFIGURE_FLAGS variable (also has a 'man haskell-cabal.eclass' entry).
You can add
CABAL_EXTRA_CONFIGURE_FLAGS=--disable-executable-dynamic
to make.conf (or use it through package.env)
$ CABAL_EXTRA_CONFIGURE_FLAGS=--disable-executable-dynamic ebuild darcs-2.14.0.ebuild clean install
$ ldd /tmp/portage/dev-vcs/darcs-2.14.0/image/usr/bin/darcs
linux-vdso.so.1 (0x00007ffc9cbe6000)
libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007fc73948d000)
libz.so.1 => /lib64/libz.so.1 (0x00007fc739276000)
libncursesw.so.6 => /lib64/libncursesw.so.6 (0x00007fc739008000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc738de8000)
librt.so.1 => /lib64/librt.so.1 (0x00007fc738be0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fc7389dc000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fc738765000)
libm.so.6 => /lib64/libm.so.6 (0x00007fc7383d4000)
libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007fc7381cb000)
libc.so.6 => /lib64/libc.so.6 (0x00007fc737e02000)
libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007fc737b94000)
libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007fc73775a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc7396fe000)
Is it good enough?
Note: you will have to sort out transitive closure of dynamic non-haskell depends on your own.
Disabling shared libraries completely is harder as template-haskell support really needs dynamic libraries if ghc itself is linked dynamically (default in gentoo).
I didn't think "conflicting" configure flags are possible, but obviously the last one has priority, so your suggestion works and does what I need; thank you very much and sorry for wasting your time. I close this as resolved/invalid, if some other status should be used please update it :). INVALID status is fine. In gentoo EXTRA* variables are for users to override default (eclass/ebuild) behaviour. EXTRA* are never supposed to be set by ebuilds directly and always available for users. Perhaps we should advertise it a bit more in 'man haskell-cabal.eclass' with more useful examples. Examples I modelled after are EXTRA_ECONF (-> CABAL_EXTRA_CONFIGURE_FLAGS) and EXTRA_EMAKE (-> CABAL_EXTRA_BUILD_FLAGS). |