I am using VS Code 1.68.1 on Windows 10 and have installed the Haskell language support plugin. I tried to install ghcup but the installation script just fails with no error message and the IRC channel #ghcup wasn't able to help so I've given up on ghcup and decided to handle this manually. I just installed HLS 1.7.0 and pointed VS Code at it. The problem is I get an error message from VS Code:
ghcide compiled against GHC 9.2.2 but currently using 8.6.5
This is unsupported, ghcide must be compiled with the same GHC version as the project.
Upon further investigation, this seems to be complaining that the ghcide library that's a part of HLS was built using ghc 9.2.2 but my current codebase was built (by Stack) using ghc 8.6.5. At least that's my reading of it, since the HLS page itself says that 1.7.0 is compatible with 8.6.5! So my first question is how on earth am I supposed to know what version of ghc was used to build HLS, and honestly why should I care?? And my second question is, how do I find the version of HLS that's compatible with my current ghc?
(Another option is to migrate Stack from 8.6.5 to 9.2.2 but I'm not sure exactly how to do this. It appears to be just a case of changing the resolver entry in stack.yaml which is currently resolver: lts-14.21. But what do I change it to? It looks like the most recent version of LTS is 19.14 https://www.stackage.org/lts-19.14. But I'm a bit nervous about making that change since the page says ghc 9.0.2 not 9.2.2. The entire Haskell ecosystem just seems really finicky and I'm new enough to Stack that don't want to end up with a messed up Stack config and possibly in Haskell package mismatch hell.
Can anyone offer any good solutions?
Related
I am trying to compile freshly installed PCL library in WSL. I followed the steps given in the thread: https://stackoverflow.com/questions/58040066/how-to-compile-point-cloud-library-pcl-with-examples-ubuntu. I installed all the required dependencies mentioned in the thread but I am running into compilation error.
CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
The OLD behavior for policy CMP0048 will be removed from a futur
version of CMake.l/lib/cmake/vtk 9.2/FindFreetype.cmake:179(vtk_detect_library_type)
/usr/local/lib/cmake/vtk-9.2/patches/3.19/FindX11.cmake:235(find_package)
The cmake-policies(7) manual explains that the OLD behaviors of al
(find_package) policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances.
Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only
under specific short-term circumstances.
--Could NOT find LIBUSB_1 (missing: LIBUSB_1_LIBRARY LIBUSB_1_INCLUDE_DIR)
-- Checking for module 'metslib'
-- No package 'metslib' found
-- Configuring incomplete, errors occurred!
-- QHULL found (include: /usr/include, lib:
optimized;/usr/lib/x86_64-linux gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
CMake Error at /usr/local/lib/cmake/vtk 9.2/vtkDetectLibraryType.cmake:23 (message):
The `PATH` argument is required.
Projects should be ported to the NEW behavior and not rely on
setting a policy to OLD.
I did not quite understand the warning written in the first line. Does it have to do anything with the CMake version? I am new to cmake and cannot figure this out. Some help will be appreciated :)
You are trying to compile on a WSL which is just a subsystem i.e. it's without an X-server. Simple as that. Look at this line:
/usr/local/lib/cmake/vtk-9.2/patches/3.19/FindX11.cmake:235(find_package)
Long story short, you can't might be able to compile it on WSL, because but VTK needs an X-server for it's visualisation and you need to start by getting the X-server up and running. I'm really not sure how this would run on a WSL even if you got an X-server to work with WSL, but I might be wrong here.
EDIT: Apparently it is possible to get an X-server to work on WSL by forwarding it, but I still believe (especially since you are new) that it's more work then just getting a dual-boot working.
EDIT2: Tsyvarev was kind enough to provide a great link on how to get X-server configured on WSL.
I started working on a new snap barebones project with stack. When I stack init, it resolves to an older ghc compiler. When I upgraded the compiler, I got errors for the MonadCatchIO-transformer dependency. I went MonadCatchIO docs they say it is deprecated for exceptions library. So I replaced the dependency in my cabal file and was able to get my project to build and run hello world.
I want to know if I should expect errors later on in the Snap framework if/when I get more complex than a hello world project.
Why was MonadCatchIO-transformer part of the barebones template if it isn't necessary and several years obsolete.
After going through the git repository for snap-templates, I found that the template file doesn't even reference a MonadCatchIO-transformers. It seems whatever I downloaded with cabal install snap-templates isn't the current source code.
I have asked them to update hackage in an issue request.
I ask this question on this stack exchange because it has (by far) the most posts about octave.
I started using a linux environment and want to use octave for my work, for which the dicom package is essential (my data is in the dicom format and not readily converted to nifti because of its high dimensionality, it would require many,many seperate files).
The dicom package is dependend on the gdcm library, which I have installed. The when installing the dicom package I get this error:
fatal error: gdcm-2.0/gdcmReader.h: No such file
The current gdcm version is newer than 2.0 so I thought maybe I should use the older version, but the error remained. Even the older function did not get installed to that path. I think the dicom package does not look at which path it should use.
Maybe this is a bug because the path is hardcoded (as suggested in the similar OSx thread)
Maybe this happens because the last release is from 2011 and the package is just not maintained anymore, while gdcm keeps getting updates.
Maybe Im just doing something horribly wrong that Im not seeing.
Replace gdcm-2.0/gdcmReader.h with gdcm-2.4/gdcmReader.h in the octave binding.
I am using debian and the haskell-platform on the system gets really old. So I download the newest haskel-platform binary version and place it under /usr/local/haskell and activate it. Now there're 2 versions of ghc. If I type ghc then the old ghc-7.4 will be used and ghc-7.8.3 will certainly call the new one. But I have trouble with cabal. The new cabal cannot be used because of glibc version. Can I make the old cabal work with the new haskell platform ? If so how can I make it work just like there're two cabals. In the other word, I want the default directory of the cabal working with the old platform to still remain $HOME/.cabal and the cabal working with new platform to become the new directory (actually I don't know where). Can anyone help me to configure it so that I can have two versions of haskell-platform working separately on my Linux.
You can use lots of GHC installations at the same time without problems, but I don't think that's true for multiple Cabal installations. All you need is to use up-to-date Cabal, no need to keep any other versions. See this blog post for how to use multiple GHC's: http://osa1.net/posts/2014-12-09-ghc-cabal-installation-guide.html
Good day! I've got a problem with linkage on Linux using gcc. For example, I've compiled project on one machine and linked it with libGLEW. When I'm trying to run it on another machine - it can't find libGLEW, because first machine has libGLEW.so.1.7 and second has libGLEW.so.1.10.
ldd shows me, that it dependent on 'libGLEW.so.1.7'.
after creating symlink 'libGLEW.so.1.7 => libGLEW.so.1.10' everything works fine, but is there a way, to store 'libGLEW.so' as dependency instead of 'libGLEW.so.1.7'?
What makes you sure the function interface of GLEW doesn't have changed?
Or even the content of version 1.1 to 1.7 is still the same?
If it is build with 1.7, it also depends on 1.7.
So you shouldn't run it on another version of GLEW, except the api documentation of GLEW tells you that this cross versioning is possible for some reason (But I couldn't imagine that).
Otherwise also build it with GLEW 1.1 in addition
(because as if all features you use from 1.7 are also supported by 1.1 and for some reason you have to support both versions), so to serve different versions fo your programm for different versions of GLEW would be the best and valid way.
If that is not the case make it for the user as requirement to be on Glew version 1.7 or higher.
But there is no safe way of working around to archive what you want.
And there is not a gcc or any compiler command for that at all.