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

New project won't run #36

Open
axelson opened this issue Jun 27, 2019 · 11 comments
Open

New project won't run #36

axelson opened this issue Jun 27, 2019 · 11 comments

Comments

@axelson
Copy link
Collaborator

axelson commented Jun 27, 2019

After running:

mix scenic.new example
cd example
mix deps.get
iex -S mix

After some normal compilation errors I get this output:

Generated scenic_driver_glfw app
==> example
Compiling 2 files (.ex)
Generated example app
Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)
sh: /tmp/example/_build/dev/lib/scenic_driver_glfw/priv/prod/scenic_driver_glfw: No such file or directory

08:47:17.330 [error] dirty close

And a scenic window never opens. I don't think it's a system dependency issue because I have another scenic application that's still working. I'll try and update all the deps on that later to narrow down possible issues.

Elixir version: Elixir 1.8.1 (compiled with Erlang/OTP 21)
Erlang version: 21.2.4

And this is with the latest scenic.new task

Edit: To work around this you need to rm -rf _build and then recompile and re-run.

@Fusion
Copy link

Fusion commented Jul 7, 2019

I have noticed the same issue. I wouldn't know how to diagnose it as I am an absolute beginner with Scenic and Elixir in general.

I noticed, though, that you can work around this issue pretty easily (I'd still like to understand it!):

mix do deps.get, scenic.run

Let it fail... abort.

mkdir _build/dev/lib/scenic_driver_glfw/priv/prod
ln -s \
  $(pwd)/deps/scenic_driver_glfw/priv/prod/scenic_driver_glfw \
  _build/dev/lib/scenic_driver_glfw/priv/prod/scenic_driver_glfw

Build again. Profit.

@axelson
Copy link
Collaborator Author

axelson commented Jul 7, 2019

@Fusion what OS version are you using? And what version of Elixir and Erlang?

@Fusion
Copy link

Fusion commented Jul 7, 2019

This is a not a very standard configuration:
It's Ubuntu 18.04, running in WSL.
Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
Elixir 1.9.0 (compiled with Erlang/OTP 21)

@boydm
Copy link
Collaborator

boydm commented Jul 7, 2019

If this boils down to a command line fix - that sounds like an addition to the readme.

@axelson
Copy link
Collaborator Author

axelson commented Jul 8, 2019

@boydm I get this error on Mac 10.14.5 as well so I think there's something going on. It seems odd that the scenic_driver_glfw is being built into the priv directory of scenic in the deps folder. I would think it would only be built into _build and not deps.

@boydm
Copy link
Collaborator

boydm commented Jul 8, 2019

@axelson Yes that is weird. I'll try to repo.

@boydm
Copy link
Collaborator

boydm commented Jul 8, 2019

I have a repo. Working on it.

@ejc123
Copy link

ejc123 commented Jul 18, 2019

@boydm I get this error on Mac 10.14.5 as well so I think there's something going on. It seems odd that the scenic_driver_glfw is being built into the priv directory of scenic in the deps folder. I would think it would only be built into _build and not deps.

I noticed that the Makefile for scenic uses $(MIX_COMPILE_PATH)/../priv while this Makefile uses priv. The former compiles in _build while this one compiles in deps.

I also read through elixir_make which has this comment:

# IF there was no priv before and now there is one, we assume
# the user wants to copy it. If priv already existed and was
# written to it, then it won't be copied if build_embedded is
# set to true.

That's why priv/prod/scenic_driver_glfw isn't being copied the first time, but is once it already exists.

I have a patch which I'll be submitting a PR for.

@boydm
Copy link
Collaborator

boydm commented Jul 18, 2019

Oh good! I am swamped with something else have haven't been able to focus on it properly.

I suspected it was something like that.

@noozo
Copy link

noozo commented Jul 20, 2019

I have noticed the same issue. I wouldn't know how to diagnose it as I am an absolute beginner with Scenic and Elixir in general.

I noticed, though, that you can work around this issue pretty easily (I'd still like to understand it!):

mix do deps.get, scenic.run

Let it fail... abort.

mkdir _build/dev/lib/scenic_driver_glfw/priv/prod
ln -s \
  $(pwd)/deps/scenic_driver_glfw/priv/prod/scenic_driver_glfw \
  _build/dev/lib/scenic_driver_glfw/priv/prod/scenic_driver_glfw

Build again. Profit.

Worked for me as well, on OSX Mojave 10.14.5.

@hakanai
Copy link
Contributor

hakanai commented Aug 29, 2020

I'm using WSL too but in my case this file seemingly got created fine:

$ ls -l _build/dev/lib/scenic_driver_glfw/priv/prod
total 232
-rwxrwxrwx 1 trejkaz trejkaz 333864 Aug 29 22:25 scenic_driver_glfw

But still:

$ mix scenic.run

22:26:03.326 [error] dirty close

Ubuntu 18.04.4 LTS on WSL
Erlang/OTP 23 [erts-11.0.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.10.4 (compiled with Erlang/OTP 22)

Different issue?

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

6 participants