https://bugzilla.redhat.com/show_bug.cgi?id=863499
--- Comment #2 from Lakshmi Narasimhan lakshminaras2002@gmail.com --- The rpath information in leksah starts with /builddir/build/BUILD/leksah-0.12.1.3/dist/build and hence the "library not found" error.
leksah exports modules in a library package and this package is in turn listed as a dependency for the executable. If we use --shared option, this exported package becomes a shared library dependency for leksah binary. Before 7.4.1, I patched leksah to remove the library as a dependency. This was done to solve an issue that occurred while running haddock after build ( http://hackage.haskell.org/trac/hackage/ticket/656 ). The issue got fixed in 7.4.1 and I removed the patch.
This "library not found" issue could have been there before but never surfaced because of the patch. I checked that putting the patch back again removes libHSleksah-0.12.1.3-ghc7.4.1.so as a dependency of leksah binary and the issue is fixed.