From simonpj at microsoft.com Thu May 30 13:50:22 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Thu, 30 May 2019 13:50:22 +0000 Subject: Cabal install Message-ID: Dear friendly Cabal folk Here's what happened to me today bash$ cabal install lhs2tex cabal: Could not resolve dependencies: [__0] next goal: report (user goal) [__0] rejecting: report-0.1.0.0 (conflict: requires UnsaturatedTypeFamilies) [__0] fail (backjumping, conflict set: report) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: report Crumbs. What is 'report'? Why does it need UnsaturatedTypeFamilies? I'm totally lost. Then, in an inspired moment, I thought to change to a different directory, ~/tmp. Then quite different things happened - it downloaded and built relevant libraries. I think that there just happened to be a .cabal file in the original directory I was in at the time. That appears to affect what 'cabal install' does in a truly radical way. My point is this: this is terribly confusing for the user (at least for this on). I'd be shocked if 'apt install blah' behaved utterly differently in different directories. I'm going to make a little empty directory somewhere, and cd to it before invoking cabal in future. But that just feels like a workaround, not a solution. I'm not saying it's wrong - just giving you a data point that it had one user completely stumped Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Thu May 30 13:57:24 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Thu, 30 May 2019 13:57:24 +0000 Subject: Installation failed Message-ID: Dear Cabal developers More woe: simonpj at MSRC-3645512:~$ cabal install lhs2tex Resolving dependencies... Up to date cabal: installdir is not defined. Set it in your cabal config file or use --installdir= In the olden days, didn't cabal install by default in ~/.cabal/bin? Never mind, let's do what it asks: simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin Resolving dependencies... Up to date Symlinking 'lhs2TeX' /usr/bin/lhs2TeX: createSymbolicLink: permission denied (Permission denied) Darn: I need to be super-user. Fine: simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex --installdir=/usr/bin [sudo] password for simonpj: cabal: unrecognized 'install' option `--installdir=/usr/bin' OK _now_ I really am stumped. It asked me to provide that option, and now it says it's unrecognised. (This is in a bash shell running in emacs, if it makes a difference.) What next? Thanks Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.grenrus at iki.fi Thu May 30 19:19:19 2019 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Thu, 30 May 2019 22:19:19 +0300 Subject: Cabal install In-Reply-To: References: Message-ID: Hi Simon, my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. In that case, you are hitting the unfortunate cabal bug [1]. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? If so, the simplest fix is to remove that environment file. - [1] https://github.com/haskell/cabal/issues/5888 https://github.com/haskell/cabal/issues/5559 Cheers, Oleg On 30.5.2019 16.50, Simon Peyton Jones wrote: > > Dear friendly Cabal folk > > Here’s what happened to me today > > bash$ cabal install lhs2tex > > cabal: Could not resolve dependencies: > > [__0] next goal: report (user goal) > > [__0] rejecting: report-0.1.0.0 (conflict: requires > UnsaturatedTypeFamilies) > > [__0] fail (backjumping, conflict set: report) > > After searching the rest of the dependency tree exhaustively, these > were the > > goals I've had most trouble fulfilling: report > > Crumbs.  What is ‘report’?  Why does it need > UnsaturatedTypeFamilies?   I’m totally lost. > > Then, in an inspired moment, I thought to change to a different > directory, ~/tmp. > > Then quite different things happened – it downloaded and built > relevant libraries. > > I think that there just happened to be a .cabal file in the original > directory I was in at the time. That appears to affect what ‘cabal > install’ does in a truly radical way. > > My point is this: this is terribly confusing for the user (at least > for this on).   I’d be shocked if ‘apt install blah’ behaved utterly > differently in different directories.  I’m going to make a little > empty directory somewhere, and cd to it before invoking cabal in > future.  But that just feels like a workaround, not a solution. > > I’m not saying it’s wrong – just giving you a data point that it had > one user completely stumped > > Simon > > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.grenrus at iki.fi Thu May 30 19:30:24 2019 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Thu, 30 May 2019 22:30:24 +0300 Subject: Installation failed In-Reply-To: References: Message-ID: <49f9ad08-3ad9-c9fe-4692-04c18b50cc00@iki.fi> Hi again Simon, Few points, If you run Windows 10 (Pro?), you can setup to make symlinks without needing administrator privileges. I used https://github.com/git-for-windows/git/wiki/Symbolic-Links guide. Unfortunately I don't remember all the details I did (i.e. if the guide is complete), but enabling Developer Mode is easy to forget. About installing and symlinking: - `cabal update-config` should populate your ~/.cabal/config with new default configuration. which will have install-dir: there too. You can also manually edit it to add the new configuration option. - Most of install woes are fixed in March [1], but there weren't a release with those fixes. - [1] https://github.com/haskell/cabal/pull/5870 Cheers, Oleg On 30.5.2019 16.57, Simon Peyton Jones wrote: > > Dear Cabal developers > > More woe: > > simonpj at MSRC-3645512:~$ cabal install lhs2tex > > Resolving dependencies... > > Up to date > > cabal: installdir is not defined. Set it in your cabal config file or use > > --installdir= > > In the olden days, didn’t cabal install by default in ~/.cabal/bin? > > Never mind, let’s do what it asks: > > simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin > > Resolving dependencies... > > Up to date > > Symlinking 'lhs2TeX' > > /usr/bin/lhs2TeX: createSymbolicLink: permission denied (Permission > denied) > > Darn: I need to be super-user.  Fine: > > simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex --installdir=/usr/bin > > [sudo] password for simonpj: > > cabal: unrecognized 'install' option `--installdir=/usr/bin' > > OK _/now/_ I really am stumped.  It asked me to provide that option, > and now it says it’s unrecognised. > > (This is in a bash shell running in emacs, if it makes a difference.) > > What next? > > Thanks > > Simon > > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From carter.schonwald at gmail.com Thu May 30 19:48:52 2019 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Thu, 30 May 2019 15:48:52 -0400 Subject: Installation failed In-Reply-To: References: Message-ID: hey simon, on gmail your email seems to be marked as spam, i'm not sure if its the mailing list side or your email account ... fyi On Thu, May 30, 2019 at 9:57 AM Simon Peyton Jones wrote: > Dear Cabal developers > > More woe: > > simonpj at MSRC-3645512:~$ cabal install lhs2tex > > Resolving dependencies... > > Up to date > > cabal: installdir is not defined. Set it in your cabal config file or use > > --installdir= > > In the olden days, didn’t cabal install by default in ~/.cabal/bin? > > Never mind, let’s do what it asks: > > simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin > > Resolving dependencies... > > Up to date > > Symlinking 'lhs2TeX' > > /usr/bin/lhs2TeX: createSymbolicLink: permission denied (Permission denied) > > Darn: I need to be super-user. Fine: > > simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex --installdir=/usr/bin > > [sudo] password for simonpj: > > cabal: unrecognized 'install' option `--installdir=/usr/bin' > > OK _*now*_ I really am stumped. It asked me to provide that option, and > now it says it’s unrecognised. > > (This is in a bash shell running in emacs, if it makes a difference.) > > What next? > > Thanks > > Simon > > > _______________________________________________ > cabal-devel mailing list > cabal-devel at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri May 31 08:02:30 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 31 May 2019 08:02:30 +0000 Subject: Cabal install In-Reply-To: References: Message-ID: Thanks Oleg my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. I am confident I did nothing like that. But there is a file called report.cabal in the directory where I did the 'cabal install lhs2tex' command. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? There is no such file: bash$ ls ~/.ghc ghci_history x86_64-linux-8.9.0.20190414 x86_64-linux-8.9.0.20190508 x86_64-linux-8.6.4 x86_64-linux-8.9.0.20190430 x86_64-linux-8.9.0.20190527 bash$ ls ~/.ghc/x86_64-linux-8.6.4/ package.conf.d Simon From: Oleg Grenrus Sent: 30 May 2019 20:19 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Cabal install Hi Simon, my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. In that case, you are hitting the unfortunate cabal bug [1]. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? If so, the simplest fix is to remove that environment file. - [1] https://github.com/haskell/cabal/issues/5888 https://github.com/haskell/cabal/issues/5559 Cheers, Oleg On 30.5.2019 16.50, Simon Peyton Jones wrote: Dear friendly Cabal folk Here's what happened to me today bash$ cabal install lhs2tex cabal: Could not resolve dependencies: [__0] next goal: report (user goal) [__0] rejecting: report-0.1.0.0 (conflict: requires UnsaturatedTypeFamilies) [__0] fail (backjumping, conflict set: report) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: report Crumbs. What is 'report'? Why does it need UnsaturatedTypeFamilies? I'm totally lost. Then, in an inspired moment, I thought to change to a different directory, ~/tmp. Then quite different things happened - it downloaded and built relevant libraries. I think that there just happened to be a .cabal file in the original directory I was in at the time. That appears to affect what 'cabal install' does in a truly radical way. My point is this: this is terribly confusing for the user (at least for this on). I'd be shocked if 'apt install blah' behaved utterly differently in different directories. I'm going to make a little empty directory somewhere, and cd to it before invoking cabal in future. But that just feels like a workaround, not a solution. I'm not saying it's wrong - just giving you a data point that it had one user completely stumped Simon _______________________________________________ cabal-devel mailing list cabal-devel at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri May 31 08:17:31 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 31 May 2019 08:17:31 +0000 Subject: Installation failed In-Reply-To: <49f9ad08-3ad9-c9fe-4692-04c18b50cc00@iki.fi> References: <49f9ad08-3ad9-c9fe-4692-04c18b50cc00@iki.fi> Message-ID: Few points, If you run Windows 10 (Pro?), you can setup to make symlinks without needing administrator privileges Actually I've now switched to using the Windows Subsytem for Linux (WSL), which works pretty well and means that I don't need to be the beta-tester for windows :-). I should have said - this thread is about Ubuntu Linux in WSL. - `cabal update-config` should populate your ~/.cabal/config with new default configuration. which will have install-dir: there too. You can also manually edit it to add the new configuration option. Alas not: bash$ cabal update-config cabal: unrecognised command: update-config (try --help) bash$ cabal --version cabal-install version 3.0.0.0 compiled using version 3.0.0.0 of the Cabal library Perhaps my cabal is out of date. Hmm. Maybe I should try to update it? bash$ cabal update cabal cabal: 'v2-update' repo(s): "cabal" can not be found in known remote repo(s): hackage.haskell.org Nope. Maybe I should just install it afresh? Maybe that would update it? basj$ cabal install cabal Resolving dependencies... cabal: Could not resolve dependencies: [__0] trying: cabal-0.0.0.0 (user goal) [__1] unknown package: youProbablyWantCapitalCabal (dependency of cabal) [__1] fail (backjumping, conflict set: cabal, youProbablyWantCapitalCabal) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: cabal, youProbablyWantCapitalCabal Oh dear. I have a vague hind-brain memory that you have to install "cabal-install" rather than "cabal". Let's try that. That failed too. Clutching at straws, that "youProbablyWantCapitalCabal" is suggestive. Let's try: bash$ cabal install Cabal Resolving dependencies... Up to date cabal: installdir is not defined. Set it in your cabal config file or use --installdir= Back to that again. I'm not truly stuck on any of this. But somehow my high failure rate is discouraging, and I thought you'd probably want to know how I stumbled. Where could I read about the difference between "cabal install Cabal" and "cabal install cabal-install"? Simon Here's the cabal install cabal-install output, which has a totally new failure. Something about zlib.h, but I have no idea how to fix it. simonpj at MSRC-3645512:~/tmp$ cabal install cabal-install Resolving dependencies... Build profile: -w ghc-8.6.4 -O1 In order, the following will be built (use -v for more details): - async-2.2.1 (lib) (requires download & build) - base16-bytestring-0.1.1.6 (lib:base16-bytestring) (requires download & build) - base64-bytestring-1.0.0.2 (lib) (requires build) - cryptohash-sha256-0.11.101.0 (lib) (requires download & build) - digest-0.0.1.2 (lib:digest) (requires download & build) - echo-0.1.3 (lib) (requires download & build) - ed25519-0.0.5.0 (lib) (requires download & build) - edit-distance-0.2.2.1 (lib) (requires download & build) - hsc2hs-0.68.4 (exe:hsc2hs) (requires download & build) - network-uri-2.6.1.0 (lib) (requires download & build) - tar-0.5.1.0 (lib) (requires download & build) - zlib-0.6.2 (lib) (requires download & build) - resolv-0.1.1.2 (lib:resolv) (requires download & build) - network-3.1.0.0 (lib:network) (requires download & build) - zip-archive-0.4.1 (lib) (requires download & build) - hackage-security-0.5.3.0 (lib) (requires download & build) - HTTP-4000.3.13 (lib) (requires download & build) - cabal-install-2.4.1.0 (exe:cabal) (requires download & build) Downloading base16-bytestring-0.1.1.6 Starting base64-bytestring-1.0.0.2 (lib) Downloaded base16-bytestring-0.1.1.6 Downloading cryptohash-sha256-0.11.101.0 Starting base16-bytestring-0.1.1.6 (all, legacy fallback) Downloaded cryptohash-sha256-0.11.101.0 Downloading digest-0.0.1.2 Starting cryptohash-sha256-0.11.101.0 (lib) Building base64-bytestring-1.0.0.2 (lib) Downloaded digest-0.0.1.2 Downloading ed25519-0.0.5.0 Building base16-bytestring-0.1.1.6 (all, legacy fallback) Starting digest-0.0.1.2 (all, legacy fallback) Downloaded ed25519-0.0.5.0 Downloading zlib-0.6.2 Starting ed25519-0.0.5.0 (lib) Building cryptohash-sha256-0.11.101.0 (lib) Downloaded zlib-0.6.2 Downloading resolv-0.1.1.2 Installing base16-bytestring-0.1.1.6 (all, legacy fallback) Starting zlib-0.6.2 (lib) Building ed25519-0.0.5.0 (lib) Installing base64-bytestring-1.0.0.2 (lib) Downloaded resolv-0.1.1.2 Downloading echo-0.1.3 Completed base16-bytestring-0.1.1.6 (all, legacy fallback) Completed base64-bytestring-1.0.0.2 (lib) Downloaded echo-0.1.3 Downloading hsc2hs-0.68.4 Starting echo-0.1.3 (lib) Downloaded hsc2hs-0.68.4 Downloading network-3.1.0.0 Starting hsc2hs-0.68.4 (exe:hsc2hs) Installing cryptohash-sha256-0.11.101.0 (lib) Downloaded network-3.1.0.0 Downloading edit-distance-0.2.2.1 Completed cryptohash-sha256-0.11.101.0 (lib) Building echo-0.1.3 (lib) Downloaded edit-distance-0.2.2.1 Downloading tar-0.5.1.0 Starting edit-distance-0.2.2.1 (lib) Building hsc2hs-0.68.4 (exe:hsc2hs) Downloaded tar-0.5.1.0 Downloading async-2.2.1 Starting tar-0.5.1.0 (lib) Downloaded async-2.2.1 Downloading network-uri-2.6.1.0 Installing echo-0.1.3 (lib) Starting async-2.2.1 (lib) Installing ed25519-0.0.5.0 (lib) Building edit-distance-0.2.2.1 (lib) Downloaded network-uri-2.6.1.0 Downloading zip-archive-0.4.1 Starting network-uri-2.6.1.0 (lib) Completed echo-0.1.3 (lib) Completed ed25519-0.0.5.0 (lib) Building tar-0.5.1.0 (lib) Downloaded zip-archive-0.4.1 Downloading HTTP-4000.3.13 Building async-2.2.1 (lib) Building network-uri-2.6.1.0 (lib) Downloaded HTTP-4000.3.13 Downloading hackage-security-0.5.3.0 Downloaded hackage-security-0.5.3.0 Downloading cabal-install-2.4.1.0 Downloaded cabal-install-2.4.1.0 Installing async-2.2.1 (lib) Installing edit-distance-0.2.2.1 (lib) Completed async-2.2.1 (lib) Completed edit-distance-0.2.2.1 (lib) Installing hsc2hs-0.68.4 (exe:hsc2hs) Completed hsc2hs-0.68.4 (exe:hsc2hs) Installing network-uri-2.6.1.0 (lib) Completed network-uri-2.6.1.0 (lib) Installing tar-0.5.1.0 (lib) Completed tar-0.5.1.0 (lib) Failed to build digest-0.0.1.2. The failure occurred during the configure step. Build log ( /home/simonpj/.cabal/logs/ghc-8.6.4/digest-0.0.1.2-14bc149eb1d9c6a16b30ce20fef469dafeaea1cbba4f9615d23d3b4f1a2da8bd.log ): Configuring digest-0.0.1.2... cabal: Missing dependency on a foreign library: * Missing (or bad) header file: zlib.h * Missing (or bad) C library: z This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the library file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. Failed to build zlib-0.6.2. The failure occurred during the configure step. Build log ( /home/simonpj/.cabal/logs/ghc-8.6.4/zlib-0.6.2-2039caedabd32f9ed378900645b72766a462d68bf828625f67296cbc28fa173e.log ): Configuring library for zlib-0.6.2.. cabal: Missing dependency on a foreign library: * Missing (or bad) header file: zlib.h * Missing (or bad) C library: z This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the library file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. cabal: Failed to build digest-0.0.1.2 (which is required by cabal-install-2.4.1.0). See the build log above for details. Failed to build zlib-0.6.2 (which is required by cabal-install-2.4.1.0). See the build log above for details. From: Oleg Grenrus Sent: 30 May 2019 20:30 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Installation failed Hi again Simon, Few points, If you run Windows 10 (Pro?), you can setup to make symlinks without needing administrator privileges. I used https://github.com/git-for-windows/git/wiki/Symbolic-Links guide. Unfortunately I don't remember all the details I did (i.e. if the guide is complete), but enabling Developer Mode is easy to forget. About installing and symlinking: - `cabal update-config` should populate your ~/.cabal/config with new default configuration. which will have install-dir: there too. You can also manually edit it to add the new configuration option. - Most of install woes are fixed in March [1], but there weren't a release with those fixes. - [1] https://github.com/haskell/cabal/pull/5870 Cheers, Oleg On 30.5.2019 16.57, Simon Peyton Jones wrote: Dear Cabal developers More woe: simonpj at MSRC-3645512:~$ cabal install lhs2tex Resolving dependencies... Up to date cabal: installdir is not defined. Set it in your cabal config file or use --installdir= In the olden days, didn't cabal install by default in ~/.cabal/bin? Never mind, let's do what it asks: simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin Resolving dependencies... Up to date Symlinking 'lhs2TeX' /usr/bin/lhs2TeX: createSymbolicLink: permission denied (Permission denied) Darn: I need to be super-user. Fine: simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex --installdir=/usr/bin [sudo] password for simonpj: cabal: unrecognized 'install' option `--installdir=/usr/bin' OK _now_ I really am stumped. It asked me to provide that option, and now it says it's unrecognised. (This is in a bash shell running in emacs, if it makes a difference.) What next? Thanks Simon _______________________________________________ cabal-devel mailing list cabal-devel at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.grenrus at iki.fi Fri May 31 08:31:13 2019 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Fri, 31 May 2019 11:31:13 +0300 Subject: Cabal install In-Reply-To: References: Message-ID: <3d6d22ec-0556-dce7-1257-7eb460a19552@iki.fi> Hi Simon, I see, you triggered another feature/bug of cabal install, namely when you are in a project directory, project settings affect solving process. And when there's a .cabal file, it's a project. So cabal tried to find an install plan containing local packages (that makes sense, if you try to install local lhs2tex for example!) Solution is to change directory (cd) somewhere else and try again. (There's also cabal install -z flag feature request, -z to ignore local project; but it's not yet merged). - Oleg On 31.5.2019 11.02, Simon Peyton Jones wrote: > > Thanks Oleg > > my first guess is that: when working on the unsaturated type families > paper, you did `cabal install --lib report`; or something similar. > `report` is probably some internal library to that paper / project. > > I am confident I did nothing like that. But there is a file called > report.cabal in the directory where I did the ‘cabal install lhs2tex’ > command. > > To confirm, check what is in your > ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some > `package-id report-0.1.0.0-hexhash` line there? > > There is no such file: > > bash$ ls ~/.ghc > > ghci_history        x86_64-linux-8.9.0.20190414 > x86_64-linux-8.9.0.20190508 > > x86_64-linux-8.6.4  x86_64-linux-8.9.0.20190430 > x86_64-linux-8.9.0.20190527 > > bash$ ls ~/.ghc/x86_64-linux-8.6.4/ > > package.conf.d > > Simon > > *From:*Oleg Grenrus > *Sent:* 30 May 2019 20:19 > *To:* Simon Peyton Jones ; cabal-devel at haskell.org > *Subject:* Re: Cabal install > > Hi Simon, > > my first guess is that: when working on the unsaturated type families > paper, you did `cabal install --lib report`; or something similar. > `report` is probably some internal library to that paper / project. > > In that case, you are hitting the unfortunate cabal bug [1]. > > To confirm, check what is in your > ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some > `package-id report-0.1.0.0-hexhash` line there? If so, the simplest > fix is to remove that environment file. > > - [1] https://github.com/haskell/cabal/issues/5888 > https://github.com/haskell/cabal/issues/5559 > > > Cheers, > Oleg > > On 30.5.2019 16.50, Simon Peyton Jones wrote: > > Dear friendly Cabal folk > > Here’s what happened to me today > > bash$ cabal install lhs2tex > > cabal: Could not resolve dependencies: > > [__0] next goal: report (user goal) > > [__0] rejecting: report-0.1.0.0 (conflict: requires > UnsaturatedTypeFamilies) > > [__0] fail (backjumping, conflict set: report) > > After searching the rest of the dependency tree exhaustively, > these were the > > goals I've had most trouble fulfilling: report > > Crumbs.  What is ‘report’?  Why does it need > UnsaturatedTypeFamilies?   I’m totally lost. > > Then, in an inspired moment, I thought to change to a different > directory, ~/tmp. > > Then quite different things happened – it downloaded and built > relevant libraries. > > I think that there just happened to be a .cabal file in the > original directory I was in at the time.  That appears to affect > what ‘cabal install’ does in a truly radical way. > > My point is this: this is terribly confusing for the user (at > least for this on).   I’d be shocked if ‘apt install blah’ behaved > utterly differently in different directories.  I’m going to make a > little empty directory somewhere, and cd to it before invoking > cabal in future.  But that just feels like a workaround, not a > solution. > > I’m not saying it’s wrong – just giving you a data point that it > had one user completely stumped > > Simon > > > > _______________________________________________ > > cabal-devel mailing list > > cabal-devel at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.grenrus at iki.fi Fri May 31 08:46:56 2019 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Fri, 31 May 2019 11:46:56 +0300 Subject: Installation failed In-Reply-To: References: <49f9ad08-3ad9-c9fe-4692-04c18b50cc00@iki.fi> Message-ID: <8b2dc622-9930-5b62-dd45-8fd9810b996f@iki.fi> Sorry, I wrote non-sense, the command is cabal user-config update -- cabal-install-3.0.0.0 is the latest (and in fact non-released) version you can have. Your last (failed) attempt actually wanted to install cabal-install-2.4.1.0! Reinstalling cabal-install (from Hackage) via cabal-install is currently not well exercised codepath. People usually install cabal from either Herbert's PPA, via ghcup or chocolatey package managers. So even I don't see reason installing cabal-install via cabal-install shouldn't work, I don't recommend it. The zlib.h failure is related to no zlib library - development parts installed. On Ubuntu the headers can be installed by "apt-get install zlib1g-dev". Unfortunately I have no experience with WSL, if that's as easy there. - Oleg On 31.5.2019 11.17, Simon Peyton Jones wrote: > > Few points, If you run Windows 10 (Pro?), you can setup to make > symlinks without needing administrator privileges > > Actually I’ve now switched to using the Windows Subsytem for Linux > (WSL), which works pretty well and means that I don’t need to be the > beta-tester for windows :-).   I should have said – this thread is > about Ubuntu Linux in WSL. > > - `cabal update-config` should populate your ~/.cabal/config with new > default configuration. which will have install-dir: there too. You can > also manually edit it to add the new configuration option. > > Alas not: > > bash$ cabal update-config > > cabal: unrecognised command: update-config (try --help) > > bash$ cabal --version > > cabal-install version 3.0.0.0 > > compiled using version 3.0.0.0 of the Cabal library > > Perhaps my cabal is out of date.  Hmm.  Maybe I should try to update it? > > bash$ cabal update cabal > > cabal: 'v2-update' repo(s): "cabal" can not be found in known remote > repo(s): > > hackage.haskell.org > > Nope.  Maybe I should just install it afresh?  Maybe that would update it? > > basj$ cabal install cabal > > Resolving dependencies... > > cabal: Could not resolve dependencies: > > [__0] trying: cabal-0.0.0.0 (user goal) > > [__1] unknown package: youProbablyWantCapitalCabal (dependency of cabal) > > [__1] fail (backjumping, conflict set: cabal, youProbablyWantCapitalCabal) > > After searching the rest of the dependency tree exhaustively, these > were the > > goals I've had most trouble fulfilling: cabal, youProbablyWantCapitalCabal > > Oh dear.  I have a vague hind-brain memory that you have to install > “cabal-install” rather than “cabal”.   Let’s try that. > > > > That failed too.  Clutching at straws, that > “youProbablyWantCapitalCabal” is suggestive. Let’s try: > > bash$ cabal install Cabal > > Resolving dependencies... > > Up to date > > cabal: installdir is not defined. Set it in your cabal config file or use > > --installdir= > > Back to that again. > > I’m not truly stuck on any of this.  But somehow my high failure rate > is discouraging, and I thought you’d probably want to know how I stumbled. > > Where could I read about the difference between “cabal install Cabal” > and “cabal install cabal-install”? > > Simon > > Here’s the cabal install cabal-install output, which has a totally new > failure.  Something about zlib.h, but I have no idea how to fix it. > > simonpj at MSRC-3645512:~/tmp$ cabal install cabal-install > > Resolving dependencies... > > Build profile: -w ghc-8.6.4 -O1 > > In order, the following will be built (use -v for more details): > > - async-2.2.1 (lib) (requires download & build) > > - base16-bytestring-0.1.1.6 (lib:base16-bytestring) (requires download > & build) > > - base64-bytestring-1.0.0.2 (lib) (requires build) > > - cryptohash-sha256-0.11.101.0 (lib) (requires download & build) > > - digest-0.0.1.2 (lib:digest) (requires download & build) > > - echo-0.1.3 (lib) (requires download & build) > > - ed25519-0.0.5.0 (lib) (requires download & build) > > - edit-distance-0.2.2.1 (lib) (requires download & build) > > - hsc2hs-0.68.4 (exe:hsc2hs) (requires download & build) > > - network-uri-2.6.1.0 (lib) (requires download & build) > > - tar-0.5.1.0 (lib) (requires download & build) > > - zlib-0.6.2 (lib) (requires download & build) > > - resolv-0.1.1.2 (lib:resolv) (requires download & build) > > - network-3.1.0.0 (lib:network) (requires download & build) > > - zip-archive-0.4.1 (lib) (requires download & build) > > - hackage-security-0.5.3.0 (lib) (requires download & build) > > - HTTP-4000.3.13 (lib) (requires download & build) > > - cabal-install-2.4.1.0 (exe:cabal) (requires download & build) > > Downloading  base16-bytestring-0.1.1.6 > > Starting     base64-bytestring-1.0.0.2 (lib) > > Downloaded   base16-bytestring-0.1.1.6 > > Downloading  cryptohash-sha256-0.11.101.0 > > Starting     base16-bytestring-0.1.1.6 (all, legacy fallback) > > Downloaded   cryptohash-sha256-0.11.101.0 > > Downloading  digest-0.0.1.2 > > Starting     cryptohash-sha256-0.11.101.0 (lib) > > Building     base64-bytestring-1.0.0.2 (lib) > > Downloaded   digest-0.0.1.2 > > Downloading  ed25519-0.0.5.0 > > Building     base16-bytestring-0.1.1.6 (all, legacy fallback) > > Starting     digest-0.0.1.2 (all, legacy fallback) > > Downloaded   ed25519-0.0.5.0 > > Downloading  zlib-0.6.2 > > Starting     ed25519-0.0.5.0 (lib) > > Building     cryptohash-sha256-0.11.101.0 (lib) > > Downloaded   zlib-0.6.2 > > Downloading  resolv-0.1.1.2 > > Installing   base16-bytestring-0.1.1.6 (all, legacy fallback) > > Starting     zlib-0.6.2 (lib) > > Building     ed25519-0.0.5.0 (lib) > > Installing   base64-bytestring-1.0.0.2 (lib) > > Downloaded   resolv-0.1.1.2 > > Downloading  echo-0.1.3 > > Completed    base16-bytestring-0.1.1.6 (all, legacy fallback) > > Completed    base64-bytestring-1.0.0.2 (lib) > > Downloaded   echo-0.1.3 > > Downloading  hsc2hs-0.68.4 > > Starting     echo-0.1.3 (lib) > > Downloaded   hsc2hs-0.68.4 > > Downloading  network-3.1.0.0 > > Starting     hsc2hs-0.68.4 (exe:hsc2hs) > > Installing   cryptohash-sha256-0.11.101.0 (lib) > > Downloaded   network-3.1.0.0 > > Downloading  edit-distance-0.2.2.1 > > Completed    cryptohash-sha256-0.11.101.0 (lib) > > Building     echo-0.1.3 (lib) > > Downloaded   edit-distance-0.2.2.1 > > Downloading  tar-0.5.1.0 > > Starting     edit-distance-0.2.2.1 (lib) > > Building     hsc2hs-0.68.4 (exe:hsc2hs) > > Downloaded   tar-0.5.1.0 > > Downloading  async-2.2.1 > > Starting     tar-0.5.1.0 (lib) > > Downloaded   async-2.2.1 > > Downloading  network-uri-2.6.1.0 > > Installing   echo-0.1.3 (lib) > > Starting     async-2.2.1 (lib) > > Installing   ed25519-0.0.5.0 (lib) > > Building     edit-distance-0.2.2.1 (lib) > > Downloaded   network-uri-2.6.1.0 > > Downloading  zip-archive-0.4.1 > > Starting     network-uri-2.6.1.0 (lib) > > Completed    echo-0.1.3 (lib) > > Completed    ed25519-0.0.5.0 (lib) > > Building     tar-0.5.1.0 (lib) > > Downloaded   zip-archive-0.4.1 > > Downloading  HTTP-4000.3.13 > > Building     async-2.2.1 (lib) > > Building     network-uri-2.6.1.0 (lib) > > Downloaded   HTTP-4000.3.13 > > Downloading  hackage-security-0.5.3.0 > > Downloaded   hackage-security-0.5.3.0 > > Downloading  cabal-install-2.4.1.0 > > Downloaded   cabal-install-2.4.1.0 > > Installing   async-2.2.1 (lib) > > Installing   edit-distance-0.2.2.1 (lib) > > Completed    async-2.2.1 (lib) > > Completed    edit-distance-0.2.2.1 (lib) > > Installing   hsc2hs-0.68.4 (exe:hsc2hs) > > Completed    hsc2hs-0.68.4 (exe:hsc2hs) > > Installing   network-uri-2.6.1.0 (lib) > > Completed    network-uri-2.6.1.0 (lib) > > Installing   tar-0.5.1.0 (lib) > > Completed    tar-0.5.1.0 (lib) > > Failed to build digest-0.0.1.2. The failure occurred during the configure > > step. > > Build log ( > > /home/simonpj/.cabal/logs/ghc-8.6.4/digest-0.0.1.2-14bc149eb1d9c6a16b30ce20fef469dafeaea1cbba4f9615d23d3b4f1a2da8bd.log > > ): > > Configuring digest-0.0.1.2... > > cabal: Missing dependency on a foreign library: > > * Missing (or bad) header file: zlib.h > > * Missing (or bad) C library: z > > This problem can usually be solved by installing the system package that > > provides this library (you may need the "-dev" version). If the library is > > already installed but in a non-standard location then you can use the > flags > > --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the > > library file does exist, it may contain errors that are caught by the C > > compiler at the preprocessing stage. In this case you can re-run configure > > with the verbosity flag -v3 to see the error messages. > > If the header file does exist, it may contain errors that are caught > by the C > > compiler at the preprocessing stage. In this case you can re-run configure > > with the verbosity flag -v3 to see the error messages. > > Failed to build zlib-0.6.2. The failure occurred during the configure > step. > > Build log ( > > /home/simonpj/.cabal/logs/ghc-8.6.4/zlib-0.6.2-2039caedabd32f9ed378900645b72766a462d68bf828625f67296cbc28fa173e.log > > ): > > Configuring library for zlib-0.6.2.. > > cabal: Missing dependency on a foreign library: > > * Missing (or bad) header file: zlib.h > > * Missing (or bad) C library: z > > This problem can usually be solved by installing the system package that > > provides this library (you may need the "-dev" version). If the library is > > already installed but in a non-standard location then you can use the > flags > > --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the > > library file does exist, it may contain errors that are caught by the C > > compiler at the preprocessing stage. In this case you can re-run configure > > with the verbosity flag -v3 to see the error messages. > > If the header file does exist, it may contain errors that are caught > by the C > > compiler at the preprocessing stage. In this case you can re-run configure > > with the verbosity flag -v3 to see the error messages. > > cabal: Failed to build digest-0.0.1.2 (which is required by > > cabal-install-2.4.1.0). See the build log above for details. > > Failed to build zlib-0.6.2 (which is required by > cabal-install-2.4.1.0). See > > the build log above for details. > > *From:*Oleg Grenrus > *Sent:* 30 May 2019 20:30 > *To:* Simon Peyton Jones ; cabal-devel at haskell.org > *Subject:* Re: Installation failed > > Hi again Simon, > > Few points, If you run Windows 10 (Pro?), you can setup to make > symlinks without needing administrator privileges. I used > https://github.com/git-for-windows/git/wiki/Symbolic-Links > > guide. Unfortunately I don't remember all the details I did (i.e. if > the guide is complete), but enabling Developer Mode is easy to forget. > > About installing and symlinking: > - `cabal update-config` should populate your ~/.cabal/config with new > default configuration. which will have install-dir: there too. You can > also manually edit it to add the new configuration option. > - Most of install woes are fixed in March [1], but there weren't a > release with those fixes. > > - [1] https://github.com/haskell/cabal/pull/5870 > > > Cheers, > Oleg > > On 30.5.2019 16.57, Simon Peyton Jones wrote: > > Dear Cabal developers > > More woe: > > simonpj at MSRC-3645512:~$ cabal install lhs2tex > > Resolving dependencies... > > Up to date > > cabal: installdir is not defined. Set it in your cabal config file > or use > > --installdir= > > In the olden days, didn’t cabal install by default in ~/.cabal/bin? > > Never mind, let’s do what it asks: > > simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin > > Resolving dependencies... > > Up to date > > Symlinking 'lhs2TeX' > > /usr/bin/lhs2TeX: createSymbolicLink: permission denied > (Permission denied) > > Darn: I need to be super-user.  Fine: > > simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex > --installdir=/usr/bin > > [sudo] password for simonpj: > > cabal: unrecognized 'install' option `--installdir=/usr/bin' > > OK _/now/_ I really am stumped. It asked me to provide that > option, and now it says it’s unrecognised. > > (This is in a bash shell running in emacs, if it makes a difference.) > > What next? > > Thanks > > Simon > > > > _______________________________________________ > > cabal-devel mailing list > > cabal-devel at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri May 31 09:10:11 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 31 May 2019 09:10:11 +0000 Subject: Cabal install In-Reply-To: <3d6d22ec-0556-dce7-1257-7eb460a19552@iki.fi> References: <3d6d22ec-0556-dce7-1257-7eb460a19552@iki.fi> Message-ID: Solution is to change directory (cd) somewhere else and try again. (There's also cabal install -z flag feature request, -z to ignore local project; but it's not yet merged). Yes, that's what I worked out in the end. But it doesn't feel like a solution; it feels like a workaround. My point is that (for this user at least) it's deeply strange. I would not expect 'apt install ' to behave differently in different directories. I'm saying "please do X" - in this case install a package - and it's terribly confusing to me if that's radically affected by which directory I'm in. I'm not saying it's wrong - everything about UI is a judgement - just that it may be very counter-productive for some users. Simon From: Oleg Grenrus Sent: 31 May 2019 09:31 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Cabal install Hi Simon, I see, you triggered another feature/bug of cabal install, namely when you are in a project directory, project settings affect solving process. And when there's a .cabal file, it's a project. So cabal tried to find an install plan containing local packages (that makes sense, if you try to install local lhs2tex for example!) Solution is to change directory (cd) somewhere else and try again. (There's also cabal install -z flag feature request, -z to ignore local project; but it's not yet merged). - Oleg On 31.5.2019 11.02, Simon Peyton Jones wrote: Thanks Oleg my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. I am confident I did nothing like that. But there is a file called report.cabal in the directory where I did the 'cabal install lhs2tex' command. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? There is no such file: bash$ ls ~/.ghc ghci_history x86_64-linux-8.9.0.20190414 x86_64-linux-8.9.0.20190508 x86_64-linux-8.6.4 x86_64-linux-8.9.0.20190430 x86_64-linux-8.9.0.20190527 bash$ ls ~/.ghc/x86_64-linux-8.6.4/ package.conf.d Simon From: Oleg Grenrus Sent: 30 May 2019 20:19 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Cabal install Hi Simon, my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. In that case, you are hitting the unfortunate cabal bug [1]. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? If so, the simplest fix is to remove that environment file. - [1] https://github.com/haskell/cabal/issues/5888 https://github.com/haskell/cabal/issues/5559 Cheers, Oleg On 30.5.2019 16.50, Simon Peyton Jones wrote: Dear friendly Cabal folk Here's what happened to me today bash$ cabal install lhs2tex cabal: Could not resolve dependencies: [__0] next goal: report (user goal) [__0] rejecting: report-0.1.0.0 (conflict: requires UnsaturatedTypeFamilies) [__0] fail (backjumping, conflict set: report) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: report Crumbs. What is 'report'? Why does it need UnsaturatedTypeFamilies? I'm totally lost. Then, in an inspired moment, I thought to change to a different directory, ~/tmp. Then quite different things happened - it downloaded and built relevant libraries. I think that there just happened to be a .cabal file in the original directory I was in at the time. That appears to affect what 'cabal install' does in a truly radical way. My point is this: this is terribly confusing for the user (at least for this on). I'd be shocked if 'apt install blah' behaved utterly differently in different directories. I'm going to make a little empty directory somewhere, and cd to it before invoking cabal in future. But that just feels like a workaround, not a solution. I'm not saying it's wrong - just giving you a data point that it had one user completely stumped Simon _______________________________________________ cabal-devel mailing list cabal-devel at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri May 31 09:14:16 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 31 May 2019 09:14:16 +0000 Subject: Cabal install In-Reply-To: References: <3d6d22ec-0556-dce7-1257-7eb460a19552@iki.fi> Message-ID: PS: would a -z flag have helped me? Alas no: I would never have found it. I had no idea that cabal was looking at a local project. I can see this is a difficult UI problem From: Simon Peyton Jones Sent: 31 May 2019 10:10 To: Oleg Grenrus ; cabal-devel at haskell.org Cc: Simon Peyton-Jones (simonpj at microsoft.com) Subject: RE: Cabal install Solution is to change directory (cd) somewhere else and try again. (There's also cabal install -z flag feature request, -z to ignore local project; but it's not yet merged). Yes, that's what I worked out in the end. But it doesn't feel like a solution; it feels like a workaround. My point is that (for this user at least) it's deeply strange. I would not expect 'apt install ' to behave differently in different directories. I'm saying "please do X" - in this case install a package - and it's terribly confusing to me if that's radically affected by which directory I'm in. I'm not saying it's wrong - everything about UI is a judgement - just that it may be very counter-productive for some users. Simon From: Oleg Grenrus > Sent: 31 May 2019 09:31 To: Simon Peyton Jones >; cabal-devel at haskell.org Subject: Re: Cabal install Hi Simon, I see, you triggered another feature/bug of cabal install, namely when you are in a project directory, project settings affect solving process. And when there's a .cabal file, it's a project. So cabal tried to find an install plan containing local packages (that makes sense, if you try to install local lhs2tex for example!) Solution is to change directory (cd) somewhere else and try again. (There's also cabal install -z flag feature request, -z to ignore local project; but it's not yet merged). - Oleg On 31.5.2019 11.02, Simon Peyton Jones wrote: Thanks Oleg my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. I am confident I did nothing like that. But there is a file called report.cabal in the directory where I did the 'cabal install lhs2tex' command. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? There is no such file: bash$ ls ~/.ghc ghci_history x86_64-linux-8.9.0.20190414 x86_64-linux-8.9.0.20190508 x86_64-linux-8.6.4 x86_64-linux-8.9.0.20190430 x86_64-linux-8.9.0.20190527 bash$ ls ~/.ghc/x86_64-linux-8.6.4/ package.conf.d Simon From: Oleg Grenrus Sent: 30 May 2019 20:19 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Cabal install Hi Simon, my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project. In that case, you are hitting the unfortunate cabal bug [1]. To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? If so, the simplest fix is to remove that environment file. - [1] https://github.com/haskell/cabal/issues/5888 https://github.com/haskell/cabal/issues/5559 Cheers, Oleg On 30.5.2019 16.50, Simon Peyton Jones wrote: Dear friendly Cabal folk Here's what happened to me today bash$ cabal install lhs2tex cabal: Could not resolve dependencies: [__0] next goal: report (user goal) [__0] rejecting: report-0.1.0.0 (conflict: requires UnsaturatedTypeFamilies) [__0] fail (backjumping, conflict set: report) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: report Crumbs. What is 'report'? Why does it need UnsaturatedTypeFamilies? I'm totally lost. Then, in an inspired moment, I thought to change to a different directory, ~/tmp. Then quite different things happened - it downloaded and built relevant libraries. I think that there just happened to be a .cabal file in the original directory I was in at the time. That appears to affect what 'cabal install' does in a truly radical way. My point is this: this is terribly confusing for the user (at least for this on). I'd be shocked if 'apt install blah' behaved utterly differently in different directories. I'm going to make a little empty directory somewhere, and cd to it before invoking cabal in future. But that just feels like a workaround, not a solution. I'm not saying it's wrong - just giving you a data point that it had one user completely stumped Simon _______________________________________________ cabal-devel mailing list cabal-devel at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri May 31 19:47:36 2019 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 31 May 2019 19:47:36 +0000 Subject: Installation failed In-Reply-To: <8b2dc622-9930-5b62-dd45-8fd9810b996f@iki.fi> References: <49f9ad08-3ad9-c9fe-4692-04c18b50cc00@iki.fi> <8b2dc622-9930-5b62-dd45-8fd9810b996f@iki.fi> Message-ID: Reinstalling cabal-install (from Hackage) via cabal-install is currently not well exercised codepath. People usually install cabal from either Herbert's PPA, via ghcup or chocolatey package managers. So even I don't see reason installing cabal-install via cabal-install shouldn't work, I don't recommend it. I have never heard of Herbert's PPA, or ghcup, or choclatey. Cabal is a Haskell program, hosted on Hackage, so shouldn't I install it with cabal? At least that's what I thought. Of course, there's a chicken-and-egg problem there. I think I started with bash$ sudo apt install autoconf emacs git ghc cabal-install haskell-stack alex happy Mind you, I recall that I then got incomprehensible crashes when running cabal - something about "futex error". Then I think someone held my hand and got it going - and that might have involved a repository of Herbert's. But I quickly forgot, because I understood it as a temporary hack needed until some pretty major bug was fixed. (Which leads me to ask: is the futex-error crash fixed? Maybe it's a WSL bug?) Anyway this is all a roundabout way of saying that it's a surprise to me that I can't use cabal to update itself. Sorry to be so dim ... but other users may be too so in a way I'm trying not to be too clever :-). Thanks for beign responsive. Simon From: Oleg Grenrus Sent: 31 May 2019 09:47 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Installation failed Sorry, I wrote non-sense, the command is cabal user-config update -- cabal-install-3.0.0.0 is the latest (and in fact non-released) version you can have. Your last (failed) attempt actually wanted to install cabal-install-2.4.1.0! Reinstalling cabal-install (from Hackage) via cabal-install is currently not well exercised codepath. People usually install cabal from either Herbert's PPA, via ghcup or chocolatey package managers. So even I don't see reason installing cabal-install via cabal-install shouldn't work, I don't recommend it. The zlib.h failure is related to no zlib library - development parts installed. On Ubuntu the headers can be installed by "apt-get install zlib1g-dev". Unfortunately I have no experience with WSL, if that's as easy there. - Oleg On 31.5.2019 11.17, Simon Peyton Jones wrote: Few points, If you run Windows 10 (Pro?), you can setup to make symlinks without needing administrator privileges Actually I've now switched to using the Windows Subsytem for Linux (WSL), which works pretty well and means that I don't need to be the beta-tester for windows :-). I should have said - this thread is about Ubuntu Linux in WSL. - `cabal update-config` should populate your ~/.cabal/config with new default configuration. which will have install-dir: there too. You can also manually edit it to add the new configuration option. Alas not: bash$ cabal update-config cabal: unrecognised command: update-config (try --help) bash$ cabal --version cabal-install version 3.0.0.0 compiled using version 3.0.0.0 of the Cabal library Perhaps my cabal is out of date. Hmm. Maybe I should try to update it? bash$ cabal update cabal cabal: 'v2-update' repo(s): "cabal" can not be found in known remote repo(s): hackage.haskell.org Nope. Maybe I should just install it afresh? Maybe that would update it? basj$ cabal install cabal Resolving dependencies... cabal: Could not resolve dependencies: [__0] trying: cabal-0.0.0.0 (user goal) [__1] unknown package: youProbablyWantCapitalCabal (dependency of cabal) [__1] fail (backjumping, conflict set: cabal, youProbablyWantCapitalCabal) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: cabal, youProbablyWantCapitalCabal Oh dear. I have a vague hind-brain memory that you have to install "cabal-install" rather than "cabal". Let's try that. That failed too. Clutching at straws, that "youProbablyWantCapitalCabal" is suggestive. Let's try: bash$ cabal install Cabal Resolving dependencies... Up to date cabal: installdir is not defined. Set it in your cabal config file or use --installdir= Back to that again. I'm not truly stuck on any of this. But somehow my high failure rate is discouraging, and I thought you'd probably want to know how I stumbled. Where could I read about the difference between "cabal install Cabal" and "cabal install cabal-install"? Simon Here's the cabal install cabal-install output, which has a totally new failure. Something about zlib.h, but I have no idea how to fix it. simonpj at MSRC-3645512:~/tmp$ cabal install cabal-install Resolving dependencies... Build profile: -w ghc-8.6.4 -O1 In order, the following will be built (use -v for more details): - async-2.2.1 (lib) (requires download & build) - base16-bytestring-0.1.1.6 (lib:base16-bytestring) (requires download & build) - base64-bytestring-1.0.0.2 (lib) (requires build) - cryptohash-sha256-0.11.101.0 (lib) (requires download & build) - digest-0.0.1.2 (lib:digest) (requires download & build) - echo-0.1.3 (lib) (requires download & build) - ed25519-0.0.5.0 (lib) (requires download & build) - edit-distance-0.2.2.1 (lib) (requires download & build) - hsc2hs-0.68.4 (exe:hsc2hs) (requires download & build) - network-uri-2.6.1.0 (lib) (requires download & build) - tar-0.5.1.0 (lib) (requires download & build) - zlib-0.6.2 (lib) (requires download & build) - resolv-0.1.1.2 (lib:resolv) (requires download & build) - network-3.1.0.0 (lib:network) (requires download & build) - zip-archive-0.4.1 (lib) (requires download & build) - hackage-security-0.5.3.0 (lib) (requires download & build) - HTTP-4000.3.13 (lib) (requires download & build) - cabal-install-2.4.1.0 (exe:cabal) (requires download & build) Downloading base16-bytestring-0.1.1.6 Starting base64-bytestring-1.0.0.2 (lib) Downloaded base16-bytestring-0.1.1.6 Downloading cryptohash-sha256-0.11.101.0 Starting base16-bytestring-0.1.1.6 (all, legacy fallback) Downloaded cryptohash-sha256-0.11.101.0 Downloading digest-0.0.1.2 Starting cryptohash-sha256-0.11.101.0 (lib) Building base64-bytestring-1.0.0.2 (lib) Downloaded digest-0.0.1.2 Downloading ed25519-0.0.5.0 Building base16-bytestring-0.1.1.6 (all, legacy fallback) Starting digest-0.0.1.2 (all, legacy fallback) Downloaded ed25519-0.0.5.0 Downloading zlib-0.6.2 Starting ed25519-0.0.5.0 (lib) Building cryptohash-sha256-0.11.101.0 (lib) Downloaded zlib-0.6.2 Downloading resolv-0.1.1.2 Installing base16-bytestring-0.1.1.6 (all, legacy fallback) Starting zlib-0.6.2 (lib) Building ed25519-0.0.5.0 (lib) Installing base64-bytestring-1.0.0.2 (lib) Downloaded resolv-0.1.1.2 Downloading echo-0.1.3 Completed base16-bytestring-0.1.1.6 (all, legacy fallback) Completed base64-bytestring-1.0.0.2 (lib) Downloaded echo-0.1.3 Downloading hsc2hs-0.68.4 Starting echo-0.1.3 (lib) Downloaded hsc2hs-0.68.4 Downloading network-3.1.0.0 Starting hsc2hs-0.68.4 (exe:hsc2hs) Installing cryptohash-sha256-0.11.101.0 (lib) Downloaded network-3.1.0.0 Downloading edit-distance-0.2.2.1 Completed cryptohash-sha256-0.11.101.0 (lib) Building echo-0.1.3 (lib) Downloaded edit-distance-0.2.2.1 Downloading tar-0.5.1.0 Starting edit-distance-0.2.2.1 (lib) Building hsc2hs-0.68.4 (exe:hsc2hs) Downloaded tar-0.5.1.0 Downloading async-2.2.1 Starting tar-0.5.1.0 (lib) Downloaded async-2.2.1 Downloading network-uri-2.6.1.0 Installing echo-0.1.3 (lib) Starting async-2.2.1 (lib) Installing ed25519-0.0.5.0 (lib) Building edit-distance-0.2.2.1 (lib) Downloaded network-uri-2.6.1.0 Downloading zip-archive-0.4.1 Starting network-uri-2.6.1.0 (lib) Completed echo-0.1.3 (lib) Completed ed25519-0.0.5.0 (lib) Building tar-0.5.1.0 (lib) Downloaded zip-archive-0.4.1 Downloading HTTP-4000.3.13 Building async-2.2.1 (lib) Building network-uri-2.6.1.0 (lib) Downloaded HTTP-4000.3.13 Downloading hackage-security-0.5.3.0 Downloaded hackage-security-0.5.3.0 Downloading cabal-install-2.4.1.0 Downloaded cabal-install-2.4.1.0 Installing async-2.2.1 (lib) Installing edit-distance-0.2.2.1 (lib) Completed async-2.2.1 (lib) Completed edit-distance-0.2.2.1 (lib) Installing hsc2hs-0.68.4 (exe:hsc2hs) Completed hsc2hs-0.68.4 (exe:hsc2hs) Installing network-uri-2.6.1.0 (lib) Completed network-uri-2.6.1.0 (lib) Installing tar-0.5.1.0 (lib) Completed tar-0.5.1.0 (lib) Failed to build digest-0.0.1.2. The failure occurred during the configure step. Build log ( /home/simonpj/.cabal/logs/ghc-8.6.4/digest-0.0.1.2-14bc149eb1d9c6a16b30ce20fef469dafeaea1cbba4f9615d23d3b4f1a2da8bd.log ): Configuring digest-0.0.1.2... cabal: Missing dependency on a foreign library: * Missing (or bad) header file: zlib.h * Missing (or bad) C library: z This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the library file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. Failed to build zlib-0.6.2. The failure occurred during the configure step. Build log ( /home/simonpj/.cabal/logs/ghc-8.6.4/zlib-0.6.2-2039caedabd32f9ed378900645b72766a462d68bf828625f67296cbc28fa173e.log ): Configuring library for zlib-0.6.2.. cabal: Missing dependency on a foreign library: * Missing (or bad) header file: zlib.h * Missing (or bad) C library: z This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the library file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. cabal: Failed to build digest-0.0.1.2 (which is required by cabal-install-2.4.1.0). See the build log above for details. Failed to build zlib-0.6.2 (which is required by cabal-install-2.4.1.0). See the build log above for details. From: Oleg Grenrus Sent: 30 May 2019 20:30 To: Simon Peyton Jones ; cabal-devel at haskell.org Subject: Re: Installation failed Hi again Simon, Few points, If you run Windows 10 (Pro?), you can setup to make symlinks without needing administrator privileges. I used https://github.com/git-for-windows/git/wiki/Symbolic-Links guide. Unfortunately I don't remember all the details I did (i.e. if the guide is complete), but enabling Developer Mode is easy to forget. About installing and symlinking: - `cabal update-config` should populate your ~/.cabal/config with new default configuration. which will have install-dir: there too. You can also manually edit it to add the new configuration option. - Most of install woes are fixed in March [1], but there weren't a release with those fixes. - [1] https://github.com/haskell/cabal/pull/5870 Cheers, Oleg On 30.5.2019 16.57, Simon Peyton Jones wrote: Dear Cabal developers More woe: simonpj at MSRC-3645512:~$ cabal install lhs2tex Resolving dependencies... Up to date cabal: installdir is not defined. Set it in your cabal config file or use --installdir= In the olden days, didn't cabal install by default in ~/.cabal/bin? Never mind, let's do what it asks: simonpj at MSRC-3645512:~$ cabal install lhs2tex --installdir=/usr/bin Resolving dependencies... Up to date Symlinking 'lhs2TeX' /usr/bin/lhs2TeX: createSymbolicLink: permission denied (Permission denied) Darn: I need to be super-user. Fine: simonpj at MSRC-3645512:~$ sudo cabal install lhs2tex --installdir=/usr/bin [sudo] password for simonpj: cabal: unrecognized 'install' option `--installdir=/usr/bin' OK _now_ I really am stumped. It asked me to provide that option, and now it says it's unrecognised. (This is in a bash shell running in emacs, if it makes a difference.) What next? Thanks Simon _______________________________________________ cabal-devel mailing list cabal-devel at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: