Closed drewboardman closed 4 years ago
Does cabal repl test/src/myPackage/Tests/DB/XX/Thing.hs
work?
You can also try to execute hie --debug test/src
in the project root and link the logs here for debugging.
No such file or directory `cc'
Perhaps that's the problem? I'd try get a C compiler in your environment
I'm running in an impure shell and have /usr/bin/cc
.
Does
cabal repl test/src/myPackage/Tests/DB/XX/Thing.hs
work? You can also try to executehie --debug test/src
in the project root and link the logs here for debugging.
So running cabal v2-repl test/src/myPackage/Tests/DB/XX/Thing.hs
creates an identical error.
$ (nix-shell) > hie --debug "test/src"
Invalid argument `test/src'
Any ideas on the args that this wants?
I found the issue, and it has to do with arch and linking.
https://wiki.archlinux.org/index.php/Haskell#Problems_with_linking
To anyone running into this in the future, add this to your cabal config
# ~/.cabal/config
library-vanilla: False
shared: True
executable-dynamic: True
ghc-options:
-dynamic
Quoting @fendor from previous discussion thread https://github.com/mpickering/hie-bios/issues/102#issuecomment-579820614:
You can try to install the executable from this project with cabal install exe:hie-bios and then execute
hie-bios debug <path to test file>
and see if this succeeds. Additionally, you can usehie-bios check <path to test file>
which tries to type-check the file. Not sure if the output will be helpful though. If it debug succeeds, it should print component flags. Try to executeghc <component-flags>
and see if it contains any error messages. If all this does not help at all, I would recommend to install hie from source and test my suggestion in haskell/haskell-ide-engine#1613 (comment), e.g.hie --debug <path to test file>
. This should us give something.If nothing helps at all, please try to share your project with us (if you did not install hie from source before, I would suggest this option before installing hie from source). If it is confidential, try to reduce it to something that is not confidential and share that (assuming, it reproduces your problem).
The one difference between the experiment you suggest and this project is that I'm using nix + all-hies.
Not a problem, just execute hie-bios
/ghc
in the nix-shell.
I'm seeing this error trying to install that:
$ cabal new-install exe:hie-bios
Warning: /home/drew/.cabal/config: Unrecognized field ghc-options on line 18
cabal: Internal error in target matching. It should always be possible to find
a syntax that's sufficiently qualified to give an unambiguous match. However
when matching 'exe:hie-bios' we found exe:hie-bios (unknown-component) which
does not have an unambiguous syntax. The possible syntax and the targets they
match are as follows:
'exe:hie-bios' which matches exe:hie-bios (unknown-component),
:pkg:exe:lib:exe:file:hie-bios (unknown-file)
Same output with $ cabal new-install 'exe:hie-bios'
I have a patch to all-hies which includes the hie-bios
command directly. I should get to pushing that
The underlying error after running hie --debug <path to test file>
is:
"can't load .so/.DLL for: /nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libpthread.so (/nix/store/681354n3k44r8z90m35hm8945vsp95h1-glibc-2.27/lib/libpthread.so.0: undefined symbol: __libc_vfork, version GLIBC_PRIVATE)"
I'm running hie+ nix with the all-hies cachix binaries. The production code works fine, however the test files fail with the following:
My
hie.yaml
is:The test portion of
package.yaml
is: