Giter VIP home page Giter VIP logo

Comments (10)

mascarenhas avatar mascarenhas commented on September 1, 2024

Maybe you have another Lua installation and this is what configure is detecting? Could you try

luarocks install LUA_INCDIR=/SANDBOX/include FFI_DIR=/SANDBOX alien

Fabio

from alien.

g-ederer avatar g-ederer commented on September 1, 2024

Hi Fabio:

There is another, slightly older Lua installed on my system. I hoped that I had bypassed it by setting LUA_PATH to point to my SANDBOX, where I installed Lua 5.2.

gederer@moddev2-c64% echo "$LUA_PATH"
/home/gederer/SANDBOX/share/lua/5.2/?.lua;/home/gederer/SANDBOX/share/lua/5.2/?/init.lua;/home/gederer/SANDBOX/lib/lua/5.2/?.lua;/home/gederer/SANDBOX/lib/lua/5.2/?/init.lua;./?.lua

When I run
luarocks install LUA_INCDIR=/SANDBOX/include FFI_DIR=/SANDBOX alien
I get:

gederer@moddev2-c64% luarocks install LUA_INCDIR=$SANDBOX/include FFI_DIR=$SANDBOX alien
Installing http://www.luarocks.org/repositories/rocks/alien-0.7.0-1.src.rock...
Using http://www.luarocks.org/repositories/rocks/alien-0.7.0-1.src.rock... switching to 'build' mode
Archive: /tmp/luarocks_luarocks-rock-alien-0.7.0-1-454/alien-0.7.0-1.src.rock
inflating: alien-0.7.0-1.rockspec
extracting: alien-0.7.0.zip
Archive: alien-0.7.0.zip
creating: alien-0.7.0/
inflating: alien-0.7.0/configure
creating: alien-0.7.0/doc/
inflating: alien-0.7.0/doc/alien.html
inflating: alien-0.7.0/doc/alien.md
inflating: alien-0.7.0/doc/Makefile.am
inflating: alien-0.7.0/Makefile.in
creating: alien-0.7.0/src/
inflating: alien-0.7.0/src/constants
inflating: alien-0.7.0/src/alien.lua
inflating: alien-0.7.0/src/alien.c
inflating: alien-0.7.0/src/struct.c
inflating: alien-0.7.0/src/Makefile.am
creating: alien-0.7.0/build-aux/
inflating: alien-0.7.0/build-aux/depcomp
inflating: alien-0.7.0/build-aux/missing
inflating: alien-0.7.0/build-aux/install-sh
inflating: alien-0.7.0/build-aux/extract-trace
inflating: alien-0.7.0/build-aux/ar-lib
inflating: alien-0.7.0/build-aux/options-parser
inflating: alien-0.7.0/build-aux/ltmain.sh
inflating: alien-0.7.0/build-aux/config.guess
inflating: alien-0.7.0/build-aux/Makefile.am
inflating: alien-0.7.0/build-aux/config.sub
inflating: alien-0.7.0/config.h.in
inflating: alien-0.7.0/configure.ac
creating: alien-0.7.0/tests/
inflating: alien-0.7.0/tests/alientest.c
inflating: alien-0.7.0/tests/test_alien.lua
inflating: alien-0.7.0/tests/Makefile.am
creating: alien-0.7.0/samples/
inflating: alien-0.7.0/samples/string_array.lua
inflating: alien-0.7.0/samples/libc.lua
inflating: alien-0.7.0/samples/gtk.lua
inflating: alien-0.7.0/samples/Makefile.am
inflating: alien-0.7.0/aclocal.m4
creating: alien-0.7.0/m4/
inflating: alien-0.7.0/m4/lt~obsolete.m4
inflating: alien-0.7.0/m4/ltsugar.m4
inflating: alien-0.7.0/m4/ltoptions.m4
inflating: alien-0.7.0/m4/ltversion.m4
inflating: alien-0.7.0/m4/ax_lua.m4
inflating: alien-0.7.0/m4/ax_with_prog.m4
inflating: alien-0.7.0/m4/libtool.m4
inflating: alien-0.7.0/Makefile.am
inflating: alien-0.7.0/README
inflating: alien-0.7.0/alien.rockspec.in
./configure LUA=/home/gederer/SANDBOX/bin/lua CPPFLAGS='-I/home/gederer/SANDBOX/include -I/home/gederer/SANDBOX/include' LDFLAGS=-L/home/gederer/SANDBOX/lib --prefix=/home/gederer/SANDBOX/lib/luarocks/rocks/alien/0.7.0-1 --libdir=/home/gederer/SANDBOX/lib/luarocks/rocks/alien/0.7.0-1/lib --datadir=/home/gederer/SANDBOX/lib/luarocks/rocks/alien/0.7.0-1/lua
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ANSI C header files... (cached) yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking ffi.h usability... yes
checking ffi.h presence... yes
checking for ffi.h... yes
checking for ffi_closure_alloc in -lffi... yes
checking for stdint.h... (cached) yes
checking Lua version is in range 501 <= v < 503... yes
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... yes
checking lualib.h presence... yes
checking for lualib.h... yes
checking lua.h version is in range 501 <= v < 503... no
configure: error: in /tmp/luarocks_alien-0.7.0-1-6752/alien-0.7.0': configure: error: lua.h version not in desired range Seeconfig.log' for more details

Error: Build error: Failed building.

As I said in my previous email, it finds ffi fine. But it does not seem to like lua itself.

Thanks,
--greg

from alien.

g-ederer avatar g-ederer commented on September 1, 2024

Hi Fabio:

Here is some more information. I tried building using the Autoconf configure script with the following command:
% ./configure --libdir=$SANDBOX/lib/lua/5.2 --includedir=$SANDBOX/include --datadir=$SANDBOX/share/lua/5.2

It failed as follows (from the config.log file):
...
configure:12737: checking lualib.h presence
configure:12737: gcc -E -I/home/gederer/SANDBOX/include -L/home/gederer/SANDBOX/lib /home/gederer/SANDBOX/include conftest.c
gcc: /home/gederer/SANDBOX/include: linker input file unused because linking not done
configure:12737: $? = 0
configure:12737: result: yes
configure:12737: checking for lualib.h
configure:12737: result: yes
configure:12762: checking lua.h version is in range 501 <= v < 503
configure:12789: gcc -o conftest -g -O2 -I/home/gederer/SANDBOX/include -L/home/gederer/SANDBOX/lib /home/gederer/SANDBOX/include conftest.c -lffi >&5
/home/gederer/SANDBOX/include: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure:12789: $? = 1
configure: program exited with status 1
...

It looks like the Autoconf macro that constructs the command to compile the little test program "conftest.c" adds an extra argument to the C compiler command line; it adds an extra "/home/gederer/SANDBOX/include" with no compiler switch. The C compiler sees that it's a directory, not a file to compile, and dies.

I think it has something to do with the following at the bottom of m4/ax_lua.m4
LUA_OLD_LIBS="$LIBS"
LIBS="$LIBS $LUA_LIB"
LUA_OLD_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
AC_RUN_IFELSE([AC_LANG_SOURCE([[

I wonder if CPPFLAGS already has "-I/home/gederer/SANDBOX/include -L/home/gederer/SANDBOX/lib " and the line CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" appends an extra "/home/gederer/SANDBOX/include"

Regards,
--greg

from alien.

jhernancanom avatar jhernancanom commented on September 1, 2024

Hi, Greg.
I am also interested in compiling Alien.
I see that you have reached longer than me.

Can you help me to start compiling Alien?

Thanks.

HERNAN

from alien.

g-ederer avatar g-ederer commented on September 1, 2024

On 09/05/2016 01:58 AM, jhernancanom wrote:

Hi, Greg.
I am also interested in compiling Alien.
I see that you have reached longer than me.

Can you help me to start compiling Alien?

Thanks.

HERNAN


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#34 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AChOCKQF-R1pA7jHAXbSDcSOEGZMI2qSks5qm69qgaJpZM4AN5-6.

Hi Hernan:

I have not used lua in several years -- development priorities changed.I
never got Alien working. Instead I used the LuaJIT FFI module. As I
recall, it built with no problems (on Mac OS-X lion). Once I got the ffi
interface to my C libraries configured correctly, it worked real nice. I
haven't tried it since I upgraded OS-X to el capitan.

--greg

from alien.

jhernancanom avatar jhernancanom commented on September 1, 2024

Fine, Gregory.

... the ffi interface to my C libraries configured correctly ...

I would like something like that, too.
But say me: When you mask the _VERSION in LuaJIT, does it respond with Lua
5.1, yes?

Thanks for taking time to answer me.
By.

from alien.

moteus avatar moteus commented on September 1, 2024

There also LuaFFI library. It has no external deps.

from alien.

jhernancanom avatar jhernancanom commented on September 1, 2024

Yes, friend.
But it has no a binary DLL that I can use, nor instructions that I colud
follow to build/compile it.
I do not find doc....

Thanks, friend.

See you later.

2016-09-08 2:18 GMT-05:00 Alexey Melnichuk:

There also LuaFFI library. It has no external deps.

from alien.

moteus avatar moteus commented on September 1, 2024

What compiler you use. There bat file to MSVC. Which should works just fine,
just edi this one https://github.com/jmckaskill/luaffi/blob/master/msvcbuild.bat#L8-L12
and run msvcbuild release

from alien.

jhernancanom avatar jhernancanom commented on September 1, 2024

Fine, Alexey.

I had downloaded it from http://files.luaforge.net/releases/luaffi/luaffi
which does not have any .BAT .

I searched in LuaRocks and I find luaffi by colesbury with sources in
https://github.com/facebook/luaffifb
wich yes have the .BAT that you say.

I have "Microsoft Visual Basic 2010 Express" and "Microsoft Visual Studio
2008" installed in my portatil.

I'll try later with msvcbuild.bat and inform to you how is going to me. I
consider that I have to re-edit several lines al begining, the dirs in my
scenario.

I have in my Internet explorer these two URLs:

https://github.com/jmckaskill/luaffi

https://github.com/facebook/luaffifb

luaffifb says updates for Lua 5.3 (something very important for me) until 3
(three) months ago.

Both have the .BAT in mention.

Thanks my friend.

2016-09-08 2:44 GMT-05:00 Alexey Melnichuk:

What compiler you use. There bat file to MSVC. Which should works just
fine,
just edi this one https://github.com/jmckaskill/
luaffi/blob/master/msvcbuild.bat#L8-L12
and run msvcbuild release

from alien.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.