Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketchpad fails to compile #1

Open
tcmaynard opened this issue Sep 6, 2012 · 13 comments
Open

Sketchpad fails to compile #1

tcmaynard opened this issue Sep 6, 2012 · 13 comments

Comments

@tcmaynard
Copy link

Environment: Dell XPS 15 (L502X), Intel Core i7, 6GB, 750GB, Lubuntu 12.04 AMD64.

Steps to error:
(1) New Git clone for project
(2) cd sketchpad
(3) lein deps
(4) lein run

Symptom:
Compiling sketchpad.core
Exception in thread "main" java.lang.ClassNotFoundException: com.apple.eawt.Application, compiling:(sketchpad/core.clj:37)
... (lines omitted for brevity) ...
Compilation failed: Subprocess failed

@ghostandthemachine
Copy link

If you can, pull and checkout dev. I have removed all traces of icon management from core.clj so hopefully things compile alright now. Please give any feedback big or small.

@tcmaynard
Copy link
Author

On 09/06/2012 01:09 PM, Jon wrote:

If you can, pull and checkout dev. I have removed all traces of icon
management from core.clj so hopefully things compile alright now.
Please give any feedback big or small.

Well, this exposes my soft underbelly, but I guess I don't know how to
pull the Dev branch. On Github I selected Dev, noticed the very recent
change and issued another clone ... but I seem to have received the
Master branch again, which (again) fails to compile.

If you don't mind, can you explain how I can pull the Dev branch? Sorry
for the newbish-ness on this end.

Tom.

@ghostandthemachine
Copy link

No problem at all. You should be able to just call

$ git checkout dev

then to grab the latest you can just

$ git pull origin dev

you should be able to just use lein run. Let me know if there are any issues

p.s.
you can also check which branch you are on with

$ git branch

@tcmaynard
Copy link
Author

On 09/06/2012 01:37 PM, Jon wrote:

No problem at all. You should be able to just call

$ git checkout dev

then to grab the latest you can just

$ git pull origin dev

you should be able to just use lein run. Let me know if there are any
issues

Bingo! It built, it's running. I've got a large window with three
panes: Projects, a grayed lambda on a black background, and a grey-ish
"SketchPad" tab on the bottom (which appears to be a REPL).

Indeed it is a REPL: (clojure-version) reports 1.4.0.

Thank you for your fix, your help, and now it's up to me to try to break
it! I'll begin by perusing the Help, naturally.

Tom.

@ghostandthemachine
Copy link

ahhh yeeaa.

Checkout the sketchpad.herokuapp.com docs page for more info, but some of the key files you might want to check out are:

~/.sketchpad/default.clj

and

app/sketchpad/src/sketchpad/user.clj

sketchpad.user is the ns for the application repl. You will see a bunch of handy functions in there for working with projects and buffers

right click a file in a project and select create repl to create a new REPL for that project

let me know how it works out.

@rosejn
Copy link
Member

rosejn commented Sep 6, 2012

Lorem ipsum epsilon at the top of the page…

On 6 Sep 2012, at 19:59, Jon wrote:

ahhh yeeaa.

Checkout the sketchpad.herokuapp.com docs page for more info, but some of the key files you might want to check out are:

~/.sketchpad/default.clj

and

app/sketchpad/src/sketchpad/user.clj

sketchpad.user is the ns for the application repl. You will see a bunch of handy functions in there for working with projects and buffers

right click a file in a project and select create repl to create a new REPL for that project

let me know how it works out.


Reply to this email directly or view it on GitHub.

@ghostandthemachine
Copy link

there's more than that. It is totally still under construction but i thought Tom might be a great resource for needed docs and startup info that isn't there while I am finishing adding content

@tcmaynard
Copy link
Author

On 09/06/2012 02:07 PM, Jon wrote:

It is totally still under construction but i thought Tom might be a
great resource for needed docs and startup info that isn't there

I'm certainly more than happy to oblige. Here's what's happened so far:
(1) Clicking on Help does absolutely nothing
(2) Moving on, I opted to follow the "Creating a project" tutorial on Github
(3) The File menu has no "New Project" item (but the Project menu does:
I chose that)
(4) I don't get any auto-completion help in the Dependencies field.
(5) I made my project.clj match the example
(6) The example code was typed in and saved to quil_tone.clj
(7) Right-clicking the node and selecting Create REPL does nothing. In
fact, "Create REPL" does nothing no matter where I right click.
(8) Entering (use 'overtone.live) in the REPL (bottom pane) gives an error

sketchpad.user=> (use 'overtone.live)
FileNotFoundException Could not locate overtone/live__init.class or
overtone/live.clj on classpath: clojure.lang.RT.load (RT.java:432)

At this point, I popped open a new terminal window and simply did a
"lein repl" manually. Everything went downhill smoothly after that:

user=> (use 'overtone.live)
--> Loading Overtone...
--> Booting internal SuperCollider server...
setting up worldoptions
Warning - native sc-arg :mSharedControls was nil

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007f3faffe1181, pid=17393, tid=139908540516096

JRE version: 7.0_05-b05

Java VM: Java HotSpot(TM) 64-Bit Server VM (23.1-b03 mixed mode

linux-amd64 compressed oops)

Problematic frame:

C [ld-linux-x86-64.so.2+0x15181] _dl_make_stack_executable+0x27e1

Failed to write core dump. Core dumps have been disabled. To enable

core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:

/home/tmaynard/Projects/sketchpad/projects/quil_tone/hs_err_pid17393.log

If you would like to submit a bug report, please visit:

http://bugreport.sun.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

*** ERROR: dlopen
'/home/tmaynard/Projects/sketchpad/projects/quil_tone/target/native/linux/x86_64/libjogl_cg.so'
err 'libCg.so: cannot open shared object file: No such file or directory'
Exception in thread "Thread-1" clojure.lang.ExceptionInfo: Subprocess
failed {:exit-code 134}
at clojure.core$ex_info.invoke(core.clj:4227)
at leiningen.core.eval$fn__956.invoke(eval.clj:174)
at clojure.lang.MultiFn.invoke(MultiFn.java:167)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:221)
at leiningen.repl$start_server.doInvoke(repl.clj:65)
at clojure.lang.RestFn.invoke(RestFn.java:470)
at leiningen.repl$repl$fn__1788.invoke(repl.clj:145)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:605)
at clojure.core$bound_fn_STAR_$fn__3984.doInvoke(core.clj:1793)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:722)

I think I followed the instructions properly (I did double check
everything), and now I'm rather stumped. If this kind of narrative
belongs on the bug list, I'll get the clutter off the list. Just let me
know. I'll do what I can.

Tom.

@ghostandthemachine
Copy link

Ok so in order

  1. the help menu should not be visible in Linux. It is an OSX only menu item which OSX populates on its own. I'll create an issue for this
  2. Creating projects - thanks for the README typo. I will update that. Soon the read me will be overhauled to point to the project site.
    Projects now should be create in one of four ways: Project -> New Projects, via the File Tree popup menu (depending on the context sensitive options), sketchpad.user => (create-project), and meta + shift + n. The auto complete deps are currently available after they are downloaded. loading them from Clojars was slowing the entire app load time substantially so i opted to put it in a future and let them be available once ready. Soon I will cache the last search to avoid this. if you try again after a few minutes they should be there.
  3. This is the big issue I had thought might pop up. I have run into this with windows as well. I know this works fine for OSX because Sam and Jeff have both tested and used it on OSX. To create the project REPL's in outside processes they must be created on the projects class path etc. I had though that Linux and OSX would have the same class path configuration but this issue makes me wonder...
    Trying to require/use overtone from the app REPL won't work because Overtone is not a SketchPad dependency so it won't be on the class path.

It is interesting you can't make noise from lein repl though. If you have a project.clj like this

(defproject quil-tonesy "0.0.1-SNAPSHOT"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.4.0"]
[overtone "0.8.0-SNAPSHOT"]])

and then you call
$ lein repl
...
...
user=> (use 'overtone.live)

....
....

user=> (demo (sin-osc 800))

do you get errors? If so I think this would be good to post on the mailing list. It is possible sketchpad has class path issues for creating REPL's in Linux but you should for sure be able to make noise from lein repl.

I am going to look into getting a Linux virtual machine setup on my system to work on these isssues

@tcmaynard
Copy link
Author

On 09/06/2012 03:01 PM, Jon wrote:

Ok so in order

I have no problems with the list so far. However, in order to make
further progress I'm going to need to fire up a Project REPL. I was
incorrect earlier when I reported that right-clicking and selecting
'Create REPL' had no effect. Actually a great flood of errors appears
in the terminal window where I started SketchPad originally [1].

The errors are:

Could not find artifact org.clojure:clojure:pom:1.+ in central
(http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars
(https://clojars.org/repo/)
Could not find artifact org.clojure:clojure:pom:1.+ in
stuartsierra-releases (http://stuartsierra.com/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in central
(http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars
(https://clojars.org/repo/)
Could not find artifact org.clojure:clojure:pom:1.+ in
stuartsierra-releases (http://stuartsierra.com/maven2)
Created REPL on port 51377
java.lang.NullPointerException
at clojure.core$reset_BANG_.invoke(core.clj:2126)
at
sketchpad.auto_complete.auto_complete$install_auto_completion.invoke(auto_complete.clj:74)
at sketchpad.repl.component$init_repl.invoke(component.clj:31)
at sketchpad.repl.component$repl_component.invoke(component.clj:45)
at sketchpad.repl.project_repl$repl_panel.invoke(project_repl.clj:169)
at
sketchpad.repl.project_repl$repl$fn__1579$fn__1580.invoke(project_repl.clj:189)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at seesaw.invoke$invoke_later_STAR_$fn__484.invoke(invoke.clj:14)
at clojure.lang.AFn.run(AFn.java:24)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:701)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
a#<EventDispatchThread Thread[AWT-EventQueue-0,6,main]>
t java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:671)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

Note that the first 12 lines above are not "errors" but are instead
non-informational "noise" that appear on every invocation of lein with
seesaw in the project dependency list.

[1] I have modified the SketchPad startup command to be "lein run &" --
although cracking open a new terminal window is nearly the same thing,
and may be easier. However, had I done so I might have missed the error
stream that I have captured (above).

@ghostandthemachine
Copy link

This is good news actually. SketchPad was merged into the overtone organization account a few days ago and i think this is an artifact from that merge. I have been hacking on a few things that were not in the initial merge so i have been having to add them in segments. This error you have posted is from loading the auto-completion for the application REPL text area so it doesn't appear to be a class path issue. I have just finished updating the overtone/sketchpad dev branch to hopefully fix these issues. You should be able to run

$ git pull origin dev

and not have this error.

@tcmaynard
Copy link
Author

On 09/06/2012 11:17 PM, Jon wrote:

This is good news actually

If you say so. Actually I see some signs of progress: a right-click and
'Create REPL' really does fire up a REPL, and I can (use 'overtone.live)
successfully.

I know that Leiningen has some issues with underscores and hyphens, and
I suspect a bit of bollix in the Readme here. The directory tree looks
like:

╭─tmaynard@venus ~/Projects/sketchpad/projects/quil_tone ‹dev*›
╰─$ tree
.
├── hs_err_pid21783.log
├── project.clj
├── README.md
├── src
│ └── quil_tone
│ ├── core.clj
│ └── quil_tone.clj
└── target
(lots more stuff under here...)

But I have a feeling that "quil_tone.clj" should perhaps actually be
"core.clj" (or something similar), because the "(use 'quil_tone.core)
doesn't seem to do anything ... not even to generate errors (AFAICT).

However, it's quite a bit of progress for one day, and being 00:12 local
I'm going to call it a night for tonight and pick up tomorrow with
whatever you recommend.

Thanks for all you've done so far ... it's every bit encouraging, and I
can only hope I'm helping out the cause in some small way.

Tom.

@tcmaynard
Copy link
Author

On 09/06/2012 11:17 PM, Jon wrote:

This is good news actually.

Should I change the Subject line? Compilation is no longer the issue.
In fact I could open a whole new issue if you'd like. But, pressing on...

I decided to abandon the SketchPad tutorial, at least temporarily, when
I had the brainstorm idea of backing off to the very basics and just
punching in the simplest of the Overtone "getting started" examples:

(use 'overtone.live) ; This worked okay, AFAIK
(definst foo [](saw 220)) ; This never returned

The errors on the console are (ignoring the usual non-informational
"noise"):

Created REPL on port 37262
setting up worldoptions
Warning - native sc-arg :mSharedControls was nil

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007f980267c181, pid=3749, tid=140290107234048

JRE version: 7.0_05-b05

Java VM: Java HotSpot(TM) 64-Bit Server VM (23.1-b03 mixed mode

linux-amd64 compressed oops)

Problematic frame:

C [ld-linux-x86-64.so.2+0x15181] _dl_make_stack_executable+0x27e1

Failed to write core dump. Core dumps have been disabled. To enable

core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:

/home/tmaynard/Projects/sketchpad/projects/quil_tone/hs_err_pid3749.log

If you would like to submit a bug report, please visit:

http://bugreport.sun.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

*** ERROR: dlopen
'/home/tmaynard/Projects/sketchpad/projects/quil_tone/target/native/linux/x86_64/libjogl_cg.so'
err 'libCg.so: cannot open shared object file: No such file or directory'
#<Thread Thread[Thread-5,6,main]>
clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 134}
at clojure.core$ex_info.invoke(core.clj:4227)
at leiningen.core.eval$fn__6923.invoke(eval.clj:169)
at clojure.lang.MultiFn.invoke(MultiFn.java:167)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:202)
at sketchpad.repl.server$start_server.invoke(server.clj:40)
at sketchpad.repl.server$repl_server$fn__7475.invoke(server.clj:58)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:605)
at clojure.core$bound_fn_STAR_$fn__3984.doInvoke(core.clj:1793)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:722)
#<EventDispatchThread Thread[AWT-EventQueue-0,6,main]>
java.security.PrivilegedActionException: java.net.SocketException:
Broken pipe
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:671)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at
clojure.tools.nrepl.transport$bencode$fn__6114.invoke(transport.clj:55)
at clojure.tools.nrepl.transport.FnTransport.send(transport.clj:26)
at clojure.tools.nrepl$client$this__6168.invoke(nrepl.clj:61)
at clojure.core$comp$fn__4038.doInvoke(core.clj:2295)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.tools.nrepl$message.invoke(nrepl.clj:89)
at
sketchpad.repl.project_repl$send_repl_cmd$fn__7536.invoke(project_repl.clj:70)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at seesaw.invoke$invoke_later_STAR_$fn__484.invoke(invoke.clj:14)
at clojure.lang.AFn.run(AFn.java:24)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:701)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
... 9 more

If you'd like me to change any settings (ulimit, e.g.) or would like to
see the generated log file just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants