lua-users home
lua-l archive

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


2013/11/14 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> I work on embedded linux system (see http://buildroot.net/) where the
>> C lib has or NOT the Large File Support.
>
> But is it POSIX? What target are you using to build Lua?
>
>> Could you remove from the top of src/liolib.c :
>
>>     #if !defined(_FILE_OFFSET_BITS)
>>     #define    _LARGEFILE_SOURCE    1
>>     #define _FILE_OFFSET_BITS 64
>>     #endif
>
> Why does this not work for you?

find in attachment, a log of a build when these lines are not removed.

currently, Buildroot supports only Lua 5.1.5
(http://git.buildroot.net/buildroot/tree/package/lua/lua.mk).
but I did my experiments for Lua 5.2 in my own repository, see
https://github.com/fperrad/br/tree/lua5.2/package/lua

the top Makefile of Lua is not used, but we call src/Makefile with
cooked variables by lua.mk

François

>
>>> lua 5.2.2 Extracting
gzip -d -c /home/user/checkout/download/lua-5.2.2.tar.gz | tar --strip-components=1 -C /home/user/build/qarm/build/lua-5.2.2  -xf -
>>> lua 5.2.2 Patching

Applying lua-01-root-path.patch using patch:
patching file src/luaconf.h

Applying lua-02-shared-libs-for-lua.patch using patch:
patching file src/Makefile

Applying lua-04-lua-pc.patch using patch:
patching file etc/lua.pc

Applying lua-11-linenoise.patch using patch:
patching file src/lua.c

Applying lua-bug1.patch using patch:
patching file src/ldo.c

Applying lua-bug2.patch using patch:
patching file src/lgc.c

Applying lua-bug3.patch using patch:
patching file src/ldebug.c

Applying lua-bug4.patch using patch:
patching file src/ldebug.c

Applying lua-bug5.patch using patch:
patching file src/luac.c
>>> lua 5.2.2 Configuring
>>> lua 5.2.2 Building
/usr/bin/make -j2 CC="/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc" RANLIB="/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-ranlib" CFLAGS="  -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" AR="/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-ar rcu" PKG_VERSION=5.2.2 -C /home/user/build/qarm/build/lua-5.2.2/src all
make[1]: Entering directory `/home/user/build/qarm/build/lua-5.2.2/src'
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lapi.o lapi.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lcode.o lcode.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lctype.o lctype.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o ldebug.o ldebug.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o ldo.o ldo.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o ldump.o ldump.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lfunc.o lfunc.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lgc.o lgc.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o llex.o llex.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lmem.o lmem.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lobject.o lobject.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lopcodes.o lopcodes.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lparser.o lparser.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lstate.o lstate.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lstring.o lstring.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o ltable.o ltable.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o ltm.o ltm.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lundump.o lundump.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lvm.o lvm.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lzio.o lzio.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lauxlib.o lauxlib.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lbaselib.o lbaselib.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lbitlib.o lbitlib.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lcorolib.o lcorolib.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o ldblib.o ldblib.c
/home/user/build/qarm/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -pipe -Os  -Wall -fPIC -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o liolib.o liolib.c
In file included from /home/user/build/qarm/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/errno.h:29:0,
                 from liolib.c:18:
/home/user/build/qarm/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/features.h:219:5: error: #error It appears you have defined _FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file support enabled.
In file included from /home/user/build/qarm/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/stdio.h:72:0,
                 from liolib.c:19:
/home/user/build/qarm/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/uClibc_stdio.h:61:2: error: #error Sorry... uClibc was built without large file support!
In file included from liolib.c:19:0:
/home/user/build/qarm/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/stdio.h:83:1: error: unknown type name '__STDIO_fpos64_t'
make[1]: *** [liolib.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/user/build/qarm/build/lua-5.2.2/src'
make: *** [/home/user/build/qarm/build/lua-5.2.2/.stamp_built] Error 2