luajit: compilation fails except on x86_64
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @milani @neheb
Environment: x86_64 lantiq_xrx200, APU3, OpenWrt master
Description:
The compilation fails on lantiq_xrx200 and x86_geode.
I didn't try the other targets.
Only x86_64 does build luajit as expectd.
Problem:
I update my config and now I have a dependency to luajit.
On my build I am using snort. So I think this was commit https://github.com/openwrt/packages/commit/102e67cc15eaa7b917e4d8f33ada1fa8d0b745c1#diff-a0db22578994a62ff285551444ef788e
which added luajit to the dependency tree and now my build needs luajit.
But I get the following compilation error.
Compilation error output:
make -j1 -C /home/feckert/workspace/openwrt/build_dir/target-mips_24kc_musl/LuaJIT-2.1.0-beta3 HOST_CC="gcc -O2 -I/home/feckert/workspace/openwrt/staging_dir/host/include -I/home/feckert/workspace/openwrt/staging_dir/hostpkg/include -I/home/feckert/workspace/openwrt/staging_dir/target-mips_24kc_musl/host/include -m32" CROSS="mips-openwrt-linux-musl-" DPREFIX=/home/feckert/workspace/openwrt/build_dir/target-mips_24kc_musl/LuaJIT-2.1.0-beta3/ipkg-install/usr PREFIX=/usr TARGET_SYS=Linux TARGET_CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/home/feckert/workspace/openwrt/build_dir/target-mips_24kc_musl/LuaJIT-2.1.0-beta3=LuaJIT-2.1.0-beta3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro
make[3]: Entering directory '/home/feckert/workspace/openwrt/build_dir/target-mips_24kc_musl/LuaJIT-2.1.0-beta3'
==== Building LuaJIT 2.1.0-beta3 ====
make -C src
make[4]: Entering directory '/home/feckert/workspace/openwrt/build_dir/target-mips_24kc_musl/LuaJIT-2.1.0-beta3/src'
HOSTCC host/minilua.o
In file included from /usr/include/limits.h:25:0,
from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h:168,
from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/syslimits.h:7,
from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h:34,
from host/minilua.c:33:
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
^
compilation terminated.
Makefile:691: recipe for target 'host/minilua.o' failed
make[4]: *** [host/minilua.o] Error 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OpenWrt package build invocation and the LuaJIT src/Makefile target at Makefile:691, then inspect host/minilua.c and reproduce the failure for lantiq_xrx200 or x86_geode. Done means the LuaJIT package compiles successfully for the affected targets without the missing sys/cdefs.h error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100