summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZejun Wu <watashi@fb.com>2018-10-28 12:38:07 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-28 13:40:17 -0400
commite400b9babdcf11669f963aeec20078fe7ccfca0d (patch)
tree045b530b1e671f90e882eafc439a84af9cc97c99
parent49f5c6c33a6668152f0fb306075c891f317249d7 (diff)
downloadhaskell-e400b9babdcf11669f963aeec20078fe7ccfca0d.tar.gz
Fix ghc-pkg when only prof way is enabled
Summary: We saw following errors: ``` $ cabal install --disable-library-vanilla --disable-shared --enable-library-profiling hashable-1.2.7.0: cannot find any of ["libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ.a", "libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ.p_a", "libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ-ghc8.4.3.so", "libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ-ghc8.4.3.dylib", "HShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ-ghc8.4.3.dll"] ``` This is because ghc-pkg is looking for `libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ.p_a` instead of `libHShashable-1.2.7.0-Q2TKVDwk4GBEHmizb4teZ_p.a`. Test Plan: ./validate Reviewers: simonmar, bgamari Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5234
-rw-r--r--testsuite/tests/cabal/ghcpkg03.stderr6
-rw-r--r--testsuite/tests/cabal/ghcpkg03.stderr-mingw326
-rw-r--r--testsuite/tests/cabal/ghcpkg05.stderr2
-rw-r--r--testsuite/tests/cabal/ghcpkg05.stderr-mingw322
-rw-r--r--utils/ghc-pkg/Main.hs2
5 files changed, 9 insertions, 9 deletions
diff --git a/testsuite/tests/cabal/ghcpkg03.stderr b/testsuite/tests/cabal/ghcpkg03.stderr
index 31eb7ecee5..5fa8770f24 100644
--- a/testsuite/tests/cabal/ghcpkg03.stderr
+++ b/testsuite/tests/cabal/ghcpkg03.stderr
@@ -7,7 +7,7 @@ testpkg-1.2.3.4: include-dirs: c:/Program Files/testpkg is a relative path which
testpkg-1.2.3.4: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"] (ignoring)
-testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX.p_a","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20150825.dll"] on library path (ignoring)
+testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX_p.a","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20150825.dll"] on library path (ignoring)
testpkg-2.0: Warning: library-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory
testpkg-2.0: Warning: include-dirs: /usr/local/include/testpkg doesn't exist or isn't a directory
testpkg-2.0: import-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
@@ -18,7 +18,7 @@ testpkg-2.0: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["C/E.hi","C/E.p_hi","C/E.dyn_hi"] (ignoring)
-testpkg-2.0: cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX.p_a","libtestpkg-2.0-XXX-ghc7.11.20150825.so","libtestpkg-2.0-XXX-ghc7.11.20150825.dylib","testpkg-2.0-XXX-ghc7.11.20150825.dll"] on library path (ignoring)
+testpkg-2.0: cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX_p.a","libtestpkg-2.0-XXX-ghc7.11.20150825.so","libtestpkg-2.0-XXX-ghc7.11.20150825.dylib","testpkg-2.0-XXX-ghc7.11.20150825.dll"] on library path (ignoring)
testpkg-1.2.3.4: Warning: library-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory
testpkg-1.2.3.4: Warning: include-dirs: /usr/local/include/testpkg doesn't exist or isn't a directory
testpkg-1.2.3.4: import-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
@@ -28,4 +28,4 @@ testpkg-1.2.3.4: include-dirs: c:/Program Files/testpkg is a relative path which
testpkg-1.2.3.4: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"] (ignoring)
-testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX.p_a","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20150825.dll"] on library path (ignoring)
+testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX_p.a","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20150825.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20150825.dll"] on library path (ignoring)
diff --git a/testsuite/tests/cabal/ghcpkg03.stderr-mingw32 b/testsuite/tests/cabal/ghcpkg03.stderr-mingw32
index 23ae5fdb8a..612c93c191 100644
--- a/testsuite/tests/cabal/ghcpkg03.stderr-mingw32
+++ b/testsuite/tests/cabal/ghcpkg03.stderr-mingw32
@@ -7,7 +7,7 @@ testpkg-1.2.3.4: include-dirs: /usr/local/include/testpkg is a relative path whi
testpkg-1.2.3.4: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["C\\D.hi","C\\D.p_hi","C\\D.dyn_hi"] (ignoring)
-testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX.p_a","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20151217.dll"] on library path (ignoring)
+testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX_p.a","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20151217.dll"] on library path (ignoring)
testpkg-2.0: Warning: library-dirs: c:/Program Files/testpkg doesn't exist or isn't a directory
testpkg-2.0: Warning: include-dirs: c:/Program Files/testpkg doesn't exist or isn't a directory
testpkg-2.0: import-dirs: /usr/local/lib/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
@@ -18,7 +18,7 @@ testpkg-2.0: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["C\\D.hi","C\\D.p_hi","C\\D.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["C\\E.hi","C\\E.p_hi","C\\E.dyn_hi"] (ignoring)
-testpkg-2.0: cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX.p_a","libtestpkg-2.0-XXX-ghc7.11.20151217.so","libtestpkg-2.0-XXX-ghc7.11.20151217.dylib","testpkg-2.0-XXX-ghc7.11.20151217.dll"] on library path (ignoring)
+testpkg-2.0: cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX_p.a","libtestpkg-2.0-XXX-ghc7.11.20151217.so","libtestpkg-2.0-XXX-ghc7.11.20151217.dylib","testpkg-2.0-XXX-ghc7.11.20151217.dll"] on library path (ignoring)
testpkg-1.2.3.4: Warning: library-dirs: c:/Program Files/testpkg doesn't exist or isn't a directory
testpkg-1.2.3.4: Warning: include-dirs: c:/Program Files/testpkg doesn't exist or isn't a directory
testpkg-1.2.3.4: import-dirs: /usr/local/lib/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
@@ -28,4 +28,4 @@ testpkg-1.2.3.4: include-dirs: /usr/local/include/testpkg is a relative path whi
testpkg-1.2.3.4: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["C\\D.hi","C\\D.p_hi","C\\D.dyn_hi"] (ignoring)
-testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX.p_a","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20151217.dll"] on library path (ignoring)
+testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4-XXX.a","libtestpkg-1.2.3.4-XXX_p.a","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.so","libtestpkg-1.2.3.4-XXX-ghc7.11.20151217.dylib","testpkg-1.2.3.4-XXX-ghc7.11.20151217.dll"] on library path (ignoring)
diff --git a/testsuite/tests/cabal/ghcpkg05.stderr b/testsuite/tests/cabal/ghcpkg05.stderr
index 80d65ec6e3..e93bf177d7 100644
--- a/testsuite/tests/cabal/ghcpkg05.stderr
+++ b/testsuite/tests/cabal/ghcpkg05.stderr
@@ -9,7 +9,7 @@ There are problems in package testpkg-2.0:
cannot find any of ["B.hi","B.p_hi","B.dyn_hi"]
cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"]
cannot find any of ["C/E.hi","C/E.p_hi","C/E.dyn_hi"]
- cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX.p_a","libtestpkg-2.0-XXX-ghc7.11.20150825.so","libtestpkg-2.0-XXX-ghc7.11.20150825.dylib","testpkg-2.0-XXX-ghc7.11.20150825.dll"] on library path
+ cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX_p.a","libtestpkg-2.0-XXX-ghc7.11.20150825.so","libtestpkg-2.0-XXX-ghc7.11.20150825.dylib","testpkg-2.0-XXX-ghc7.11.20150825.dll"] on library path
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
diff --git a/testsuite/tests/cabal/ghcpkg05.stderr-mingw32 b/testsuite/tests/cabal/ghcpkg05.stderr-mingw32
index e500990e4c..bbbea8d6db 100644
--- a/testsuite/tests/cabal/ghcpkg05.stderr-mingw32
+++ b/testsuite/tests/cabal/ghcpkg05.stderr-mingw32
@@ -9,7 +9,7 @@ There are problems in package testpkg-2.0:
cannot find any of ["B.hi","B.p_hi","B.dyn_hi"]
cannot find any of ["C\\D.hi","C\\D.p_hi","C\\D.dyn_hi"]
cannot find any of ["C\\E.hi","C\\E.p_hi","C\\E.dyn_hi"]
- cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX.p_a","libtestpkg-2.0-XXX-ghc7.11.20151217.so","libtestpkg-2.0-XXX-ghc7.11.20151217.dylib","testpkg-2.0-XXX-ghc7.11.20151217.dll"] on library path
+ cannot find any of ["libtestpkg-2.0-XXX.a","libtestpkg-2.0-XXX_p.a","libtestpkg-2.0-XXX-ghc7.11.20151217.so","libtestpkg-2.0-XXX-ghc7.11.20151217.dylib","testpkg-2.0-XXX-ghc7.11.20151217.dll"] on library path
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 9cbeb3ac61..34b28b1711 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1999,7 +1999,7 @@ checkDuplicateDepends deps
checkHSLib :: Verbosity -> [String] -> String -> Validate ()
checkHSLib _verbosity dirs lib = do
let filenames = ["lib" ++ lib ++ ".a",
- "lib" ++ lib ++ ".p_a",
+ "lib" ++ lib ++ "_p.a",
"lib" ++ lib ++ "-ghc" ++ Version.version ++ ".so",
"lib" ++ lib ++ "-ghc" ++ Version.version ++ ".dylib",
lib ++ "-ghc" ++ Version.version ++ ".dll"]