effectfully_ 2017-03-01 20:47:55
Anybody?..
markh 2017-03-01 20:48:20
?
ezyang 2017-03-01 20:48:28
try http://stackoverflow.com/questions/38863005/how-do-i-get-stack-to-use-dynamic-linking maybe
effectfully_ 2017-03-01 20:49:38
markh: `stack build` says "Warning: needs to be a dynamically linked executable; please pass --enable-executable-dynamic to 'cabal install'.". What should I do?
effectfully_ 2017-03-01 20:49:49
ezyang: I tried, but it doesn't seem to work
effectfully_ 2017-03-01 20:49:59
I'm getting the same warning
markh 2017-03-01 20:50:06
have you tried cabal install --enable-executable-dynamic
effectfully_ 2017-03-01 20:50:54
markh: I use Stack and this is Stack that tells me to do something with Cabal, which I have no idea what means
ezyang 2017-03-01 20:50:57
don't do that, he's using stack
ezyang 2017-03-01 20:51:14
effectfully_: Which ghc-options did you add it to
effectfully_ 2017-03-01 20:51:56
ghc-options: -W -dynamic
ezyang 2017-03-01 20:52:26
yes but which cabal file did ou add it to
ezyang 2017-03-01 20:52:31
did you add it to the executable
effectfully_ 2017-03-01 20:52:43
yes
ezyang 2017-03-01 20:53:03
does the executable work or not
effectfully_ 2017-03-01 20:53:38
it worked when I manually copied the library it needs
ezyang 2017-03-01 20:54:13
see, with cabal-install, I know --enable-executable-dynamic will do the right thing
effectfully_ 2017-03-01 20:54:25
but the library is generated dynamically
ezyang 2017-03-01 20:54:31
maybe you are using https://github.com/commercialhaskell/stack/issues/1691
ezyang 2017-03-01 20:54:34
*hitting
ezyang 2017-03-01 20:54:51
Are you saying that stack is not setting an rpath
effectfully_ 2017-03-01 20:55:45
yes, I know that cabal is able to do what I want, but I have other problems with cabal
ezyang 2017-03-01 20:56:16
effectfully_: Have you tried using new-build?
ezyang 2017-03-01 20:56:24
What do you mean by copy the library?
effectfully_ 2017-03-01 20:56:39
"is not setting an rpath" -- sorry, I don't understand
effectfully_ 2017-03-01 20:57:03
no, I haven't tried, thanks for linking the issue
ezyang 2017-03-01 20:57:20
"What do you mean by copy the library?"
effectfully_ 2017-03-01 20:57:34
there are several packages, one of them generates a library, the other requires that library
effectfully_ 2017-03-01 20:57:57
I see the error, manually copy the generated library to be on $PATH
effectfully_ 2017-03-01 20:58:00
and things work
ezyang 2017-03-01 20:58:31
...PATH or LD_LIBRARY_PATH
ezyang 2017-03-01 20:58:33
are you on Windows?
effectfully_ 2017-03-01 20:58:44
no, Ubuntu
ezyang 2017-03-01 20:58:55
and what is "the error"
effectfully_ 2017-03-01 20:59:02
just $PATH, I think
effectfully_ 2017-03-01 20:59:59
I meant the warning, sorry, the one that I posted previously, then comes an error, but it just says that a library is not found essentially
effectfully_ 2017-03-01 21:00:13
*the library
ezyang 2017-03-01 21:01:27
the specific error message is kind of important; but anyway, I think I know what's going on
effectfully_ 2017-03-01 21:02:01
ezyang: the error is "[1 of 1] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/qtah-examples/qtah-examples-tmp/Main.o ) /home/roman/code/qtah/qtah-examples/src/Main.hs:33:1: error: Failed to load interface for 'Graphics.UI.Qtah.Widgets.QGraphicsView'"
effectfully_ 2017-03-01 21:02:07
but I don't think it's important
ezyang 2017-03-01 21:02:18
that looks important...
effectfully_ 2017-03-01 21:02:26
sorry then
Guest16373 2017-03-01 21:02:28
OverloadedLabels example code not work: http://dev.stephendiehl.com/hask/#overloadedlabels
ezyang 2017-03-01 21:02:50
OK, now I am confused
ezyang 2017-03-01 21:03:03
"Failed to load interface" error has nothing to do with dynamic library loading
Theophane 2017-03-01 21:03:21
hey raichoo o/
effectfully_ 2017-03-01 21:03:28
that interface is what I added to the library against which the executable meant to be built
ezyang 2017-03-01 21:04:00
did you forget to add the module to other-modules/exposed-modules?
effectfully_ 2017-03-01 21:04:19
ouch
effectfully_ 2017-03-01 21:04:24
I might
effectfully_ 2017-03-01 21:04:32
that would be really stupid
ezyang 2017-03-01 21:05:10
erm, it's not a stupid mistake
ezyang 2017-03-01 21:05:35
just dumb tools :) (Cabal library problem)
ezyang 2017-03-01 21:05:40
we even have a bug for it...
effectfully_ 2017-03-01 21:08:25
ezyang: OK, I forgot to add the module to .cabal, thank you very much, I'll fix that, but why does stack still gives me a warning about --enable-executable-dynamic?
ezyang 2017-03-01 21:09:06
well, probably because putting -dynamic in ghc-options is a hack
ezyang 2017-03-01 21:09:15
and the build system really ought to be informed about this sort of thing
effectfully_ 2017-03-01 21:09:20
I see
ezyang 2017-03-01 21:09:30
like, what if it decided not to actually build the dynamic libraries
raichoo 2017-03-01 21:12:22
Theophane: hey o/
effectfully_ 2017-03-01 21:14:50
yeah, I added all forgotten entries to .cabal and everything builds alright now. Thanks, ezyang
ezyang 2017-03-01 21:17:50
great!
ezyang 2017-03-01 21:18:04
and may this be a lesson to copy paste error messages :)
effectfully_ 2017-03-01 21:18:19
lesson learned
ezyang 2017-03-01 21:21:23
I guess the original error message is coming from a Setup script or something
ezyang 2017-03-01 21:21:31
cuz that error string doesn't grep for anything in Cabal codebase