tidalcycles / Tidal

Pattern language
http://tidalcycles.org/
GNU General Public License v3.0
2.21k stars 254 forks source link

Tidal installer for Linux #284

Open yaxu opened 6 years ago

yaxu commented 6 years ago

It's be great if there was an easier way to install tidal in Linux distros (see also equivalent issues for mac #282 and windows #283)

There is this install script, which might work for debian-based distros but needs some testing: https://github.com/tidalcycles/Tidal/blob/1.0-dev/doc/install-linux.sh

There are also ways of bundling up dependencies into universal packages for running on any linux-based system: https://snapcraft.io/

So perhaps there is potential for bundling everything up into an easy single download..

howbuildingsfail commented 6 years ago

fwiw, here are my notes on a tidal install I did in Jan, on Ubuntu 16.04....

Installing

Install haskell

from [https://www.haskell.org/platform/#linux-ubuntu]

sudo apt-get install haskell-platform

..that seemed to go without a hitch

Install Atom

download the .deb file from [https://atom.io/]

sudo apt-get install -f atom-amd64.deb

..that seemed to go without a hitch also!

Install supercollider

from [https://launchpad.net/~supercollider/+archive/ubuntu/ppa]

    sudo add-apt-repository ppa:supercollider/ppa
        sudo apt-get update
        sudo apt-get install supercollider

I chose not to give realtime priority to supercollider - it's caused big headaches in the past...

unfortuntely this method installs sc v3.6, which doesnt load suprdirt in the same way.... see[https://vimeo.com/69719708]

Install tidalcycles

    Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
    cabal: There is no package named 'tidal'.
    You may need to run 'cabal update' to get the latest list of available
packages.`
cabal update
cabal install tidal

this gave a 'backjump limit reached' error, which [https://github.com/haskell/cabal/issues/2535] shows how to fix with the --reorder-goals option:

cabal install tidal --reorder-goals

install worked fine after that!

install 'standard' dirt

[https://github.com/tidalcycles/Dirt]

Note you have to use the --recursive flag to get the samples folder to install!

cleary commented 6 years ago

Fwiw I've bundled a lot of this into an ansible playbook/role: https://github.com/cleary/ansible?files=1

The parts I see as sticking points at the moment have to do with the start up - jack must be running, supercollider must be running, then you need to choose your default editor - given atom is not in any main distro repos yet then it should not be the default in favour of something already packaged. A tidal start up manager would ideally check/get everything in a sane/user friendly way

snj33v commented 6 years ago

self contained installation with a script possible?

yaxu commented 6 years ago

@snj33v how do you mean self-contained? there is a script listed in the issue above

snj33v commented 6 years ago

sorry, not script, meant as container like docker

telephon commented 6 years ago

according to https://launchpad.net/~supercollider/+archive/ubuntu/ppa There should be a 3.9.1 package for ubuntu.

yaxu commented 6 years ago

It'd be good to get tidal into debian, Dan Stowell shows the way here: http://mcld.co.uk/blog/2017/how-to-package-supercollider-for-debian-and-ubuntu-linux.html

telephon commented 6 years ago

Also watch / (contribute to) this, maybe that is the way to go? https://github.com/supercollider/supercollider/issues/3604

cleary commented 6 years ago

These last few comments have got me a bit confused since they're referencing supercollider, and not tidalcycles.

The detail by @yaxu is a great how to for interacting with the debian multimedia maintainers, but the architectural issues I raised earlier still need to be resolved before you get anywhere near that part of the process.

Snaps/AppImage/Flatpak images are certainly a possibility as well, but as far as I can tell, they are just as valid a packaging method as .deb or .rpm (or any other) - all of which tidalcycles should be considering as a target anyway.

In my opinion, all of this is a moot point because it still comes back to first resolving the architectural issues I raised (what editor to depend on, can we build a cross-distro startup manager to handle jack/supercollider/superdirt/tidal startup, kind of like ardour I would imagine)

yaxu commented 6 years ago

Yes true @cleary, I was just looking for ideas from the supercollider community. I've always found the process of contributing a package to debian, and Dan Stowell's post demystifies it a bit for me.

I agree standard .debs would be ideal. The tidal library is already in debian testing: https://packages.debian.org/buster/libghc-tidal-dev Supercollider 3.8 is too.

So just the editor, superdirt and its samples are missing.

This isn't an ideal way of distributing tidal though, due to debian's slow release cycle.. But I guess we can always ask people to upgrade via cabal install tidal.

It's true that atom is a problem, due to its lack of distro packages. Another issue is this supercollider bug, which means sclang can't run headless (without compiling in a patch): https://github.com/supercollider/supercollider/issues/2144

So perhaps assembling everything -- supercollider (with patch), superdirt, haskell, tidal, and an editor -- into a single cross-distro package like flatpak or similar, is the way to go.. With startup management as you suggest.

cleary commented 6 years ago
Yes true @cleary, I was just looking for ideas from the supercollider community. I've always found the process of contributing a package to debian, and Dan Stowell's post demystifies it a bit for me.

I agree standard .debs would be ideal. The tidal library is already in debian testing: https://packages.debian.org/buster/libghc-tidal-dev
Supercollider 3.8 is too.

So just the editor, superdirt and its samples are missing.

Awesome, I didn't notice that - every step means one step less :D

This isn't an ideal way of distributing tidal though, due to debian's slow release cycle.. But I guess we can always ask people to upgrade via cabal install tidal.

Debian's package release cycle isn't actually slow, it's the Debian Stable release cycle that is slow (by design, hence the name). Packages in debian unstable (sid) and testing are released early and often (and where ubuntu frequently sources it's packages from).

It's true that atom is a problem, due to its lack of distro packages.

I found this today: https://discuss.atom.io/t/why-isnt-atom-in-any-official-repository/29294/25?u=cleary It looks like atom is another step closer to being in official distro repos, now that the atom team are maintaining and packaging for common distro package formats. It should be a small step from here for a distro package maintainer to take it on and contribute packages directly to distro repos.

Another issue is this supercollider bug, which means sclang can't run headless (without compiling in a patch): supercollider/supercollider#2144

Aha, I was wondering about that myself - will read up when I have a bit more spare time (will try and get that into my ansible-playbook automation).

So perhaps assembling everything -- supercollider (with patch), superdirt, haskell, tidal, and an editor -- into a single cross-distro package like flatpak or similar, is the way to go.. With startup management as you suggest.

Yep, but I disagree with limiting ourselves to cross-distro packages - if it's convenient to package, it should be convenient to package on per-distro basis as well, for any formats that you can find package maintainers for (debian, ubuntu, arch, fedora, etc).

To be honest, it's looking a lot closer to a possibility already :)

yaxu commented 6 years ago

Ok, makes sense.

Personally I use the emacs plugin. The vim plugin seems quite popular too. I think those two editors are in debian ;) The emacs plugin is already in MELPA https://melpa.org/#/tidal , so can be installed from within emacs.

One issue is that much of Dirt-samples is of questionable origin, and unlikely to meet the licensing standards of Debian. We are very overdue splitting them out into a repository of nicely creative commons licensed samplebanks.. But would debian want a large package of sound samples?

cleary commented 6 years ago

Yeah, I mentioned giving preference to an editor that was already packaged - I use atom so I wasn't sure how well the other options worked.

Re the dirt samples, I'm not a debian developer by any means, but there's usually an option. If "questionable origin" means legally obtained, but not necessarily available under a "Debian Free Software Guidelines" (DFSG) compatible license, then the contrib repository exists for this reason (which allows dfsg compatible software with non-dfsg dependencies). I would envisage two packages: dirt-samples and dirt-samples-nonfree to cover this.

Another possibility is to handle the scenario where samples are specifically not licensed for distribution (but still free, ala oracle-java, adobe-flashplayer, ttf-mscorefonts), and you'd use a pre/postinst hook to download the samples during package installation

cleary commented 6 years ago

@MoiRouhs this thread is specifically related to the path to packaging tidal cycles, not general troubleshooting - can I recommend you create a separate issue, or visit some of the community channels listed here: http://blog.tidalcycles.org/community/

fatmilktv commented 6 years ago

I use Arch mostly and Manjaro only for friends and clients, so I'm of dubious judgment. I do know they're related..I think the way around this is to install https://www.archlinux.org/packages/community/x86_64/stack/. Use your available package manager. Feel free to let me know what this is.

On Mon, Apr 2, 2018 at 1:33 AM Carlos Rocha notifications@github.com wrote:

I have this problem when I try to install tidal cycles. How to solve this problem in manjaro linux?

[carlos@carlos-pc ~]$ cabal install tidal Resolving dependencies... Notice: installing into a sandbox located at /home/carlos/.cabal-sandbox Configuring mersenne-random-pure64-0.2.2.0... Configuring blaze-builder-0.4.1.0... Building blaze-builder-0.4.1.0... Building mersenne-random-pure64-0.2.2.0... Failed to install mersenne-random-pure64-0.2.2.0 Build log ( /home/carlos/.cabal-sandbox/logs/ghc-8.2.2/mersenne-random-pure64-0.2.2.0-60uKuwEkCr4HbgBy9XHGZP.log ): cabal: Entering directory '/tmp/cabal-tmp-6483/mersenne-random-pure64-0.2.2.0' Configuring mersenne-random-pure64-0.2.2.0... Preprocessing library for mersenne-random-pure64-0.2.2.0.. Building library for mersenne-random-pure64-0.2.2.0.. [1 of 4] Compiling System.Random.Mersenne.Pure64.Base ( dist/dist-sandbox-94bb7a0e/build/System/Random/Mersenne/Pure64/Base.hs, dist/dist-sandbox-94bb7a0e/build/System/Random/Mersenne/Pure64/Base.o ) [2 of 4] Compiling System.Random.Mersenne.Pure64.Internal ( System/Random/Mersenne/Pure64/Internal.hs, dist/dist-sandbox-94bb7a0e/build/System/Random/Mersenne/Pure64/Internal.o ) [3 of 4] Compiling System.Random.Mersenne.Pure64.MTBlock ( System/Random/Mersenne/Pure64/MTBlock.hs, dist/dist-sandbox-94bb7a0e/build/System/Random/Mersenne/Pure64/MTBlock.o ) [4 of 4] Compiling System.Random.Mersenne.Pure64 ( System/Random/Mersenne/Pure64.hs, dist/dist-sandbox-94bb7a0e/build/System/Random/Mersenne/Pure64.o )

System/Random/Mersenne/Pure64.hs:48:1: error: Could not find module ‘System.Random’ There are files missing in the ‘random-1.1’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 48 | import System.Random | ^^^^^^^^^^^^^^^^^^^^ cabal: Leaving directory '/tmp/cabal-tmp-6483/mersenne-random-pure64-0.2.2.0' Configuring streaming-commons-0.2.0.0... Building streaming-commons-0.2.0.0... Failed to install blaze-builder-0.4.1.0 Build log ( /home/carlos/.cabal-sandbox/logs/ghc-8.2.2/blaze-builder-0.4.1.0-76A6rNBvwvR8MTgrMARis4.log ): cabal: Entering directory '/tmp/cabal-tmp-6482/blaze-builder-0.4.1.0' Configuring blaze-builder-0.4.1.0... Preprocessing library for blaze-builder-0.4.1.0.. Building library for blaze-builder-0.4.1.0.. [ 1 of 11] Compiling Blaze.ByteString.Builder.Internal.Write ( Blaze/ByteString/Builder/Internal/Write.hs, dist/dist-sandbox-94bb7a0e/build/Blaze/ByteString/Builder/Internal/Write.o ) [ 2 of 11] Compiling Blaze.ByteString.Builder.Compat.Write ( Blaze/ByteString/Builder/Compat/Write.hs, dist/dist-sandbox-94bb7a0e/build/Blaze/ByteString/Builder/Compat/Write.o ) [ 3 of 11] Compiling Blaze.ByteString.Builder.Int ( Blaze/ByteString/Builder/Int.hs, dist/dist-sandbox-94bb7a0e/build/Blaze/ByteString/Builder/Int.o ) [ 4 of 11] Compiling Blaze.ByteString.Builder.Html.Word ( Blaze/ByteString/Builder/Html/Word.hs, dist/dist-sandbox-94bb7a0e/build/Blaze/ByteString/Builder/Html/Word.o ) [ 5 of 11] Compiling Blaze.ByteString.Builder.Char8 ( Blaze/ByteString/Builder/Char8.hs, dist/dist-sandbox-94bb7a0e/build/Blaze/ByteString/Builder/Char8.o )

Blaze/ByteString/Builder/Char8.hs:37:1: error: Could not find module ‘Data.Text’ There are files missing in the ‘text-1.2.3.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 37 | import qualified Data.Text as TS | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Blaze/ByteString/Builder/Char8.hs:38:1: error: Could not find module ‘Data.Text.Lazy’ There are files missing in the ‘text-1.2.3.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 38 | import qualified Data.Text.Lazy as TL | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cabal: Leaving directory '/tmp/cabal-tmp-6482/blaze-builder-0.4.1.0' Failed to install streaming-commons-0.2.0.0 Build log ( /home/carlos/.cabal-sandbox/logs/ghc-8.2.2/streaming-commons-0.2.0.0-8aHSty4okIT2XDZrEAxkjm.log ): cabal: Entering directory '/tmp/cabal-tmp-6483/streaming-commons-0.2.0.0' Configuring streaming-commons-0.2.0.0... Preprocessing library for streaming-commons-0.2.0.0.. Building library for streaming-commons-0.2.0.0.. [ 1 of 16] Compiling Data.Streaming.ByteString.Builder.Buffer ( Data/Streaming/ByteString/Builder/Buffer.hs, dist/dist-sandbox-94bb7a0e/build/Data/Streaming/ByteString/Builder/Buffer.o ) [ 2 of 16] Compiling Data.Streaming.ByteString.Builder ( Data/Streaming/ByteString/Builder.hs, dist/dist-sandbox-94bb7a0e/build/Data/Streaming/ByteString/Builder.o ) [ 3 of 16] Compiling Data.Streaming.FileRead ( Data/Streaming/FileRead.hs, dist/dist-sandbox-94bb7a0e/build/Data/Streaming/FileRead.o ) [ 4 of 16] Compiling Data.Streaming.Filesystem ( Data/Streaming/Filesystem.hs, dist/dist-sandbox-94bb7a0e/build/Data/Streaming/Filesystem.o ) [ 5 of 16] Compiling Data.Streaming.Network.Internal ( Data/Streaming/Network/Internal.hs, dist/dist-sandbox-94bb7a0e/build/Data/Streaming/Network/Internal.o ) [ 6 of 16] Compiling Data.Streaming.Network ( Data/Streaming/Network.hs, dist/dist-sandbox-94bb7a0e/build/Data/Streaming/Network.o )

Data/Streaming/Network.hs:112:1: error: Could not find module ‘System.Random’ There are files missing in the ‘random-1.1’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 112 | import System.Random (randomRIO) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cabal: Leaving directory '/tmp/cabal-tmp-6483/streaming-commons-0.2.0.0' cabal: Error: some packages failed to install: blaze-builder-0.4.1.0-76A6rNBvwvR8MTgrMARis4 failed during the building phase. The exception was: ExitFailure 1 hosc-0.16-GysdlLQGnw31KcgtiCitD3 depends on hosc-0.16 which failed to install. mersenne-random-pure64-0.2.2.0-60uKuwEkCr4HbgBy9XHGZP failed during the building phase. The exception was: ExitFailure 1 streaming-commons-0.2.0.0-8aHSty4okIT2XDZrEAxkjm failed during the building phase. The exception was: ExitFailure 1 tidal-0.9.6-3dsxGB82j4b1Su3eYktnIw depends on tidal-0.9.6 which failed to install. websockets-0.12.4.0-5QdjjHkNyHC6TutsheZEsb depends on websockets-0.12.4.0 which failed to install.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-377858800, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXrfruPRKOhWKO0zhtO6qtRBzwLeCo7ks5tkbg_gaJpZM4SbAzm .

yaxu commented 6 years ago

I'm still interested in making a snap. I found a useful tutorial here: https://medium.com/@lettier/how-to-snap-your-awesome-haskell-app-648838d63f09

asm13243546 commented 6 years ago

Snap is the most heavyweight distribution system I've ever encountered, and my spotify on Manjaro isn't even a snap, it's a Flatpak, because the snap didn't work. Evidently, it installs an entire VM on which the application will be booted. What's the attraction?

On Mon, 23 Apr 2018 at 06:18 Alex McLean notifications@github.com wrote:

I'm still interested in making a snap. I found a useful tutorial here: https://medium.com/@lettier/how-to-snap-your-awesome-haskell-app-648838d63f09

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-383526436, or mute the thread https://github.com/notifications/unsubscribe-auth/AabOwuOkaF4IJF8-pXHI-gSDZmxHmpknks5trapggaJpZM4SbAzm .

asm13243546 commented 6 years ago

Also it requires you to bypass your package manager and buys into a probably soon proprietary system that has to be implemented as an alternative to community or sub-community (on Arch it's AUR https://aur.archlinux.org/) packages by each and every Linux vendor. So far I don't get it. I do see that it has momentum. I do see that you've thought about it. I just want to understand before commiting dev.

On Wed, 25 Apr 2018 at 12:25 Alfred Matthews asm13243546@gmail.com wrote:

Snap is the most heavyweight distribution system I've ever encountered, and my spotify on Manjaro isn't even a snap, it's a Flatpak, because the snap didn't work. Evidently, it installs an entire VM on which the application will be booted. What's the attraction?

On Mon, 23 Apr 2018 at 06:18 Alex McLean notifications@github.com wrote:

I'm still interested in making a snap. I found a useful tutorial here: https://medium.com/@lettier/how-to-snap-your-awesome-haskell-app-648838d63f09

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-383526436, or mute the thread https://github.com/notifications/unsubscribe-auth/AabOwuOkaF4IJF8-pXHI-gSDZmxHmpknks5trapggaJpZM4SbAzm .

asm13243546 commented 6 years ago

Also I'm still pretty deeply invested in understanding the Dirt universe and I don't really know where to start, besides the source.

On Wed, 25 Apr 2018 at 12:28 Alfred Matthews asm13243546@gmail.com wrote:

Also it requires you to bypass your package manager and buys into a probably soon proprietary system that has to be implemented as an alternative to community or sub-community (on Arch it's AUR https://aur.archlinux.org/) packages by each and every Linux vendor. So far I don't get it. I do see that it has momentum. I do see that you've thought about it. I just want to understand before commiting dev.

On Wed, 25 Apr 2018 at 12:25 Alfred Matthews asm13243546@gmail.com wrote:

Snap is the most heavyweight distribution system I've ever encountered, and my spotify on Manjaro isn't even a snap, it's a Flatpak, because the snap didn't work. Evidently, it installs an entire VM on which the application will be booted. What's the attraction?

On Mon, 23 Apr 2018 at 06:18 Alex McLean notifications@github.com wrote:

I'm still interested in making a snap. I found a useful tutorial here: https://medium.com/@lettier/how-to-snap-your-awesome-haskell-app-648838d63f09

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-383526436, or mute the thread https://github.com/notifications/unsubscribe-auth/AabOwuOkaF4IJF8-pXHI-gSDZmxHmpknks5trapggaJpZM4SbAzm .

asm13243546 commented 6 years ago

Working on it. Thanks for the tutorial.

fatmilktv commented 6 years ago

Happily working on it with asm13243546@gmail.com https://tutorials.ubuntu.com/tutorial/create-your-first-snap?backURL=https://docs.snapcraft.io/build-snaps/your-first-snap&_ga=2.31557950.1061451922.1524786979-1590166926.1524786979#1

On Thu, Apr 26, 2018 at 6:58 PM Alfred Matthews notifications@github.com wrote:

Working on it. Thanks for the tutorial.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-384813942, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXrfpfX8gzKyHkt87r4fUo4Nl62gXKJks5tslD-gaJpZM4SbAzm .

mtift commented 6 years ago

I blogged about my process for installing Tidal on Debian stretch:

https://matthewtift.com/install-tidal-debian-stretch

Using QjackCtl, Haskell Cabal, Git, SuperCollider, and the vim plugin allowed me to use only packages from Debian stable + plugins. I could also get it working with the Atom deb and the generic linux option for Haskell Stack, but it seems that those are not strictly necessary.

I'm happy to help improve this process in order to help get new users (like me) setup more quickly, but I'm not sure if that should be done through documentation, an install script, or something else.

fatmilktv commented 6 years ago

https://github.com/tidalcycles/Tidal/compare/master...asm13243546:master can't administer pull requests right this second; apologies.

On Mon, May 14, 2018 at 10:07 AM Matthew Tift notifications@github.com wrote:

I blogged about my process for installing Tidal on Debian stretch:

https://matthewtift.com/install-tidal-debian-stretch

Using QjackCtl, Haskell Cabal, Git, SuperCollider, and the vim plugin allowed me to use only packages from Debian stable + plugins. I could also get it working with the Atom deb and the generic linux option https://docs.haskellstack.org/en/stable/install_and_upgrade/#debian for Haskell Stack, but it seems that those are not strictly necessary.

I'm happy to help improve this process in order to help get new users (like me) setup more quickly, but I'm not sure if that should be done through documentation, an install script, or something else.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-388829699, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXrftKOpbkLEARVK-gUgKyqwfEPGdPuks5tyY-0gaJpZM4SbAzm .

--

Alfred.

yaxu commented 5 years ago

How to package binaries http://gelisam.blogspot.com/2014/12/how-to-package-up-binaries-for.html?m=1

asm13243546 commented 5 years ago

Good catch. Hny. Working happily for 15+m+

On Tue, Jan 1, 2019, 8:40 AM Alex McLean notifications@github.com wrote:

How to package binaries http://gelisam.blogspot.com/2014/12/how-to-package-up-binaries-for.html?m=1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tidalcycles/Tidal/issues/284#issuecomment-450729553, or mute the thread https://github.com/notifications/unsubscribe-auth/AabOwheOknssloBOo5GR9oYRFIjAeCyvks5u-2U4gaJpZM4SbAzm .

yaxu commented 4 years ago

I haven't updated it here yet https://tidalcycles.org/tidal-bootstrap.sh but this script should work under debian-based distros now - https://github.com/tidalcycles/tidal-bootstrap/blob/master/tidal-bootstrap.command

yaxu commented 4 years ago

@cleary's ansible install has come on nicely, discussion here: https://club.tidalcycles.org/t/new-ansible-method-for-installing-on-ubuntu-and-other-debian-based-linux-distros/544/22

Lets close this issue once the wiki has instructions for this :)

cleary commented 1 year ago

@cleary's ansible install has come on nicely, discussion here: https://club.tidalcycles.org/t/new-ansible-method-for-installing-on-ubuntu-and-other-debian-based-linux-distros/544/22

Lets close this issue once the wiki has instructions for this :)

https://tidalcycles.org/docs/getting-started/linux_install/

Can we close this now? :D