Hi, I'm encountering an issue when using lein from any directory outside ~
I'm getting the error message "java.io.IOException: Cannot run the program clojure in directory /_dev/overtone. CreateProcess error=2The system cannot find the file specifiedat java.lang.ProcessBuilder.start (ProcessBuilder.java:1128)Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specifiedat java.lang.ProcessImpl.create (ProcessImpl.java:-2)" when I attempt lein deps or lein repl outside of . I can access clojure via clj, but lein can't.
Are you running Leiningen in Powershell or regular Windows cmd
?
Powershell.
And you're using some sort of plugin in Leiningen that tries to run the CLI/`deps.edn` clojure
command?
lein deps is core functionality of leiningen. https://stackoverflow.com/questions/28225791/how-does-lein-deps-work
I know what lein deps
is. I have no idea why it would be trying to run the clojure
command tho'.
I get the same error if I try 'lein repl' from any directory besides ~
And that's the standard lein.bat
shell script, installed from the <http://leiningen.org|leiningen.org>
site?
Yes.
my :user profile calls one plugin, :plugins [[org.clojars.gmoe/overtone-template "1.0.1"
It also calls two dependencies, :dependencies [[org.clojure/tools.nrepl "0.2.12"] [org.clojure/clojure "1.9.0"]
I added those while troubleshooting this issue.
Leiningen doesn't know anything about clojure
(the CLI) so I've no idea why it would even try to run it...
This error first arose when I called "lein repl" in ~/_dev/overtone. Because it was having a hard time finding clojure, I added it as a :user dependency.
You're misunderstanding the error.
Walk us through the exact steps you used to create ~/_dev/overtone
-- did you just clone the overtone repo into there?
Yup.
git clone <overtone url>
Ah, so Overtone itself has middleware to try to get Leiningen to run clojure
I bet it relies on the old (clojure-env)
trick in tools.deps
that never worked on Windows.
The only middleware I'm using is cider-nrepl
If you cloned overtone, you're using this https://github.com/overtone/overtone/blob/master/project.clj#L48
mhm
According to the overtone docs, you don't need to clone it to use it.
Just create a new project folder (empty) and add deps.edn
per the instructions on the overtone repo...
I've got one of those handy. I cloned it because I was having trouble getting it to work and I wanted to try and ascertain the source of the issue.
"having trouble getting it to work" -- what problem were you having?
My notes are scruplesome so I'm going to quickly test it again.
WARNING:
Aug 25, 2019 4:37:49 PM clojure.lang.Reflector invokeMatchingMethod
SEVERE: Unable to load native libs c and scsynth. Please try an external server with (use 'overtone.core)
--> Booting internal SuperCollider server...
Exception in thread "Thread-3" java.lang.NullPointerException
-- that perhaps?I seem to remember there were all sorts of software setup steps required before Overtone worked.
"If using a 64-bit version of Windows, you need to install SuperCollider manually and connect to an external server." -- so you need to install SuperCollider itself, separate from Overtone.
I've got supercollider installed
I guess you just have to use overtone.core instead of overtone.live
And you're using overtone.core
per the instructions?
Whatever I was hung up on before I fixed in the process of debugging this other problem that you just sidestepped for me
I'm still testing
If it works when using clj
/ clojure
, I would say don't bother trying to use lein
with it.
(I'm installing SuperCollider 3.10.2 on my Windows machine so I can help debug things 🙂 )
Well thank you! I'm currently doing what debugging I can try before I ask questions.
OK, installed SC and checked the IDE runs. Used clj
in Powershell to start a REPL with Overtone as a dependency. Ran (use 'overtone.core)
and it complained about the lack of sc native libs (as expected) but then showed the commands to start a server, which I did, and the demos work...
SEVERE: Unable to load native libs c and scsynth. Please try an external server with (use 'overtone.core)
--> Please boot a server to start making noise:
* (boot-server) ; boot default server (honours config)
* (boot-internal-server) ; boot an internal server
* (boot-external-server) ; boot an external server
* (connect-external-server) ; connect to an existing external server
nil
user=> (boot-external-server)
--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:27435
--> Connection established
_____ __
/ __ /_ _____ _____/ /_____ ____ ___
/ / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
/ /_/ /| |/ / __/ / / /_/ /_/ / / / / __/
\____/ |___/\___/_/ \__/\____/_/ /_/\___/
Collaborative Programmable Music. v0.10.6
Hey Sean, I feel something magical is only just beyond the horizon...
:happy-hacking
user=> (demo (sin-osc))
#<synth-node[loading]: user/audition-synth 33>
user=> (demo 7 (lpf (mix (saw [50 (line 100 1600 5) 101 100.5]))
(lin-lin (lf-tri (line 2 20 5)) -1 1 400 4000)))
#<synth-node[loading]: user/audition-synth 34>
user=>
Cool!
I just got through
What I was doing when I was being quiet was addressing uhh:
SuperCollider was throwing a 'too many users' error so I threw up >s.options.maxLogins = 2; and restarted the whole shebang and I got 'happy hacking'
This is my third day of setting up clojure 😄 I'm real excited
And you're tackling something pretty big and complex IMO (Overtone).
Glad the CLI/`deps.edn` tools on Powershell are working for you!