Skip to content

Strip path error under Cygwin #714

Closed
bos opened this Issue May 24, 2012 · 4 comments

3 participants

@bos
Haskell member
bos commented May 24, 2012

(Imported from Trac #723, reported by guest on 2010-08-13)

I am using a new Windows 7 box using cygwin and the Haskell Platform 2010.2.0.0. I am working with cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library. Cabal config is default located here:
\fs1\grad\users\pkeir\Application Data\cabal\config
Installing packages with cabal-install ends with an error relating to the path argument provided to strip (strip is present on cygwin):

cabal install cpphs

...

Linking dist\build\cpphs\cpphs.exe ...
Installing library in \fs1\grad\users\pkeir\Application
Data\cabal\cpphs-1.11\ghc-6.123
Installing executable(s) in \fs1\grad\users\pkeir\Application Data\cabal\bin
/usr/bin/strip: '\fs1\grad\users\pkeir\Application Data\cabal\bin\cpphs.exe': No such file
cabal.exe: Error: some packages failed to install:
cpphs-1.11 failed during the final install step. The exception was:
ExitFailure? 1

It looks like strip is being given one less backslash than it needs at the start. The exe is however installed, and so this command does work:

strip '\fs1\grad\users\pkeir\Application Data\cabal\bin\cpphs.exe'

Though of course the package remains formally uninstalled.

@bos
Haskell member
bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-08-13)

A log with -v3 would be helpful here to see exactly how cabal is invoking external tools.

Attaching a copy of the cabal config file would also be handy.

@bos
Haskell member
bos commented May 24, 2012

(Imported comment by @kosmikus on 2010-08-21)

I'm wondering if this is still an issue.

@kodaj
kodaj commented May 3, 2013

I was unable to reproduce this on Windows 7, using Haskell Platform 2012.4.0.0 (which comes with cabal-install 0.14.0 and Cabal library 1.14.0) and the latest (at this writing) version of Cygwin. Note that

  • I didn't use a "real" file server as (presumably) the original reporter of this bug did.
  • Instead, I simply used UNC paths, referring to folders/files on my PC, when installing the Haskell Platform and running cabal.
  • My command line was like this: cabal -v3 --config-file="\\\\Rafa-HP\\Users\\Rafa\\_cabal_bug\\cabal\\config" --reinstall install cpphs
  • In order to force cabal to use the UNC path when it creates the binary, I had to temporarily overwrite the AppData entry in the registry (replaced %USERPROFILE%\AppData\Roaming with the UNC path).

Here are the last few lines of the log obtained with -v3; you can see that Cygwin's strip.exe was invoked with a UNC path, and there was no problem:

Installing dist\build\HScpphs-1.16.o to
\\Rafa-HP\Users\Rafa\_cabal_bug\cabal\cpphs-1.16\ghc-7.4.2\HScpphs-1.16.o
creating \\Rafa-HP\Users\Rafa\_cabal_bug\cabal\bin
Installing executable dist\build\cpphs\cpphs.exe to
\\Rafa-HP\Users\Rafa\_cabal_bug\cabal\bin\cpphs.exe
("C:\\cygwin\\bin\\strip.exe",["\\\\Rafa-HP\\Users\\Rafa\\_cabal_bug\\cabal\\bin\\cpphs.exe"])
("\\\\Rafa-HP\\Users\\Rafa\\_cabal_bug\\Haskell Platform\\2012.4.0.0\\bin\\ghc.exe",["--abi-hash","-package-name","cpphs-1.16","-v","-hide-all-packages","-fbuilding-cabal-package","-i","-idist\\build","-i.","-idist\\build\\autogen","-Idist\\build\\autogen","-Idist\\build","-optP-include","-optPdist\\build\\autogen\\cabal_macros.h","-odir","dist\\build","-hidir","dist\\build","-stubdir","dist\\build","-package-id","base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917","-package-id","directory-1.1.0.2-58fafe7d1531ce2e3ca938d86c37c9bd","-package-id","old-locale-1.0.0.4-b1d945ebea59a524cba400a524cb40aa","-package-id","old-time-1.1.0.0-faa8f195d3a1c39bf0ccb8384aa86e9f","-O","-XHaskell98","Language.Preprocessor.Cpphs","Language.Preprocessor.Unlit"])
Registering cpphs-1.16...
("\\\\Rafa-HP\\Users\\Rafa\\_cabal_bug\\Haskell Platform\\2012.4.0.0\\bin\\ghc-pkg.exe",["update","-","--global","--user","-v2"])
World file is already up to date.
@tibbe
Haskell member
tibbe commented May 3, 2013

Closed as not reproducible. Please feel to reopen if it appears again.

@tibbe tibbe closed this May 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.