wahern / cqueues

Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.
http://25thandclement.com/~william/projects/cqueues.html
MIT License
244 stars 37 forks source link

Does not build on raspbian #250

Closed Nomarian closed 2 years ago

Nomarian commented 2 years ago

It seems luapath is not capable of identifying where lua.h is on raspbian using luarocks.

FWIW, lua.h is in /usr/include/lua5.3/

; sudo luarocks install cqueues
Installing https://luarocks.org/cqueues-20200726.53-0.src.rock

cqueues 20200726.53-0 depends on lua 5.3 (5.3-1 provided by VM)
Warning: unmatched variable LUA_LIBDIR
env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/luapath’: Permission denied
env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/luapath’: Permission denied
env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/luapath’: Permission denied
env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/luapath’: Permission denied
make: execvp: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/vendor.os: Permission denied
env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/vendor.cc’: Permission denied
make: execvp: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/lib/../../mk/vendor.os: Permission denied
make: execvp: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/changelog: Permission denied
cp /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/config.h.guess /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/config.h
cp /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/config.h /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/config.h
env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/luapath’: Permission denied
make: execvp: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/../mk/changelog: Permission denied
make: execvp: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/../mk/changelog: Permission denied
make: execvp: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/../mk/changelog: Permission denied
mkdir -p /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/5.3
gcc -O2 -fPIC -DLUA_COMPAT_APIINTCASTS  -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -I"/usr/include" -I"/usr/include" -DCOMPAT53_PREFIX=cqueues    -c -o /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/5.3/cqueues.o /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/cqueues.c
/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/cqueues.c:47:10: fatal error: lua.h: No such file or directory
 #include <lua.h>
          ^~~~~~~
compilation terminated.
make: *** [/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/GNUmakefile:88: /tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/src/5.3/cqueues.o] Error 1

Error: Build error: Failed building.
daurnimator commented 2 years ago

env: ‘/tmp/luarocks_cqueues-20200726.53-0-72Z5jr/cqueues-rel-20200726/mk/luapath’: Permission denied

This suggests luapath is not chmod +x. Do you happen to have /tmp mounted noexec?

Nomarian commented 2 years ago

ah, I do.

FWIW I happen to have $TMPDIR set which usually avoids this.

daurnimator commented 2 years ago

FWIW I happen to have $TMPDIR set which usually avoids this.

I guess that would be a luarocks bug rather than a cqueues/luapath bug if TMPDIR is not being respected?

Nomarian commented 2 years ago

Ah, I was mistaken, when you sudo the environment variables does not get inherited, you have to sudo -E.

other environments do have /tmp as noexec and you can sh /tmp/ instead of running directly. but sudo -E worked, so matter closed?

I have seen luapath in other places, I think it should just be installed via luarocks into its bin path considering.

daurnimator commented 2 years ago

I don't think there's anything that can/should be done in the context of the cqueues project