lua-users home
lua-l archive

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

On 4 Dec 2022, at 20:03, Michael Magan <> wrote:


As a newbie to Lua, I am installing my first library with the result below. I'm not sure where to go from here. Running this on an M1 Macbook, and objective is to parse a large XML file. Hope someone can help.

~/projects/Lua/xml$ luarocks install luaexpat

luaexpat 1.5.1-1 depends on lua >= 5.1 (5.4-1 provided by VM)
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c src/lxplib.c -o src/lxplib.o -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -Isrc/
src/lxplib.c:12:10: fatal error: 'expat_config.h' file not found
#include "expat_config.h"
1 error generated.

Error: Build error: Failed compiling object src/lxplib.o

Here’s a link to the same issue; 

That file determines the compile time settings of the library. Based on those settings the exported symbols can change. So you really need that header file. 

You could check the version of libexpat, because really old versions will not have that header file. LuaExpat requires at least 2.4.0 of libexpat, though newer is better since there have been quite some CVE’s. See also the changelog;