tidalcycles / tidal-chocolatey

6 stars 5 forks source link

Install problems with cabal using chocolatey (msys path related) #1

Closed soundshaped closed 4 years ago

soundshaped commented 6 years ago

Hey - so I'm new to developing with windows so I'm very likely to forget to include some relevant information please just let me know.

Basically I'm running windows 10 and already had some things installed for package managing/development on windows but I wouldn't say my environment is organized and I imagine digital hygiene is likely the issue.

I have installed:

Error during install

So from looking at the output (I've saved the full output but here is the chunk where I noticed the error). Basically when cabal install tidal is install it seems like most things install fine but a few packages don't make it.

Here is the tail of the error

cabal.exe: Error: some packages failed to install:
hosc-0.16-KRLcX3bJjci5m0Ti6wrjEF depends on hosc-0.16 which failed to install.
network-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR failed during the configure step. The
exception was:
ExitFailure 1

streaming-commons-0.2.1.0-IOTa8Wyc6UUHltqRxcWw4C depends on
streaming-commons-0.2.1.0 which failed to install.

tidal-0.9.9-BrGVDMNo7ZRGkyCj7kZy6B depends on tidal-0.9.9 which failed to
install.

websockets-0.12.5.1-BVlcHX8FGZUCNl5SOaDjAU depends on websockets-0.12.5.1
which failed to install.

From what I'm gathering from this the install breaks down with the configure step failure of network-2.7.0.2 because it requires MinGW+MSYS which I have previously installed. How does cabal locate or look for MinGW+MSYS - is this a path related error?

In googling around these errors I found a github post from the author of this repo which addresses what I think is an identical error though not identical issue if that makes sense. The issue with the post in question seems to be the installation method of haskell. I'm under the impression that the choco install installs haskell and in powershell I can enter the haskell console fine though can't do import Sound.Tidal.OscStream. I can try downloading the full haskell from the website but it doesn't make sense to me that the haskell install via chocolatey wouldn't work while the other installer would work.

This the relevant info I can think to include right now. I'm happy to supply more if needed. Thanks!


here is the powershell output truncated to just the cabal part

cabal install tidal
Config file path source is default config file.
Config file C:\Users\Mark\AppData\Roaming\cabal\config not found.
Writing default configuration to C:\Users\Mark\AppData\Roaming\cabal\config
Downloading the latest package list from hackage.haskell.org
Resolving dependencies...
Downloading SHA-1.6.4.4...
Downloading base64-bytestring-1.0.0.1...
Downloading blaze-builder-0.4.1.0...
Configuring base64-bytestring-1.0.0.1...
Downloading bytestring-builder-0.10.8.1.0...
Configuring blaze-builder-0.4.1.0...
Configuring SHA-1.6.4.4...
Configuring bytestring-builder-0.10.8.1.0...
Building base64-bytestring-1.0.0.1...
Building blaze-builder-0.4.1.0...
Building SHA-1.6.4.4...
Building bytestring-builder-0.10.8.1.0...
Installed bytestring-builder-0.10.8.1.0
Downloading colour-2.3.4...
Configuring colour-2.3.4...
Installed base64-bytestring-1.0.0.1
Downloading data-binary-ieee754-0.4.4...
Configuring data-binary-ieee754-0.4.4...
Building colour-2.3.4...
Building data-binary-ieee754-0.4.4...
Installed blaze-builder-0.4.1.0
Downloading entropy-0.4.1.1...
Configuring entropy-0.4.1.1...
Installed data-binary-ieee754-0.4.4
Downloading hashable-1.2.7.0...
Configuring hashable-1.2.7.0...
Building hashable-1.2.7.0...
Installed colour-2.3.4
Downloading integer-logarithms-1.0.2.1...
Configuring integer-logarithms-1.0.2.1...
Building integer-logarithms-1.0.2.1...
Installed hashable-1.2.7.0
Downloading network-2.7.0.2...
Configuring network-2.7.0.2...
Failed to install network-2.7.0.2
Build log ( C:\Users\Mark\AppData\Roaming\cabal\logs\ghc-8.4.3\network-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR.log ):
Configuring network-2.7.0.2...
cabal.exe: The package has a './configure' script. If you are on Windows, This
requires a Unix compatibility toolchain such as MinGW+MSYS or Cygwin. If you
are not on Windows, ensure that an 'sh' command is discoverable in your path.
cabal: Leaving directory 'C:\Users\Mark\AppData\Local\Temp\chocolatey\cabal-tmp-15340\network-2.7.0.2'
Downloading primitive-0.6.4.0...
Installed integer-logarithms-1.0.2.1
Configuring primitive-0.6.4.0...
Building primitive-0.6.4.0...
Building entropy-0.4.1.1...
Installed SHA-1.6.4.4
Installed entropy-0.4.1.1
Installed primitive-0.6.4.0
cabal.exe: Error: some packages failed to install:
hosc-0.16-KRLcX3bJjci5m0Ti6wrjEF depends on hosc-0.16 which failed to install.

network-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR failed during the configure step. The

exception was:

ExitFailure 1

streaming-commons-0.2.1.0-IOTa8Wyc6UUHltqRxcWw4C depends on

streaming-commons-0.2.1.0 which failed to install.

tidal-0.9.9-BrGVDMNo7ZRGkyCj7kZy6B depends on tidal-0.9.9 which failed to

install.

websockets-0.12.5.1-BVlcHX8FGZUCNl5SOaDjAU depends on websockets-0.12.5.1

which failed to install.

Done.
d1 $ sound "bd sn"
Only an exit code of non-zero will fail the package by default. Set
 `--failonstderr` if you want error messages to also fail a script. See
 `choco -h` for details.
 The install of tidalcycles was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.

Chocolatey installed 9/9 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Installed:
 - ghc v8.4.3
 - msys2 v20180531.0.0
 - tidalcycles v0.9.9
 - git.install v2.18.0
 - cabal v2.2.0.0
 - sc3plugins v3.9.0
 - atom v1.29.0
 - git v2.18.0
 - supercollider v3.9.3.0

Did you know the proceeds of Pro (and some proceeds from other
 licensed editions) go into bettering the community infrastructure?
 Your support ensures an active community, keeps Chocolatey tip top,
 plus it nets you some awesome features!
 https://chocolatey.org/compare
soundshaped commented 6 years ago

overview of my solve (seems to be a path issue)

This is somewhat asked and answered by myself but I'm not convinced there isn't some kind of error occurring regarding how the choco install wasn't finding the dependency it installed itself.

I added C:\msys64\usr\bin to my System Variables PATH and running cabal install tidal in an admin powershell worked. As a clarification: in my previous post the second time I tried to do only the cabal part of the install was in a new admin powershell window because I figured the path might need to update. This might have not been the proper way in powershell - in bash I'm used to either exec $shell/source .bashrc/ or just opening a new window or tab to update environment variables. Maybe I should have exited the first window.

From checking my User Variables PATH it seems like I have two installations of MSYS64 as C:\tools\msys64 was already in the PATH after being installed this morning during the choco install tidal cycles first attempt (I imagine because I had not added the already installed MSYS64 bin to my path). Aside from my user error it does read as odd that while chocolatey was getting the dependencies installed and even installed MSYS64 that it didn't know where to find the dependency it had just installed.

Now in atom when trying to run the simple d1 $ sound "bd sn" I get the following error which I was also getting after the first install attempt: 'gchi' is not recognized as an internal or external command, operable program or batch file.' The same behavior followed in the powershell. Interestingly the command for the specific version of ghci worked ieghci-8.4.3.exe` was a recognized command.

Upon restarting atom after updating path and exiting all powershell windows and then opening a new powershell window tidal cycles works.

Why couldn't cabal in the choco install properly locate a dependency installed by the choco script

In a sense this is resolved but I'm hesitant to say that because my mildly informed opinion is that the chocolatey install should have worked originally and it seems like something broke down since it couldn't call on dependencies it had just installed to continue and finish the install without error. This computer isn't clean in the sense that it is a fresh install however it's only a couple months old, a secondary computer, with regard to tidal cycles it is clean - I hadn't install it nor supercollider.

Regardless I obviously don't have the expertise on the issue at this point so I'll stop typiing for now.

morikoh commented 5 years ago

I had a same problem. I added C:\Program Files\Haskell Platform\8.6.3\msys\usr\bin to system Variables PATH. Then I solved problem. Thanks.

yaxu commented 4 years ago

Closing as the chocolatey install has changed a fair bit - please reopen if this is still a problem.