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

errors with "make samples" #123

Open
wluker opened this issue Apr 18, 2018 · 5 comments
Open

errors with "make samples" #123

wluker opened this issue Apr 18, 2018 · 5 comments
Labels

Comments

@wluker
Copy link

wluker commented Apr 18, 2018

$ make samples

is printing errors

>>> ERROR : expected option `ceu-features-dynamic`

For example the first sample prints:

##########################################################################
File: samples/test-04.ceu -> /tmp/test-04
Description: Prints "Lua X" every second from three `lua` states.
Features:
 - three `lua` states: one global and two local
##########################################################################
Press <enter> to start...
ceu --pre --pre-input=samples/test-04.ceu --pre-args="-I./include" --ceu --ceu-features-lua=true --ceu-features-thread=true --ceu-err-unused=pass --env --env-types=env/types.h --env-threads=env/threads.h --env-main=env/main.c --cc --cc-args="-llua5.3 -lpthread" --cc-output=/tmp/test-04
>>> ERROR : expected option `ceu-features-dynamic`
/bin/sh: line 20: /tmp/test-04: No such file or directory
>>> OK

Does this mean the sample is failing?

@fsantanna
Copy link
Collaborator

fsantanna commented Apr 18, 2018

Yes, it is still failing.
You should now checkout the master branch and try again:

$ git checkout master
$ make samples

Please, let me know if it works.

@wluker
Copy link
Author

wluker commented Apr 18, 2018

Thanks! That fixed that issue, but now the compiler can't find lua5.3/lua.h. On arch linux it looks like lua5.3 is the default lua, so lua.h is /usr/include/lua.h.

##########################################################################
File: samples/test-00.ceu -> /tmp/test-00
Description: Terminates immediatelly with an `escape`.
Features:
 - `escape`
##########################################################################
Press <enter> to start...
ceu --pre --pre-input=samples/test-00.ceu --pre-args="-I./include" --ceu --ceu-features-lua=true --ceu-features-thread=true --ceu-features-dynamic=true --ceu-err-unused=pass --env --env-types=env/types.h --env-threads=env/threads.h --env-main=env/main.c --cc --cc-args="-llua5.3 -lpthread" --cc-output=/tmp/test-00
>>> ERROR : /tmp/lua_GnX6O5:650:10: fatal error: lua5.3/lua.h: No such file or directory
 #include <lua5.3/lua.h>
          ^~~~~~~~~~~~~~
compilation terminated.

/bin/sh: line 20: /tmp/test-00: No such file or directory
>>> OK

On arch pkg-config --modversion lua returns 5.3.4, and pkg-config --libs --cflags lua returns -llua -lm.

@fsantanna fsantanna added the bug label Apr 18, 2018
@fsantanna
Copy link
Collaborator

Ok, this is a bit trickier to fix.

As a workaround for now, you have two options:

  1. Disable support for lua in the Makefile:
    • remove --ceu-features-lua=true and -llua5.3
    • only the examples that use embedded Lua within Céu will not compile
  2. Edit two files:
    • Makefile: change -llua5.3 to -llua
    • src/c/ceu.c: change #include <lua5.3/*> to #include <lua/*>

@wluker
Copy link
Author

wluker commented Apr 18, 2018

I used option 2 and make samples now passes. Thanks.

#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>

Ceu looks very interesting. I look forward to learning it.

@fsantanna
Copy link
Collaborator

Great!
Thanks for your interest in Céu.
If you have any questions, feel free to contact me directly.
We also have a mailing list and a chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants