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

pandoc-1.16.0.2 test suite fails when compiling with shared executables enabled #2709

Closed
peti opened this issue Feb 12, 2016 · 8 comments
Closed

Comments

@peti
Copy link

peti commented Feb 12, 2016

We see the following errors during the build when compiling with Nix and GHC 7.10.3 on Linux:

Running 1 test suites...
Test suite test-pandoc: RUNNING...
/tmp/nix-build-pandoc-1.16.0.2.drv-0/pandoc-1.16.0.2/dist/build/pandoc/pandoc: error while loading shared libraries: libHSpandoc-1.16.0.2-62DUPRWXdeYC7y2x3V2yux-ghc7.10.3.so: cannot open shared object file: No such file or directory
@jgm
Copy link
Owner

jgm commented Feb 12, 2016

Can you give me the stack incantation to compile with
shared libraries?

+++ Peter Simons [Feb 12 16 11:54 ]:

We see the following errors during the build when compiling with Nix
and GHC 7.10.3 on Linux:
Running 1 test suites...
Test suite test-pandoc: RUNNING...
/tmp/nix-build-pandoc-1.16.0.2.drv-0/pandoc-1.16.0.2/dist/build/pandoc/pandoc: e
rror while loading shared libraries: libHSpandoc-1.16.0.2-62DUPRWXdeYC7y2x3V2yux
-ghc7.10.3.so: cannot open shared object file: No such file or directory


Reply to this email directly or [1]view it on GitHub.

References

  1. pandoc-1.16.0.2 test suite fails when compiling with shared executables enabled #2709

@peti
Copy link
Author

peti commented Feb 12, 2016 via email

@juhp
Copy link
Contributor

juhp commented Apr 4, 2016

(It might be a good stack RFE.)

@peti
Copy link
Author

peti commented Apr 25, 2016

Has there been any progress fixing this issue?

@jgm
Copy link
Owner

jgm commented Apr 25, 2016

No. I have never done anything with shared libraries in Haskell. If someone wants to help give me the stack incantation to compile with shared libraries, I could look into it further. But this isn't a high enough personal priority for me to work on without some help from someone for whom it matters.

@RyanGlScott
Copy link
Contributor

Based off of the build output from http://hydra.cryp.to/build/1671146/nixlog/2/raw, I managed to reproduce the error using cabal-install:

$ cabal get pandoc                                      
Unpacking to pandoc-1.17.1/                                                               
$ cd pandoc-1.17.1/
$ cabal install --only-dependencies
$ cabal configure --enable-executable-dynamic
$ cabal build
$ dist/build/pandoc/pandoc --help
dist/build/pandoc/pandoc: error while loading shared libraries: libHSpandoc-1.17.1-55fbhFDS4m8AKo7bzCoEJA-ghc8.0.1.so: cannot open shared object file: No such file or directory

So it's not really the test suite that's failing, just the fact that it invokes the failing pandoc executable.

stack doesn't have an --enable-executable-dynamic flag AFAICT, so I'm not sure how to reproduce the issue with stack.

@jgm
Copy link
Owner

jgm commented Jun 17, 2016

I think the problem is clear. The test suite runs the
executable from the build directory. Since the shared
library hasn't been installed yet (and shouldn't be
prior to testing!), the executable can't find it when it
needs to load it.

We could probably fix this by having the test suite set
the shared library load path in the environment when
it calls 'pandoc'. DYLD_LIBRARY_PATH or
DYLD_FALLBACK_LIBRARY_PATH on OSX, LD_LIBRARY_PATH on linux.

+++ Ryan Scott [Jun 17 16 06:57 ]:

Based off of the build output from
[1]http://hydra.cryp.to/build/1671146/nixlog/2/raw, I managed to
reproduce the error using cabal-install:
$ cabal get pandoc
Unpacking to pandoc-1.17.1/

$ cd pandoc-1.17.1/
$ cabal install --only-dependencies
$ cabal configure --enable-executable-dynamic
$ cabal build
$ dist/build/pandoc/pandoc --help
dist/build/pandoc/pandoc: error while loading shared libraries: libHSpandoc-1.17
.1-55fbhFDS4m8AKo7bzCoEJA-ghc8.0.1.so: cannot open shared object file: No such f
ile or directory

So it's not really the test suite that's failing, just the fact that it
invokes the failing pandoc executable.

stack doesn't have an --enable-executable-dynamic flag AFAICT, so I'm
not sure how to reproduce the issue with stack.


You are receiving this because you commented.
Reply to this email directly, [2]view it on GitHub, or [3]mute the
thread.

References

  1. http://hydra.cryp.to/build/1671146/nixlog/2/raw
  2. pandoc-1.16.0.2 test suite fails when compiling with shared executables enabled #2709 (comment)
  3. https://github.com/notifications/unsubscribe/AAAL5G_KguxiEg8rlJ2VvXWNWx-NYhD0ks5qMqfegaJpZM4HZVrB

@jgm
Copy link
Owner

jgm commented Jun 17, 2016

PS. the relevant changes would be in tests/Tests/Old.hs
line 264. The only difficulty is in determining where
the dynamic library is to be found.

@jgm jgm closed this as completed in 65c0e52 Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants