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

RuntimeException: <inst pixie.stdlib.Keyword> Var assoc is undefined #535

Open
heyarne opened this issue Jan 8, 2018 · 8 comments
Open

RuntimeException: <inst pixie.stdlib.Keyword> Var assoc is undefined #535

heyarne opened this issue Jan 8, 2018 · 8 comments

Comments

@heyarne
Copy link

@heyarne heyarne commented Jan 8, 2018

I just tried compiling pixie on a Macbook Pro, macOS 10.13.2, but couldn't run the resulting pixie-vm executable. It crashed with the following error message:

$ ./pixie-vm 
in internal function run_load_stdlib

in internal function load-ns

in internal function load-file

in internal function load-reader

RuntimeException: <inst pixie.stdlib.Keyword> Var assoc is undefined

Following the instructions to build the executable all I basically did was:

$ brew install libuv libffi boost
$ git clone https://github.com/pixie-lang/pixie.git
$ make build_with_jit

Here's some additional info about the installed versions:

$ brew info libuv libffi boost
libuv: stable 1.18.0 (bottled), HEAD
Multi-platform support library with a focus on asynchronous I/O
https://github.com/libuv/libuv
/usr/local/Cellar/libuv/1.18.0 (56 files, 2.8MB) *
  Poured from bottle on 2018-01-08 at 10:12:42
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libuv.rb
==> Dependencies
Build: pkg-config ✔, automake ✘, autoconf ✔, libtool ✔, sphinx-doc ✘
==> Options
--with-test
	Execute compile time checks (Requires Internet connection)
--HEAD
	Install HEAD version

libffi: stable 3.2.1 (bottled), HEAD [keg-only]
Portable Foreign Function Interface library
https://sourceware.org/libffi/
/usr/local/Cellar/libffi/3.2.1 (16 files, 296.9KB)
  Poured from bottle on 2017-07-01 at 22:57:15
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libffi.rb
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/libffi/lib
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig


boost: stable 1.66.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.66.0 (13,101 files, 435.2MB) *
  Poured from bottle on 2018-01-08 at 10:12:59
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ✔
==> Options
--with-icu4c
	Build regexp engine with icu support
--without-single
	Disable building single-threading variant
--without-static
	Disable building static library variant
--HEAD
	Install HEAD version

Any idea what caused this?

@alekcz

This comment has been minimized.

Copy link

@alekcz alekcz commented Jan 11, 2018

@heyarne took me a while but I finally got to the bottom of it. The latest version on master is broken. To get it working use the previous merge:
(SHA 5eb0ccb).
Like so:

$ git clone https://github.com/pixie-lang/pixie.git
$ git checkout 5eb0ccbe8b0087d3a5f2d0bbbc6998d624d3cd62
$ make build_with_jit

After that everything should be peachy fab

@alekcz

This comment has been minimized.

Copy link

@alekcz alekcz commented Jan 11, 2018

@heyLu @egregius313 I have no idea why or how but the letfn macro has broken pixie.
The Travis CI build also failed. pixie still returns 0 so the I suspect Travis didn't pick up on the failure.
screen shot 2018-01-11 at 11 25 47 pm

Compiling stdlib.pxi fails and that brings everything crashing down.

Perhaps we roll back till we can fix?

@egregius313

This comment has been minimized.

Copy link
Contributor

@egregius313 egregius313 commented Jan 14, 2018

@alekcz I'm not sure what the problem is. I'd suggest rolling it back until we can find the issue

@alekcz

This comment has been minimized.

Copy link

@alekcz alekcz commented Jan 14, 2018

@egregius313 It's this bit of code:

(defmacro letfn
  [fnspecs & body]
  `(letfn* ~(vec (interleave (map first fnspecs)
                             (map #(cons `fn %) fnspecs)))
           ~@body))

It doesn't seem to be able to ignore letfn* until the macro is "ready" so to speak

@egregius313

This comment has been minimized.

Copy link
Contributor

@egregius313 egregius313 commented Jan 14, 2018

I think the issue is that my definition is based on Clojure's definition of letfn and forgot to add a definition for the letfn* operation. Now that I'm thinking about it, I'm pretty sure it's like let* where it's built-in in Clojure. So I need to rewrite Pixie's letfn to expand into a let block. Just roll it back for now

@alekcz alekcz mentioned this issue Jan 22, 2018
2 of 8 tasks complete
@alekcz

This comment has been minimized.

Copy link

@alekcz alekcz commented Jan 22, 2018

@thomasmulvaney any chance you could help with a roll back?

@theronic

This comment has been minimized.

Copy link

@theronic theronic commented Sep 27, 2018

To which revision should we rollback to, this one?

And how long should compilation take? First compile took 16 minutes on my 15" Macbook Pro.

@linneman

This comment has been minimized.

Copy link

@linneman linneman commented Sep 27, 2018

Hi Theronic,

yes, I used exactly the version you have mentioned in your last post:

git checkout -b work 5eb0ccb

Compilation takes a while. I do not remember the exact time but 16 minutes sounds reasonable.

Have fund and Regards, Otto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.