[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Building Lua 5.3 from Lua.org on FreeBSD
- From: Russell Haley <russ.haley@...>
- Date: Sat, 22 Jul 2017 14:32:40 -0700
On Sat, Jul 22, 2017 at 2:31 PM, Russell Haley <russ.haley@gmail.com> wrote:
> I can confirm the patch fixes Lua 5.3.4 as provided by the tarball on
> FreeBSD 12-CURRENT on armv6 and in a 11.0-RELEASE jail running on a
> 12-CURRENT amd64 host. I have not tested:
>
> - Head Lua from Git, any platform
> - 12-CURRENT amd64
Argh, sorry, that assumes the previously mentioned changes to the
Makefile (changing to clang and adding CFLAGS and LDFLAGS noted
previously)
> On Sat, Jul 22, 2017 at 10:13 AM, Russell Haley <russ.haley@gmail.com> wrote:
>> On Fri, Jul 21, 2017 at 9:25 PM, Russell Haley <russ.haley@gmail.com> wrote:
>>> Thank you. Thats the change I forgot I had made. I added the following
>>> to Makefile:
>>>
>>> MYCFLAGS=-I/usr/local/include
>>> MYLDFLAGS=-L/usr/local/lib
>>>
>>> And the readline error is gone. However:
>>>
>>> freebsd@imx6:~/lua/lua-5.3.4/src % make freebsd
>>> make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline" CC=cc
>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX
>>> -I/usr/local/include -c lua.c -o lua.o
>>> In file included from lua.c:12:
>>> In file included from /usr/include/signal.h:40:
>>> /usr/include/machine/ucontext.h:81:2: error: unknown type name
>>> 'size_t'; did you mean '__size_t'?
>>> size_t mc_vfp_size;
>>> ^
>>> /usr/include/machine/_types.h:87:20: note: '__size_t' declared here
>>> typedef __uint32_t __size_t; /* sizeof() */
>>> ^
>>> 1 error generated.
>>> *** Error code 1
>>>
>>> Stop.
>>> make[1]: stopped in /home/freebsd/lua/lua-5.3.4/src
>>> *** Error code 1
>>>
>>> Stop.
>>> make: stopped in /home/freebsd/lua/lua-5.3.4/src
>>
>> The following is the response from the port maintainer about the issue
>> noted above:
>>
>> Hi Russell,
>>
>>> On Jul 21, 2017, at 11:47 PM, Russell Haley <russ.haley@gmail.com> wrote:
>>>
>>> I'm contacting you because you are listed as the port maintainer for
>>> Lua53. The port does not currently build on armv6. I can confirm that
>>> this problem extends to the official package from lua and the lua
>>> mirror from git.
>>>
>>> The error listed in PortsMon is the same as I am experiencing:
>>
>> Thanks for reporting.
>>
>> The issue here is that a header (ucontext.h) refers to size_t without
>> having included it explicitly. ucontext.h should probably have used
>> the internal name __size_t instead of size_t. The patch at [1] is a
>> quick fix to that problem. (Please note that this is not an issue in
>> Lua’s implementation, but in a header that it transitively includes.)
>>
>> Let me know if that fixes the issue!
>>
>> [1] https://github.com/pfsense/FreeBSD-ports/blob/1110cd5f947a5e774ae0a4e5e6d74776ee0e3678/lang/lua53/files/patch-src_lua.c
>>
>> Cheers,
>> - Salazar
>>
>> I will test this patch today at some point.
>> Cheers,
>> Russ
>>
>>> On Fri, Jul 21, 2017 at 8:51 PM, Charles Heywood <vandor2012@gmail.com> wrote:
>>>> Depending on your system information you might need to use
>>>> -I/path/to/readline/dir in your CFLAGS ?
>>>>
>>>>
>>>> On Fri, Jul 21, 2017, 22:49 Russell Haley <russ.haley@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've built lua a bunch of times on TrueOS (aka FreeBSD 12-Current)
>>>>> using the files from git. I usually mangle the Makefile myself to use
>>>>> clang and make it install where I want to.
>>>>>
>>>>> Anyway, I have an arm board with FreeBSD 12-Current on it. I tried
>>>>> building from the tarball provided by the lua.org website. I modified
>>>>> the Makefile to use clang because, well, this is FreeBSD! I added the
>>>>> CC=cc flag from osx target to the freebsd.
>>>>>
>>>>> The following is my failed build output is below. For the record,
>>>>> readline 6.3.8_1 installed with git and git seems to work fine.
>>>>>
>>>>>
>>>>> freebsd@imx6:~/lua/lua-5.3.4/src % make freebsd
>>>>> make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline" CC=cc
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lapi.c -o
>>>>> lapi.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lcode.c -o
>>>>> lcode.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lctype.c -o
>>>>> lctype.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ldebug.c -o
>>>>> ldebug.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ldo.c -o ldo.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ldump.c -o
>>>>> ldump.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lfunc.c -o
>>>>> lfunc.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lgc.c -o lgc.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c llex.c -o
>>>>> llex.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lmem.c -o
>>>>> lmem.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lobject.c
>>>>> -o lobject.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lopcodes.c
>>>>> -o lopcodes.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lparser.c
>>>>> -o lparser.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lstate.c -o
>>>>> lstate.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lstring.c
>>>>> -o lstring.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ltable.c -o
>>>>> ltable.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ltm.c -o ltm.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lundump.c
>>>>> -o lundump.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lvm.c -o lvm.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lzio.c -o
>>>>> lzio.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lauxlib.c
>>>>> -o lauxlib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lbaselib.c
>>>>> -o lbaselib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lbitlib.c
>>>>> -o lbitlib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lcorolib.c
>>>>> -o lcorolib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ldblib.c -o
>>>>> ldblib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c liolib.c -o
>>>>> liolib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lmathlib.c
>>>>> -o lmathlib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c loslib.c -o
>>>>> loslib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lstrlib.c
>>>>> -o lstrlib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c ltablib.c
>>>>> -o ltablib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lutf8lib.c
>>>>> -o lutf8lib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c loadlib.c
>>>>> -o loadlib.o
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c linit.c -o
>>>>> linit.o
>>>>> ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o
>>>>> lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o
>>>>> ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o
>>>>> lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o
>>>>> lutf8lib.o loadlib.o linit.o
>>>>> ranlib liblua.a
>>>>> cc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c lua.c -o lua.o
>>>>> In file included from lua.c:12:
>>>>> In file included from /usr/include/signal.h:40:
>>>>> /usr/include/machine/ucontext.h:81:2: error: unknown type name
>>>>> 'size_t'; did you mean '__size_t'?
>>>>> size_t mc_vfp_size;
>>>>> ^
>>>>> /usr/include/machine/_types.h:87:20: note: '__size_t' declared here
>>>>> typedef __uint32_t __size_t; /* sizeof() */
>>>>> ^
>>>>> lua.c:82:10: fatal error: 'readline/readline.h' file not found
>>>>> #include <readline/readline.h>
>>>>> ^~~~~~~~~~~~~~~~~~~~~
>>>>> 2 errors generated.
>>>>> *** Error code 1
>>>>>
>>>>> Stop.
>>>>> make[1]: stopped in /home/freebsd/lua/lua-5.3.4/src
>>>>> *** Error code 1
>>>>>
>>>>> Stop.
>>>>> make: stopped in /home/freebsd/lua/lua-5.3.4/src
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Russ
>>>>>
>>>> --
>>>> --
>>>> Ryan <vandor2012@gmail.com>
>>>> Software Developer / System Administrator
>>>> https://hashbang.sh