Upgrade asdf in sbcl failed - common-lisp

I am failed to upgrade the asdf to version 3 as the page https://common-lisp.net/project/asdf/asdf.html#Replacing-your-implementation_0027s-ASDF said
Is there anything wrong with my environment?
CL-USER> (load "/Users/james/Documents/workdir/lisp/source/asdf/tools/install-asdf.lisp")
failed to find the TRUENAME of /usr/local/lib/sbcl/contrib/:
No such file or directory
[Condition of type SB-INT:SIMPLE-FILE-ERROR]
Restarts:
0: [RETRY] Retry EVAL of current toplevel form.
1:[CONTINUE] Ignore error and continue loading file
"/Users/james/Documents/workdir/lisp/source/asdf/tools/install-asdf.lisp".
2: [ABORT] Abort loading file
"/Users/james/Documents/workdir/lisp/source/asdf/tools/install-asdf.lisp".
3: [RETRY] Retry SLIME REPL evaluation request.
4: [*ABORT] Return to SLIME's top level.
5: [REMOVE-FD-HANDLER] Remove #
Backtrace:
0: (SB-IMPL::SIMPLE-FILE-PERROR "failed to find the TRUENAME of ~A" #P"/usr/local/lib/sbcl/contrib/" 2)
1: ((FLET SB-IMPL::FAIL :IN SB-IMPL::QUERY-FILE-SYSTEM) "failed to find the TRUENAME of ~A" #P"/usr/local/lib/sbcl/contrib/" 2)
2: (SB-IMPL::QUERY-FILE-SYSTEM #P"/usr/local/lib/sbcl/contrib/" :TRUENAME T)
3: (TRUENAME #P"/usr/local/lib/sbcl/contrib/")
4: (ASDF/INTERFACE::MODULE-FASL "uiop")
5: (ASDF/INTERFACE::INSTALL-UIOP-AND-ASDF-AS-MODULES)
6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/INTERFACE::INSTALL-UIOP-AND-ASDF-AS-MODULES) #)
7: (SB-IMPL::SIMPLE-EVAL-PROGN-BODY ((ASDF/INTERFACE::INSTALL-UIOP-AND-ASDF-AS-MODULES) (UIOP/IMAGE:QUIT)) #)
8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (PROGN (ASDF/INTERFACE::INSTALL-UIOP-AND-ASDF-AS-MODULES) (UIOP/IMAGE:QUIT)) #)
9: (EVAL-TLF (PROGN (ASDF/INTERFACE::INSTALL-UIOP-AND-ASDF-AS-MODULES) (UIOP/IMAGE:QUIT)) 14 #)
10: ((FLET SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (PROGN (ASDF/INTERFACE::INSTALL-UIOP-AND-ASDF-AS-MODULES) (UIOP/IMAGE:QUIT)) 14)
11: (SB-INT:LOAD-AS-SOURCE # :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
12: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) # NIL)
13: (LOAD "/Users/james/Documents/workdir/lisp/source/asdf/tools/install-asdf.lisp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T :EXTERNAL-FORMAT :DEFAULT)
14: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LOAD "/Users/james/Documents/workdir/lisp/source/asdf/tools/install-asdf.lisp") #)
15: (EVAL (LOAD "/Users/james/Documents/workdir/lisp/source/asdf/tools/install-asdf.lisp"))
--more--

How is your SBCL installed?
Did you compile your own SBCL yet fail to use --prefix=... or export INSTALL_ROOT=... when compiling SBCL but not installing it under /usr/local ?

I just encountered the same problem. In my case, it was because I installed sbcl with brew install sbcl but failed to notice that brew didn't complete the symlinking stage. brew link --overwrite sbcl resolved the problem for me, and it may for you as well.

Related

Redirect to https with hunchentoot

I've set up a hunchentoot server with ssl. I'd like regular http requests to be redirected to https.
It seems like some combination of hunchentoot:define-easy-handler and hunchentoot:redirect is the way to go, but I can't figure it out.
Here's what I have so far:
(defvar *https-handler*
(make-instance 'hunchentoot:easy-ssl-acceptor
:name 'ssl
:ssl-privatekey-file #P"/path/to/privkey.pem"
:ssl-certificate-file #P"/path/to/cert.pem"
:port 443))
(hunchentoot:start *https-handler*)
Yes, you can add simple http handler with redirect to ssl version:
(defvar *http-handler*
(make-instance 'hunchentoot:easy-acceptor
:name 'http
:port 80))
(hunchentoot:define-easy-handler (redir-to-ssl :uri (lambda (uri) t) :acceptor-names '(http)) ()
(hunchentoot:redirect "/" :protocol :https)) ; where magic happens
...and then start it too:
(hunchentoot:start *http-handler*)
This version redirects simply to index /.
Well, I am using the hunchentoot:*dispatch-table* directly. The way to redirect it independent of the path I discovered was to hunchentoot:redirect unless (hunchentoot:ssl-p) inside the handler. Most of my defuned handlers are wrapped inside a macro for authenthentication. So, I merely had to modify that macro, and then M-x slime-who-macroexpands -> C-c C-k.
(unless (hunchentoot:ssl-p)
(hunchentoot:redirect (hunchentoot:request-uri*)
:protocol :https))
If you need to indiscriminately redirect every HTTP request to HTTPS, using easy-acceptor is unnecessary. I'd suggest to define a specialized acceptor:
(defclass http-to-https-acceptor (hunchentoot:acceptor) ())
(defmethod hunchentoot:acceptor-dispatch-request ((acceptor http-to-https-acceptor) request)
(hunchentoot:redirect (hunchentoot:request-uri request)
:protocol :https))
Then at some point:
(hunchentoot:start (make-instance 'http-to-https-acceptor :port 80))

Meteor Mup build : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed

I am getting this issue now "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory" and i am unable to pin point what was the issue.
I have used mup deploy in the same project before and used to work without any issue, however, now i am having this issue, and i do remeber i did a meteor upgrade, might that have caused any issue?
Any suggestion or help is much appreciated
Mup version 1.4.4:
Output of command
`
bash
▶ mup deploy --verbose
Building App Bundle Locally
Minifying app code
<--- Last few GCs --->
[4082:0x23569a0] 273590 ms: Mark-sweep 1397.4 (1578.6) -> 1397.4 (1578.6) MB, 868.8 / 0.0 ms allocation failure GC in old space requested
[4082:0x23569a0] 274569 ms: Mark-sweep 1397.4 (1578.6) -> 1397.4 (1531.6) MB, 978.7 / 0.0 ms last resort GC in old space requested
[4082:0x23569a0] 275456 ms: Mark-sweep 1397.4 (1531.6) -> 1397.4 (1523.6) MB, 887.4 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x2f94e9f25e91 <JSObject>
1: /* anonymous */ [/home/sijan/.meteor/packages/standard-minifier-js/.2.2.3.tjo788.vwvpr++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/babel-compiler/node_modules/babylon/lib/index.js:~1748] [pc=0xb955fb1c1e3](this=0x1fa2c9753919 <Parser map = 0x2aac01cbc7f9>,type=0x80a00992c91 <TokenType map = 0x395f5a44a0e1>,pos=0xd8d29a02311 <undefined>)
2: arguments adapt...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
2: 0x121809c [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
5: v8::internal::Factory::NewUninitializedFixedArray(int) [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
6: 0xe1adb3 [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
7: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/home/sijan/.meteor/packages/meteor-tool/.1.6.0.1a0lw5l.27vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node]
8: 0xb955f40463d
=> Build Error. Check the logs printed above.
`

Endpoint defined with define-easy-handler returns 404

I have defined a simple system in helloworld.asd:
(asdf:defsystem #:helloworld
:description "helloworld"
:author "Duncan Bayne <duncan#bayne.id.au>"
:license "WTFNMF"
:depends-on (#:hunchentoot)
:serial t
:components ((:file "package")
(:file "helloworld")))
... a package definition in package.lisp:
(defpackage #:helloworld
(:use #:cl #:hunchentoot))
... and a corresponding hello world webserver in helloworld.lisp:
(in-package #:helloworld)
(defvar *acceptor* (make-instance 'acceptor :port 4242))
(start *acceptor*)
(define-easy-handler (greet :uri "/hello") ()
"<html><body><h1>Hello World!</h1></body></html>")
In the SLIME REPL I start the web server with:
CL-USER> (load "/usr/home/duncan/code/helloworld/helloworld.asd")
CL-USER> (ql:quickload "helloworld")
If I navigate to http://localhost:4242/hello, I'd expect to see my hello world HTML. Instead I get a 404 error, and the log shows:
127.0.0.1 - [2017-08-10 08:18:19] "GET /hello HTTP/1.1" 404 341 "-" "Mozilla/5.0 (X11; FreeBSD amd64; rv:54.0) Gecko/20100101 Firefox/54.0"
I suspect I'm missing something fairly obvious here; any tips / pointers to documentation would be appreciated. System details are:
Clozure Common Lisp Version 1.11 (FreebsdX8664)
FreeBSD 11.1-RELEASE amd64
Hunchentoot 1.2.37
Mozilla Firefox 54.0.1
SLIME 20170804.1113
You are making an instance of ACCEPTOR instead of EASY-ACCEPTOR (or a subclass). The easy handler is registered but your acceptor is not going to use it. This should work, for example:
(defvar *acceptor* (make-instance 'easy-acceptor :port 4242))
(start *acceptor*)
(define-easy-handler (test :uri "/test") () "Pass")

new_post will not create an RMarkdown post in blogdown

I'm trying to use the hugo-future-imperfect theme but I cannot make new Rmarkdown posts using: Addins > New Post > <>.
When I click done there is no file in the editor or in the filesystem, and the Console reports:
Loading required package: shiny
Warning: package ‘shiny’ was built under R version 3.3.3
Listening on http://127.0.0.1:7789
Error: open : The system cannot find the file specified.
Warning: running command '"C:\Users\jrl\AppData\Roaming\Hugo\hugo.exe" new "post/2017-06-26-test.Rmd" -k default' had status 65535
Error: open : The system cannot find the file specified.
Warning: running command '"C:\Users\jrl\AppData\Roaming\Hugo\hugo.exe" new "post/2017-06-26-test.Rmd" -k default' had status 65535
The system cannot find the path specified.
Warning: running command 'C:\WINDOWS\system32\cmd.exe /c "C:\Users\jrl\AppData\Roaming\Hugo\hugo.exe" new "post/2017-06-26-test.Rmd" -k default' had status 1
Warning: Error in shell: '"C:\Users\jrl\AppData\Roaming\Hugo\hugo.exe" new "post/2017-06-26-test.Rmd" -k default' execution failed with error code 1
Stack trace (innermost first):
82: shell
81: shell2
80: system2
79: hugo_cmd
78: new_content
77: blogdown::new_post
76: observeEventHandler
12: shiny::runApp
11: shiny::runGadget
10: eval
9: eval
8: eval
7: eval
6: eval.parent
5: local
4: eval
3: eval
2: sys.source
1: blogdown:::new_post_addin
The steps I used to build the site were:
blogdown::new_site(theme = 'jpescador/hugo-future-imperfect')
This sounds like a bug that has been fixed in Hugo 0.24.1 the other day. Please restart your R session, try to reinstall blogdown, and update Hugo:
devtools::install_github('rstudio/blogdown')
blogdown::update_hugo()

drakma:http-request crashes during https request while using burp as a proxy

I want to study some outgoing traffic of drakma by using the burp-suites as a automatic proxy.
But when making https request drakma signals (more precisely cl+ssl drakma uses) crashes:
(drakma:http-request "https://www.stackoverflow.com"
:proxy '("127.0.0.1" 8080))
=>
A failure in the SSL library occurred on handle #.(SB-SYS:INT-SAP #X00677EE0) (return code: 1). SSL error queue:
error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
[Condition of type CL+SSL::SSL-ERROR-SSL]
Restarts:
0: [RETRY] Retry SLIME interactive evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [REMOVE-FD-HANDLER] Remove #<SB-IMPL::HANDLER INPUT on descriptor 6: #<CLOSURE (LABELS SWANK-BACKEND::RUN :IN SWANK-BACKEND:ADD-FD-HANDLER) {100314533B}>>
3: [ABORT] Exit debugger, returning to top level.
Backtrace:
0: (CL+SSL::SSL-SIGNAL-ERROR #.(SB-SYS:INT-SAP #X00677EE0) #<FUNCTION CL+SSL::SSL-CONNECT> 1 -1)
1: (CL+SSL:MAKE-SSL-CLIENT-STREAM #<unavailable lambda list>)
2: (DRAKMA:HTTP-REQUEST #<PURI:URI https://www.stackoverflow.com/> :PROXY ("127.0.0.1" 8080))
I would like to know what this error means (as i was not able to find a propper documentation of cl+ssl) and how to fix/prevent this from happening?

Resources