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
Related
I started to learn wxWidgets some days ago and I found it really good, but when I tried to "export" it to another platform, it didn't work. I expected that, but when I searched how to distribute wxWidgets apps, I didn't find that much, except to install all the wxWidgets library on that platform.
I use Debian 10, while the other platform where I need to export my app uses Lubuntu. It says that it needs a wxgtk3.0 library, but I guess that library will need even more libraries.
How do I export my wxWidgets application without asking the user to manually install and build all the library on its platform? Maybe even using .deb package (if really needed). Thanks in advance.
Please understand that every single distribution uses it own format comparing to Windows where there is an Installation Wizard or OSX where there is a Bundle.
Now, you can create a deb file where you set everything up.
So you can create an rpm (which is basically the same thing as deb, just for different distribution).
This is the best way as it ensures that all dependencies and their versions are satisfied.
Hope this helps!
Many Linux distributions have wxWidgets packages, so one possibility would be to simply ask users to install these packages when they need to use your application. This is not really different from installing GTK libraries or even X11 (or Wayland) that your application also depends on -- the only difference is that these libraries are almost surely already installed on any Linux desktop system, while wxWidgets ones might not be.
Another alternative is to link your application statically with wxWidgets libraries. This will make it much bigger and will prevent the users from upgrading the libraries on their system to improve the application behaviour, but can be simpler for the users to install. Note that if you choose the static linking route, you typically need to build your application on the oldest distribution you want to support (which is probably not Debian 10, which is relatively recent), as this is a simple way to ensure that it doesn't require newer versions of the (other, non-wx) libraries than the ones already present on the user's system.
I'm looking to install Hubris for a Ruby-to-Haskell bridge.
Recent install instructions say that I need to enable shared library support in Cabal. Are there reasons why I might not want to do that?
One reason is that when you build binaries using shared Haskell libraries, these are affected by any future breakage of your locally installed Haskell packages. In other words, when you upgrade a library, you will have to either keep the old .so files around or rebuild the program. This is the main reason why Debian is not yet providing -dyn packages for any library besides the set of boot packages.
(The fact that cabal-install does not uninstall stuff helps here a bit, I guess. But nevertheless I prefer not to worry that doing something with cabal-install or in .cabal might break existing programs.
On ubuntu I currently have haskell-platform 2011.2.0.1.2 installed, and I
am currently working on some code where it would be very nice to have
Control.Concurrent.Chan be an instance of Eq. Unfortunately, in
base-4.3.1.0, which is the one I have installed, it is not, but in
base-4.4.0.0 Chan is an instance of Eq.
Would it be possible to update base, maybe by sandboxing it with cabal-dev or any
other method, in a way that would not break too many packages?
No, you should never upgrade base. It's one of the boot packages — the packages that GHC itself needs to build, and ships with — and upgrading them will lead to Very Bad Things™. (Here's a full list of boot packages; everything with a - in the tag column is one. Don't upgrade these!)
Indeed, cabal-install's cabal upgrade feature was removed precisely because it had a nasty tendency to upgrade boot packages.
Not only is it a boot package, but being such core functionality, it's pretty much inherently tied to a specific GHC version. Your best option is to install the corresponding newer version of GHC in a local directory.
A beginner's Cygwin question here - I'd like to install a newer version of Cygwin (the latest, which is 1.7.9) on a few Windows 2008 Server boxes which currently have rather an old version (1.5.25). I need to do an offline, silent install, and I'm currently deciding whether to do some sort of manually produced list of changed/added/removed files, or just replace the old install with the new. The install is quite big (80 odd megs), so just doing the differences might make sense here. It looks like there is nothing in the way of registry servering or so on required to install Cygwin -you just copy the files somewhere, add it the the path and you're good to go.
One problem, though, is that looking at what's changed between old and new reveals that some of the files the most recent install has used are actually older versions that what we've already got. Ie cygintl-8.dll, envsubst.exe, gettext.exe. Surely you can't mix and match versions?
I'd appreciate it if a more experienced Cygwin user could reply with a few hints as to the best approach here.
There's always an official config.ini file that lists a recommended version of each package, plus often both newer and older versions than the recommended one. When you do an installation with setup.exe, you can elect to use the bleeding edge versions for some or all of the packages. Perhaps your 1.5.25 version was installed with all the bleeding-edge packages, and the 1.7.9 just accepted the defaults. It's not unlikely that some sets of old/current/new packages hadn't changed between those two cygwin versions.
In general, you can mix and match a lot of things, just as you can on Linux. You can't take an old version of the core cygwin1.dll library and expect new packages to run against it; but not all the packages have to be in lockstep.
I have about a few problems with a new install of the Qt SDK. I probably only need advice, but specific answers are also welcome. Before I begin a mini-story, I am running RHEL5 on academic license under VirtualBox on OSX 10.6. Using Qt version 4.5.3. This is my situation...
1.) I couldn't compile because g++ wasn't found. I fixed this by creating a link: g++ -> g++34. This allowed me to compile but it generated more errors at link-time. I had installed the framework in my home directory unintentionally so I uninstalled/reinstalled the entire SDK to /usr/local/qt.
2.) At this point I could compile but the linker complained about a missing freetype package. I had that already installed but wasn't sure why it couldn't be found. So I installed a few packages that I thought might be missing like libqt4-devel and libqt4-devel-debug. I also installed a few other general programming packages for later use.
3.) Somehwere in this process I can no longer run qmake. I ran it before and I have it installed at /usr/local/qt/qt/bin/qmake. I could create a link to it (though I shouldn't have to OR I could ensure that the location was in the PATH var). However, at this point Qt Creator says there's no Qt installation found. I re-pointed it to the installation location (using Tools/Options) but it still won't run qmake or anything else for that matter...
I only need this linux install to compile and test my Qt projects which I am developing in OSX. So my question is, should I just wipe this RHEL install and start over? And if so, should I use something else like Ubuntu? I am having plenty of hassles that I don't want to deal with as is. Note, this project will require good OpenGL support.
Is there a particular reason that you don't simply use the Qt package that's part of RHEL?
If for some reason you need to build your own, you can get all of the build dependancies with:
$ yum install yum-utils
$ yum-builddep <whatever the qt package's name is>
#scotchi is right, and you should try to use the Qt package that comes with your system unless you need a very different version. I don't know what version of Qt comes with RHEL but if its not up-to-date enough for you (and it might not be, see below) then you could consider changing OS versions. I would only do this after trying his suggestion though, because you may be able to get things working without the hassle of a full OS install.
Now, as to why you might want to switch: RHEL is, as its name ("Enterprise Linux") indicates aimed at companies who want to run servers, or large deployments of desktops. It emphasizes stability and reliability over being cutting edge. Fairly often the version of the compiler and development libraries lag a little behind the curve. This is what their clients want: a stable platform they can develop against and run programs on for a period of time, not constantly needing to keep up with the latest changes, and thoroughly tested. But for people doing development at home it may not be necessary to stay that conservative. I don't know if this is for work, school or personal programming, but it sounds to me like you should move to one of the more desktop-oriented distros. Ubuntu is great, as is Fedora. If you prefer a RHEL-like environment, then choose Fedora.