lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 3 November 2011 14:24, Francesco Abbate <> wrote:

> ... The supc++ library is not needed if
> you link with g++ instead of gcc. Just edit the Makefile in the root
> directory and change the line:
> to
> and remove the supc++ library a few lines above from the LIBS variable.

Ok, this worked fine.

> You may also want to turn on debugging my changing the DEBUG flag to
> "yes" (without the quotation marks) in the file "makeconfig".

Done, too. However, I do not know what's happening - I still keep
getting NULL from the first call lua_open:

~/Code/gsl-shell (x64-build-fix)$ gdb ./gsl-shell
GNU gdb 6.3.50-20050815 (Apple version gdb-1700.2) (Thu May 19
20:52:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
shared libraries ........ done

(gdb) break main
Breakpoint 1 at 0x100006cc1: file gsl-shell-jit.c, line 592.
(gdb) r
Starting program: /Users/miky/Code/gsl-shell/gsl-shell
Reading symbols for shared libraries +++++++............................ done

Breakpoint 1, main (argc=1, argv=0x7fff5fbffb68) at gsl-shell-jit.c:592
592	  pthread_mutex_init (gsl_shell_mutex, NULL);
(gdb) n
593	  lua_State *L = lua_open();  /* create state */
(gdb) n
594	  if (L == NULL) {
(gdb) p L
$1 = (lua_State *) 0x0

I checked the luajit executable that is created in luajit2/src, and it
runs just fine:

~/Code/gsl-shell (x64-build-fix)$ luajit2/src/luajit
LuaJIT 2.0.0-beta8 -- Copyright (C) 2005-2011 Mike Pall.
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc fuse

I'm waiting for suggestions to try :)