Cabal: disabling -fvia-C

I hope you will pardon another *ignorant* question. 'cabal install lambdabot' fails on Ubuntu Natty. According to the following exchange and bug report http://comments.gmane.org/gmane.comp.lang.haskell.cafe/88735 http://hackage.haskell.org/trac/ghc/ticket/5050 the workaround is not to use -fvia-C. I have found an {-# OPTION -fvia-C #-} deep inside the lambdabot code in Plugin/Pl/Common.hs. How can I tell cabal install to ignore this? Is there some command line option for doing so, or do I have to edit the source code and somehow persuade cabal to use my hacked version ?

On 2011 May 24, at 11:12, Jacek Generowicz wrote:
I have found an {-# OPTION -fvia-C #-} deep inside the lambdabot code in Plugin/Pl/Common.hs. How can I tell cabal install to ignore this? Is there some command line option for doing so, or do I have to edit the source code and somehow persuade cabal to use my hacked version ?
The edited source code is ignored by cabal install. However, if you tar.gz the edited source code and replace the original tarball (making sure that you do *not* remove the untarred directory (it seems that you can remove its contents, but not the directory itself)), then cabal install works and lambdabot installs. But I can't help feeling that this is not the smartest way to solve this problem. It looks like a random solution achieved by someone who doesn't understand what is going on. Is there a more sensible way to do this?

On Tue, 24 May 2011, Jacek Generowicz wrote:
On 2011 May 24, at 11:12, Jacek Generowicz wrote:
I have found an {-# OPTION -fvia-C #-} deep inside the lambdabot code in Plugin/Pl/Common.hs. How can I tell cabal install to ignore this? Is there some command line option for doing so, or do I have to edit the source code and somehow persuade cabal to use my hacked version ?
The edited source code is ignored by cabal install. However, if you tar.gz the edited source code and replace the original tarball (making sure that you do *not* remove the untarred directory (it seems that you can remove its contents, but not the directory itself)), then cabal install works and lambdabot installs.
You cannot only run $ cabal install lambdabot but you can also switch to lambdabot source directory and call lambdabot$ cabal install

On 2011 May 24, at 11:49, Henning Thielemann wrote:
You cannot only run
$ cabal install lambdabot
but you can also switch to lambdabot source directory and call
lambdabot$ cabal install
Ah. That's useful. I tried manually going through the Cabal song and dance in that directory, but it failed to find the dependencies, which presumably will be managed by your suggestion. Thanks.

Henning Thielemann, Tuesday, May 24, 2011
On Tue, 24 May 2011, Jacek Generowicz wrote:
On 2011 May 24, at 11:12, Jacek Generowicz wrote:
I have found an {-# OPTION -fvia-C #-} deep inside the lambdabot code in Plugin/Pl/Common.hs. How can I tell cabal install to ignore this? Is there some command line option for doing so, or do I have to edit the source code and somehow persuade cabal to use my hacked version ?
The edited source code is ignored by cabal install. However, if you tar.gz the edited source code and replace the original tarball (making sure that you do *not* remove the untarred directory (it seems that you can remove its contents, but not the directory itself)), then cabal install works and lambdabot installs.
You cannot only run
$ cabal install lambdabot
but you can also switch to lambdabot source directory and call
lambdabot$ cabal install
Those two options cover the building. Putting a .tar.gz in the cabal package directory might be a bit more convenient if you use cabal-dev, or otherwise have to frequently rebuild packages. If you are going to write other code that depends on your fix to the package, you should probably increase the version number in the modified package, so you don't copy your project to another system and take a while to realize it's getting the hackage version of the dependency, rather than your fix. This probably isn't an issue with lambdabot. Brandon
participants (3)
-
Brandon Moore
-
Henning Thielemann
-
Jacek Generowicz