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

Trouble with installation: SuperCollider and emacs #30

Closed
asheshambasta opened this issue Jun 24, 2020 · 3 comments
Closed

Trouble with installation: SuperCollider and emacs #30

asheshambasta opened this issue Jun 24, 2020 · 3 comments

Comments

@asheshambasta
Copy link

I'm facing 2 issues with installation;
I've cloned the repo. under /home/ashesh/.emacs.d/manual-install/scel

SuperCollider issues errors on startup:

I've changed ~/.config/SuperCollider/sclang_conf.yaml to the following:

includePaths:
    -   /home/ashesh/.local/share/SuperCollider/downloaded-quarks/Vowel
    -   /home/ashesh/.local/share/SuperCollider/downloaded-quarks/Dirt-Samples
    -   /home/ashesh/.local/share/SuperCollider/downloaded-quarks/SuperDirt
    -   /home/ashesh/.emacs.d/manual-install/scel/sc
excludePaths:
    []
postInlineWarnings: false

SuperCollider now errors on startup with:

compiling class library...
	Found 847 primitives.
	Compiling directory '/nix/store/nsr1ki3llyd9vh5nbfqa19fcrdixjw3z-supercollider-3.10.4/share/SuperCollider/SCClassLibrary'
	Compiling directory '/nix/store/nsr1ki3llyd9vh5nbfqa19fcrdixjw3z-supercollider-3.10.4/share/SuperCollider/Extensions'
	Compiling directory '/home/ashesh/.local/share/SuperCollider/Extensions'
	Compiling directory '/home/ashesh/.local/share/SuperCollider/downloaded-quarks/Vowel'
	Compiling directory '/home/ashesh/.local/share/SuperCollider/downloaded-quarks/Dirt-Samples'
	Compiling directory '/home/ashesh/.local/share/SuperCollider/downloaded-quarks/SuperDirt'
	Compiling directory '/home/ashesh/.emacs.d/manual-install/scel/sc'
ERROR: duplicate Class found: 'Document' 
/nix/store/nsr1ki3llyd9vh5nbfqa19fcrdixjw3z-supercollider-3.10.4/share/SuperCollider/SCClassLibrary/scide_scqt/ScIDE.sc
/home/ashesh/.emacs.d/manual-install/scel/sc/Document.sc

ERROR: There is a discrepancy.
numClassDeps 1154   gNumClasses 2306
Library has not been compiled successfully.
Library has not been compiled successfully.

Emacs .el files also fail to load

My emacs init file also now contains:

;;;;;;;;;;;;;;;;;;;;;
;; Super collider  ;;
;;;;;;;;;;;;;;;;;;;;;

;; emacs w3m support: needed for supercollider, for example. 
(use-package w3m
  :after (require 'w3m)
)
(setq browse-url-browser-function 'w3m-browse-url)
(autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t)
;; optional keyboard short-cut
(global-set-key "\C-xm" 'browse-url-at-point)

;; SC related emacs files.
(add-to-list 'load-path "~/.emacs.d/manual-install/scel/el")
(require 'sclang)

And during eval, I now get:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "sclang-vars")
  #<subr require>(sclang-vars)
  apply(#<subr require> sclang-vars)
  require(sclang-vars)
  eval-buffer(#<buffer  *load*-419732> nil "/home/ashesh/.emacs.d/manual-install/scel/el/sclang-help.el" nil t)  ; Reading at buffer position 1009
  load-with-code-conversion("/home/ashesh/.emacs.d/manual-install/scel/el/sclang-help.el" "/home/ashesh/.emacs.d/manual-install/scel/el/sclang-help.el" nil t)
  #<subr require>(sclang-help)
  apply(#<subr require> sclang-help)
  require(sclang-help)
  (let ((load-path (if (and (boundp (quote byte-compile-dest-file)) (stringp byte-compile-dest-file)) (cons (file-name-directory byte-compile-dest-file) load-path) load-path))) (require (quote sclang-util)) (require (quote sclang-browser)) (require (quote sclang-interp)) (require (quote sclang-language)) (require (quote sclang-document)) (require (quote sclang-mode)) (require (quote sclang-minor-mode)) (require (quote sclang-help)) (require (quote sclang-server)) (require (quote sclang-widgets)))
  (progn (let ((load-path (if (and (boundp (quote byte-compile-dest-file)) (stringp byte-compile-dest-file)) (cons (file-name-directory byte-compile-dest-file) load-path) load-path))) (require (quote sclang-util)) (require (quote sclang-browser)) (require (quote sclang-interp)) (require (quote sclang-language)) (require (quote sclang-document)) (require (quote sclang-mode)) (require (quote sclang-minor-mode)) (require (quote sclang-help)) (require (quote sclang-server)) (require (quote sclang-widgets))))
  eval((progn (let ((load-path (if (and (boundp ...) (stringp byte-compile-dest-file)) (cons (file-name-directory byte-compile-dest-file) load-path) load-path))) (require (quote sclang-util)) (require (quote sclang-browser)) (require (quote sclang-interp)) (require (quote sclang-language)) (require (quote sclang-document)) (require (quote sclang-mode)) (require (quote sclang-minor-mode)) (require (quote sclang-help)) (require (quote sclang-server)) (require (quote sclang-widgets)))) nil)
  #f(compiled-function (&rest body) "Like `progn', but evaluates the body at compile time and at\nload time.  In interpreted code, this is entirely equivalent to\n`progn', except that the value of the expression may be (but is\nnot necessarily) computed at load time if eager macro expansion\nis enabled." #<bytecode 0x1a33eb>)((let ((load-path (if (and (boundp (quote byte-compile-dest-file)) (stringp byte-compile-dest-file)) (cons (file-name-directory byte-compile-dest-file) load-path) load-path))) (require (quote sclang-util)) (require (quote sclang-browser)) (require (quote sclang-interp)) (require (quote sclang-language)) (require (quote sclang-document)) (require (quote sclang-mode)) (require (quote sclang-minor-mode)) (require (quote sclang-help)) (require (quote sclang-server)) (require (quote sclang-widgets))))
  (eval-and-compile (let ((load-path (if (and (boundp (quote byte-compile-dest-file)) (stringp byte-compile-dest-file)) (cons (file-name-directory byte-compile-dest-file) load-path) load-path))) (require (quote sclang-util)) (require (quote sclang-browser)) (require (quote sclang-interp)) (require (quote sclang-language)) (require (quote sclang-document)) (require (quote sclang-mode)) (require (quote sclang-minor-mode)) (require (quote sclang-help)) (require (quote sclang-server)) (require (quote sclang-widgets))))
  eval-buffer(#<buffer  *load*> nil "/home/ashesh/.emacs.d/manual-install/scel/el/sclang.el" nil t)  ; Reading at buffer position 2063
  load-with-code-conversion("/home/ashesh/.emacs.d/manual-install/scel/el/sclang.el" "/home/ashesh/.emacs.d/manual-install/scel/el/sclang.el" nil t)
  #<subr require>(sclang)
  apply(#<subr require> sclang)
  require(sclang)
  eval((require (quote sclang)) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Versions:

  • SuperCollider: SuperCollider 3.10.4
  • Emacs: GNU Emacs 26.3

Any pointers?

@jamshark70
Copy link

I think the README is either outdated or unclear.

You need to build sc-el as part of the SuperCollider build process.

$ cd [your_sc_build_directory]
$ cmake .. -DSC_EL=ON
$ make
$ sudo make install

This converts sclang-vars.el.in to sclang-vars.el, filling in paths. Without that step, you'll have problems.

After installation, sclang-mode files are in /usr/local/share/emacs/site-lisp/SuperCollider/, so:

(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/SuperCollider")
(require 'sclang)

Then M-x sclang-start at least boots the interpreter.

@asheshambasta
Copy link
Author

asheshambasta commented Jun 24, 2020

@jamshark70 thanks for the reply! Yeah, that seems to be the issue. I'm on Nix however, so I'll just need to adapt this a little bit, but it should work.

@mossheim
Copy link

duplicate of #22

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