Ticket #1142 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

GHC_PKG_CHECK fails when multiple versions of the package are installed

Reported by: guest Owned by: duncan
Priority: normal Milestone:
Component: build system Version: 0.9.13
Keywords: Cc: kevin@…, matti.niemenmaa+gtk2hsbugs@…


The GHC_PKG_CHECK macro doesn't work properly when multiple versions of the same package are installed. I'm guessing it's a problem where it assumes GNU sed but BSD sed doesn't work (OS X uses BSD sed).

The actual error is this expression sed -e 's/,/\n/g' -e 's/[[(), ]]//g' (the first -e expression). The token \n in a replacement string is not interpreted as a newline by BSD sed. You have to embed a real backslash-escaped newline. The second -e expression also doesn't work right, since [[(), ]] isn't a valid POSIX regex. This whole expression should probably be replaced with tr ',' '\n' | tr -d '(), '

There's another sed expression further on in the same line sed -e 's/[[A-Za-z-]]*//' which also has the same problem with [[A-Za-z-]] not being a valid POSIX regex. The problem here is that the expressions seem to treat [[bar]] as a character class for bar, but that should just be [bar]. [[bar]] is invalid because it treats [[bar] as the character class (containing [, b, a, and r) followed by a trailing ]. This expression could also be replaced by {{tr}}, or it could just be fixed to read [A-Za-z-]

Change History

Changed 7 years ago by guest

  • cc matti.niemenmaa+gtk2hsbugs@… added

This also fails on Windows, using MSYS.

checking for the GHC package "mtl"... yes, version

Which means it's not just about GNU vs BSD sed, it could even be expecting a specific version of GNU sed (or it could just be untested):

$ sed --version
GNU sed version 3.02

Changed 7 years ago by Alvaro

I am examining you on your fool ideas that no intelligent Christian on earth believes.

-- Clarence Darrow, to William Jennings Bryan

viagra ordina adesso in italia brand fioricet fioricet compra cialis italia tramadol online pharmacy

Changed 7 years ago by Alvaro

It usually takes more than three weeks to prepare a good impromptu speech.

-- Mark Twain

acquista viagra fioricet order online vendita cialis online tramadol buy

Changed 7 years ago by pgavin

  • status changed from new to closed
  • resolution set to fixed

I believe this has been fixed.

Note: See TracTickets for help on using tickets.