can't make luajit in 3.6
lhmwzy
lhmwzy at gmail.com
Thu Feb 13 23:06:57 PST 2014
I'd like to provide,but how to
#cd cd LuaJIT-2.0.2.patch/src
#ktrace luajit
ktrace: ktrace.out: Function not implemented
2014-02-14 14:50 GMT+08:00 Alex Hornung <alex at alexhornung.com>:
> Can you provide a ktrace(1) output? Just ktrace luajit, and then kdump
> and get the output.
>
> Cheers,
> Alex
>
>
> On 14/02/14 01:22, lhmwzy wrote:
>
> I have tried as fllowing
>
> diff -Nur LuaJIT-2.0.2/src/lj_alloc.c LuaJIT-2.0.2.patch/src/lj_alloc.c
> --- LuaJIT-2.0.2/src/lj_alloc.c 2013-06-03 19:00:00.000000000 +0000
> +++ LuaJIT-2.0.2.patch/src/lj_alloc.c 2014-02-14 07:19:53.948397000 +0000
> @@ -188,7 +188,7 @@
> return ptr;
> }
>
> -#elif LJ_TARGET_OSX || defined(__FreeBSD__) ||
> defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__sun__)
> +#elif LJ_TARGET_OSX || defined(__FreeBSD__) ||
> defined(__FreeBSD_kernel__) || defined(__OpenBSD__) ||
> defined(__sun__)||defined(__DragonFly__)
>
> /* OSX and FreeBSD mmap() use a naive first-fit linear search.
> ** That's perfect for us. Except that -pagezero_size must be set for OSX,
> @@ -202,7 +202,7 @@
> #endif
> #define MMAP_REGION_END ((uintptr_t)0x80000000)
>
> -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> +#if defined(__FreeBSD__) ||
> defined(__FreeBSD_kernel__)||defined(__DragonFly__)
> #include <sys/resource.h>
> #endif
>
> @@ -212,7 +212,7 @@
> /* Hint for next allocation. Doesn't need to be thread-safe. */
> static uintptr_t alloc_hint = MMAP_REGION_START;
> int retry = 0;
> -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> +#if defined(__FreeBSD__) ||
> defined(__FreeBSD_kernel__)||defined(__DragonFly__)
> static int rlimit_modified = 0;
> if (LJ_UNLIKELY(rlimit_modified == 0)) {
> struct rlimit rlim;
> diff -Nur LuaJIT-2.0.2/src/lj_arch.h LuaJIT-2.0.2.patch/src/lj_arch.h
> --- LuaJIT-2.0.2/src/lj_arch.h 2013-06-03 19:00:00.000000000 +0000
> +++ LuaJIT-2.0.2.patch/src/lj_arch.h 2014-02-14 07:21:18.628483000 +0000
> @@ -67,7 +67,7 @@
> #elif defined(__MACH__) && defined(__APPLE__)
> #define LUAJIT_OS LUAJIT_OS_OSX
> #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
> - defined(__NetBSD__) || defined(__OpenBSD__)
> + defined(__NetBSD__) || defined(__OpenBSD__)||defined(__DragonFly__)
> #define LUAJIT_OS LUAJIT_OS_BSD
> #elif (defined(__sun__) && defined(__svr4__)) || defined(__CYGWIN__)
> #define LUAJIT_OS LUAJIT_OS_POSIX
>
> >cd LuaJIT-2.0.2.patch/
> > cd src
> > /usr/local/bin/make
> HOSTCC host/minilua.o
> HOSTLINK host/minilua
> DYNASM host/buildvm_arch.h
> HOSTCC host/buildvm.o
> HOSTCC host/buildvm_asm.o
> HOSTCC host/buildvm_peobj.o
> HOSTCC host/buildvm_lib.o
> HOSTCC host/buildvm_fold.o
> HOSTLINK host/buildvm
> BUILDVM lj_vm.s
> ASM lj_vm.o
> CC lj_gc.o
> BUILDVM lj_ffdef.h
> CC lj_err.o
> CC lj_char.o
> BUILDVM lj_bcdef.h
> CC lj_bc.o
> CC lj_obj.o
> CC lj_str.o
> CC lj_tab.o
> CC lj_func.o
> CC lj_udata.o
> CC lj_meta.o
> CC lj_debug.o
> CC lj_state.o
> CC lj_dispatch.o
> CC lj_vmevent.o
> CC lj_vmmath.o
> CC lj_strscan.o
> CC lj_api.o
> CC lj_lex.o
> CC lj_parse.o
> CC lj_bcread.o
> CC lj_bcwrite.o
> CC lj_load.o
> CC lj_ir.o
> CC lj_opt_mem.o
> BUILDVM lj_folddef.h
> CC lj_opt_fold.o
> CC lj_opt_narrow.o
> CC lj_opt_dce.o
> CC lj_opt_loop.o
> CC lj_opt_split.o
> CC lj_opt_sink.o
> CC lj_mcode.o
> CC lj_snap.o
> CC lj_record.o
> CC lj_crecord.o
> BUILDVM lj_recdef.h
> CC lj_ffrecord.o
> CC lj_asm.o
> CC lj_trace.o
> CC lj_gdbjit.o
> CC lj_ctype.o
> CC lj_cdata.o
> CC lj_cconv.o
> CC lj_ccall.o
> CC lj_ccallback.o
> CC lj_carith.o
> CC lj_clib.o
> CC lj_cparse.o
> CC lj_lib.o
> CC lj_alloc.o
> CC lib_aux.o
> BUILDVM lj_libdef.h
> CC lib_base.o
> CC lib_math.o
> CC lib_bit.o
> CC lib_string.o
> CC lib_table.o
> CC lib_io.o
> CC lib_os.o
> CC lib_package.o
> CC lib_debug.o
> CC lib_jit.o
> CC lib_ffi.o
> CC lib_init.o
> AR libluajit.a
> CC luajit.o
> BUILDVM jit/vmdef.lua
> DYNLINK libluajit.so
> LINK luajit
> OK Successfully built LuaJIT
>
> All seems good,but when run
> > ./luajit
> ./luajit: cannot create state: not enough memory
>
>
> 2014-02-14 9:19 GMT+08:00 Justin Sherrill <justin at shiningsilence.com>:
>
>> It looks like it's trying something specific; assuming it's really not
>> supported on DragonFly, you could look in the file and see if it has a
>> fallback for other operating systems that don't support this feature and
>> add DragonFly to that fallback.
>>
>>
>> On Thu, Feb 13, 2014 at 4:01 AM, lhmwzy <lhmwzy at gmail.com> wrote:
>>
>>>
>>> LuaJIT-2.1-20140109
>>>
>>> use GNU make to make
>>>
>>> the error info:
>>> lj_mcode.c:123:2: error: #error "Missing OS support for explicit
>>> placement of executable memory"
>>> lj_mcode.c: In function 'mcode_protect':
>>> lj_mcode.c:197:5: warning: implicit declaration of function
>>> 'mcode_setprot' [-Wimplicit-function-declaration]
>>> lj_mcode.c: In function 'mcode_alloc':
>>> lj_mcode.c:235:7: warning: implicit declaration of function
>>> 'mcode_alloc_at' [-Wimplicit-function-declaration]
>>> lj_mcode.c:235:45: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> lj_mcode.c:235:45: note: each undeclared identifier is reported only
>>> once for each function it appears in
>>> lj_mcode.c:240:7: warning: implicit declaration of function 'mcode_free'
>>> [-Wimplicit-function-declaration]
>>> lj_mcode.c: In function 'mcode_allocarea':
>>> lj_mcode.c:275:15: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_reserve':
>>> lj_mcode.c:304:22: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_commit':
>>> lj_mcode.c:313:20: error: 'MCPROT_RX' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_abort':
>>> lj_mcode.c:320:22: error: 'MCPROT_RX' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_patch':
>>> lj_mcode.c:332:24: error: 'MCPROT_RX' undeclared (first use in this
>>> function)
>>> lj_mcode.c:340:24: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> Makefile:642: recipe for target 'lj_mcode.o' failed
>>>
>>> try LuaJIT-2.0.2
>>> the error info :
>>> lj_mcode.c:122:2: error: #error "Missing OS support for explicit
>>> placement of executable memory"
>>> lj_mcode.c: In function 'mcode_protect':
>>> lj_mcode.c:187:5: warning: implicit declaration of function
>>> 'mcode_setprot' [-Wimplicit-function-declaration]
>>> lj_mcode.c: In function 'mcode_alloc':
>>> lj_mcode.c:224:7: warning: implicit declaration of function
>>> 'mcode_alloc_at' [-Wimplicit-function-declaration]
>>> lj_mcode.c:224:45: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> lj_mcode.c:224:45: note: each undeclared identifier is reported only
>>> once for each function it appears in
>>> lj_mcode.c:229:7: warning: implicit declaration of function 'mcode_free'
>>> [-Wimplicit-function-declaration]
>>> lj_mcode.c: In function 'mcode_allocarea':
>>> lj_mcode.c:264:15: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_reserve':
>>> lj_mcode.c:293:22: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_commit':
>>> lj_mcode.c:302:20: error: 'MCPROT_RX' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_abort':
>>> lj_mcode.c:308:20: error: 'MCPROT_RX' undeclared (first use in this
>>> function)
>>> lj_mcode.c: In function 'lj_mcode_patch':
>>> lj_mcode.c:320:24: error: 'MCPROT_RX' undeclared (first use in this
>>> function)
>>> lj_mcode.c:328:24: error: 'MCPROT_RW' undeclared (first use in this
>>> function)
>>>
>>> My os:
>>> uname -a:
>>> DragonFly . 3.6-RELEASE DragonFly v3.6.0.24.gf2d5f-RELEASE #4: Tue Feb
>>> 11 14:22:27 UTC 2014 lhm at .:/usr/obj/usr/src/sys/
>>> lhmwzy x86_64
>>>
>>> Any suggestion?
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20140214/e1f239ce/attachment-0003.htm>
More information about the Users
mailing list