openwrt / openwrt/packages

luajit2: cross-build on macOS does not work

Open
#27,014 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Package Name

luajit2

Maintainer

@jmarcet

OpenWrt Version

snapshot

OpenWrt Target/Subtarget

mvebu/cortex-a9

Steps to Reproduce
  1. Have macOS
  2. Try to compile luajit2
Actual Behaviour

Right now, it fails:

==== Building LuaJIT 2.1 ====
make -C src
make[4]: Entering directory '/Volumes/OpenWrt/omnia-hbd/build/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/luajit2-2.1.2024.08.15/src'
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
VERSION   luajit.h
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
Error: pointer size mismatch in cross-build.
Try: make HOST_CC="gcc -m32" CROSS=...

make[4]: *** [Makefile:695: lj_vm.S] Error 1

maybe: @httpstorm can help with this one. :-)

Confirmation Checklist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the luajit2 build in the package repository and the src/Makefile rule reported at line 695. Reproduce the cross-build on macOS, trace the pointer-size mismatch, and verify that luajit2 builds successfully for the mvebu/cortex-a9 target.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.