s390x - attempt to call global 'require' (a nil value)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 252
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 3
Description
Issue
This issue occurs on Alpine (specifically, in a Docker container). When I try to run a file foo.lua with the following code in it:
local ffi = require('ffi')
ffi.cdef[[
typedef struct {
size_t total_size;
size_t off;
size_t len;
uint8_t * src;
uint8_t byte;
} count_eq_data;
]]
I get an error message like so:
/usr/bin/luajit: foo.lua:1: attempt to call global 'require' (a nil value)
How to reproduce
You will need Docker available, and the daemon running.
- Run
docker run --privileged multiarch/qemu-user-static --reset -p yes - Run
docker run --rm -i -t s390x/alpine:latestto start a shell in the emulated Alpine container. - Run
apk updatefollowed byapk add luajit. - Put the contents of the above Lua code into a file
foo.lua. - Attempt
luajit foo.lua, - Enjoy the error.
Expected behaviour
The script should execute (doing nothing), and return a success status code.
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the failure with the listed Docker commands on s390x Alpine, using foo.lua and the luajit entry point. Investigate why the global require is unavailable in this environment; done means the script runs successfully and returns a success status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100