nic-6443 opened a new pull request, #13824:
URL: https://github.com/apache/apisix/pull/13824

   ### Description
   
   `lua-rapidjson` compiles with `-march=native`, so `rapidjson.so` inherits 
the CPU features of whatever machine built it and dies with SIGILL on older 
ones (or on hypervisors that expose a baseline CPU model). 
`ci/install-lua-rapidjson.sh` worked around this by patching the flag out 
before building, but it only protects the paths that remember to call it — 
`make deps` and the luarocks CI runner do; the deb/rpm packages, the Docker 
images and a plain `luarocks install apisix` do not. 
`apache/apisix:3.17.0-debian` currently ships a `rapidjson.so` carrying 332 AVX 
instructions.
   
   This switches the dependency to `api7-lua-rapidjson`, which is the same 
0.7.2 source built with `-march=native` disabled (api7/lua-rapidjson#2). Every 
install path now gets a portable module through ordinary dependency resolution, 
so the patch script and its call sites are removed.
   
   The module name is unchanged, so `require("rapidjson")` keeps working; 
`cmake` and a C++ compiler are still build requirements.
   
   ### Which issue(s) this PR fixes
   
   N/A
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible
   
   Blocked on api7-lua-rapidjson 0.7.2-0 being published to luarocks; kept as a 
draft until then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to