lua-users home
lua-l archive

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


Perhaps https://docs.freebsd.org/info/g++FAQ/g++FAQ.info.More_size_t_problems.html might lead to something relevant. In short, I think you might be using an old compiler version that isn't aware of `size_t`. If that doesn't work, I dunno, but I thought size_t was quite standard given it's the return value of `sizeof()`.

On Fri, Jul 21, 2017 at 11: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





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

--
--
Ryan <vandor2012@gmail.com>
Software Developer / System Administrator
https://hashbang.sh