rjnw / sham

A DSL for runtime code generation in racket
MIT License
66 stars 6 forks source link

Installing sham #3

Closed pmatos closed 5 years ago

pmatos commented 5 years ago

Hi, I was trying to install sham and it seems that's it's not out of the box. I cloned it and did raco pkg install --auto --link -n sham but there's an rfc dependency. I installed it and ran again but I get all sorts of problems:

➜  sham git:(master) raco pkg install --auto --link -n sham                
Linking current directory as a package
pkg: failure getting info
  error: "get-info: info file has illegal #lang or #reader in private/info.rkt"
pkg: failure getting info
  error: "get-info: info file has illegal #lang or #reader in /home/pmatos/Projects/sham/private/info.rkt"
get-info: info file has illegal #lang or #reader in /home/pmatos/Projects/sham/private/info.rkt
  context...:
   read-extension44
   read
   /home/pmatos/installs/racket-7.1/collects/setup/getinfo.rkt:58:8: temp109
   /home/pmatos/installs/racket-7.1/collects/setup/getinfo.rkt:37:0: get-info/full/ext
   /home/pmatos/installs/racket-7.1/collects/setup/getinfo.rkt:33:0
   /home/pmatos/installs/racket-7.1/collects/racket/contract/private/arrow-val-first.rkt:428:3
   /home/pmatos/installs/racket-7.1/collects/setup/setup-core.rkt:295:2: make-cc*
   /home/pmatos/installs/racket-7.1/collects/setup/setup-core.rkt:333:2: collection-cc!20
   /home/pmatos/installs/racket-7.1/collects/setup/../racket/private/map.rkt:40:19: loop
   /home/pmatos/installs/racket-7.1/collects/setup/setup-core.rkt:526:26
   /home/pmatos/installs/racket-7.1/collects/racket/private/map.rkt:40:19: loop
   [repeats 72 more times]
   /home/pmatos/installs/racket-7.1/collects/racket/list.rkt:586:2: append-map
   /home/pmatos/installs/racket-7.1/collects/setup/setup-core.rkt:509:2: collection-closure
   /home/pmatos/installs/racket-7.1/collects/setup/setup-core.rkt:71:0: setup-core
   /home/pmatos/installs/racket-7.1/collects/setup/setup.rkt:65:3
   ...
raco setup: version: 7.1
raco setup: platform: x86_64-linux [3m]
raco setup: installation name: 7.1
raco setup: variants: 3m
raco setup: main collects: /home/pmatos/installs/racket-7.1/collects
raco setup: collects paths: 
raco setup:   /home/pmatos/.racket/7.1/collects
raco setup:   /home/pmatos/installs/racket-7.1/collects
raco setup: main pkgs: /home/pmatos/installs/racket-7.1/share/pkgs
raco setup: pkgs paths: 
raco setup:   /home/pmatos/installs/racket-7.1/share/pkgs
raco setup:   /home/pmatos//.racket/7.1/pkgs
raco setup: links files: 
raco setup:   /home/pmatos/installs/racket-7.1/share/links.rktd
raco setup:   /home/pmatos//.racket/7.1/links.rktd
raco setup: main docs: /home/pmatos/installs/racket-7.1/doc
raco setup: --- updating info-domain tables ---
raco setup: updating: /home/pmatos/.racket/7.1/share/info-cache.rktd
raco setup: --- pre-installing collections ---
raco setup: --- installing foreign libraries ---
raco setup: --- installing shared files ---
raco setup: --- compiling collections ---
raco setup: --- parallel build using 8 jobs ---
raco setup: 7 making: <pkgs>/sham
raco setup: 7 making: <pkgs>/sham/private
open-input-file: cannot open module file
  module path: /home/pmatos/Projects/sham/private/sham/main.rkt
  path: /home/pmatos/Projects/sham/private/sham/main.rkt
  system error: no such file or directory; rktio_err=3
  compilation context...:
   /home/pmatos/Projects/sham/private/compile.rkt
  context...:
   maybe-raise-missing-module
   default-load-handler
   standard-module-name-resolver
   perform-require!78
   for-loop
   finish
   [repeats 1 more time]
   pass-1-and-2-loop
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:273:0: compile-zo*
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:486:26
   ...
raco setup: 7 making: <pkgs>/sham/private/ast
raco setup: 7 making: <pkgs>/sham/private/compilers
raco setup: 7 making: <pkgs>/sham/private/libjit
raco setup: 7 making: <pkgs>/sham/private/llvm
raco setup: 7 making: <pkgs>/sham/private/llvm/ffi
raco setup: 7 making: <pkgs>/sham/test
test/types.rkt:13:17: compile-module: unbound identifier
  in: compile-module
  compilation context...:
   /home/pmatos/Projects/sham/test/types.rkt
  location...:
   test/types.rkt:13:17
  context...:
   do-raise-syntax-error
   loop
   [repeats 3 more times]
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:273:0: compile-zo*
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:486:26
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:478:42
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:548:0: compile-root
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:650:4
   /home/pmatos/installs/racket-7.1/collects/setup/../racket/private/more-scheme.rkt:261:28
   [repeats 1 more time]
test/template.rkt:15:19: compile-module: unbound identifier
  in: compile-module
  compilation context...:
   /home/pmatos/Projects/sham/test/template.rkt
  location...:
   test/template.rkt:15:19
  context...:
   do-raise-syntax-error
   loop
   [repeats 3 more times]
   module-begin-k
   expand-module16
   expand-submodule193
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:273:0: compile-zo*
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:486:26
   ...
test/functions.rkt:18:21: s$:if: unbound identifier
  in: s$:if
  compilation context...:
   /home/pmatos/Projects/sham/test/functions.rkt
  location...:
   test/functions.rkt:18:21
  context...:
   do-raise-syntax-error
   for-loop
   [repeats 2 more times]
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-submodule193
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   ...
test/pointers.rkt:16:75: s$:void: unbound identifier
  in: s$:void
  compilation context...:
   /home/pmatos/Projects/sham/test/pointers.rkt
  location...:
   test/pointers.rkt:16:75
  context...:
   do-raise-syntax-error
   for-loop
   [repeats 2 more times]
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-submodule193
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   ...
test/structs.rkt:17:22: s$:let: unbound identifier
  in: s$:let
  compilation context...:
   /home/pmatos/Projects/sham/test/structs.rkt
  location...:
   test/structs.rkt:17:22
  context...:
   do-raise-syntax-error
   for-loop
   [repeats 3 more times]
   loop
   [repeats 3 more times]
   module-begin-k
   expand-module16
   expand-submodule193
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   ...
standard-module-name-resolver: collection not found
  for module path: disassemble
  collection: "disassemble"
  in collection directories:
   /home/pmatos/.racket/7.1/collects
   /home/pmatos/installs/racket-7.1/collects
   ... [182 additional linked and package directories]
  compilation context...:
   /home/pmatos/Projects/sham/test/vector.rkt
  context...:
   show-collection-err
   standard-module-name-resolver
   perform-require!78
   for-loop
   finish
   [repeats 2 more times]
   pass-1-and-2-loop
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:273:0: compile-zo*
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:486:26
   /home/pmatos/installs/racket-7.1/collects/compiler/private/cm-minimal.rkt:478:42
   ...
test/recursion.rkt:14:21: s$:if: unbound identifier
  in: s$:if
  compilation context...:
   /home/pmatos/Projects/sham/test/recursion.rkt
  location...:
   test/recursion.rkt:14:21
  context...:
   do-raise-syntax-error
   for-loop
   [repeats 2 more times]
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-submodule193
   loop
   [repeats 2 more times]
   module-begin-k
   expand-module16
   expand-capturing-lifts
   expand-single
   temp74_0
   compile16
   ...
raco setup: --- creating launchers ---
raco setup: --- installing man pages ---
raco setup: --- building documentation ---
...
[keeps on going]

How do you install this?

rjnw commented 5 years ago

Those error messages are for tests not running; I changed some ast definitions without updating the tests. It will still install even though tests fail. You need llvm and gcc installed on your machine to use sham. I have fixed most of the errors by commenting out tests, keeping this issue open to fix those tests. tests that work: functions.rkt, pow.rkt

rjnw commented 5 years ago

@samth how do I fix this error:

get-info: info file has illegal #lang or #reader in /home/rajan/work/sham/private/info.rkt
samth commented 5 years ago

Don't use info.rkt as a file name unless it's using #lang info.

On Sat, Nov 24, 2018, 10:59 AM rajan <notifications@github.com wrote:

@samth https://github.com/samth how do I fix this error:

get-info: info file has illegal #lang or #reader in /home/rajan/work/sham/private/info.rkt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rjnw/sham/issues/3#issuecomment-441377323, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO78_Vkh7R_sLjWP0VLas-hYUH04YNYks5uyWz5gaJpZM4Yxa0l .

rjnw commented 5 years ago

this is info.rkt

#lang info

(define collection "sham")
(define deps '("base"
               "rackunit-lib"
               "dynext-lib"))
(define pkg-desc "compiler framework on top of llvm")
(define version "0.1")
samth commented 5 years ago

That should be fine.

On Sat, Nov 24, 2018, 11:15 AM rajan <notifications@github.com wrote:

this is info.rkt

lang info

(define collection "sham") (define deps '("base" "rackunit-lib" "dynext-lib")) (define pkg-desc "compiler framework on top of llvm") (define version "0.1")

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rjnw/sham/issues/3#issuecomment-441378374, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO78zzyxAPdAVGfpmi-_5Oc2W9czi0Rks5uyXCJgaJpZM4Yxa0l .

samth commented 5 years ago

This is fixed now.