Newer MacOS has sufficiently new libExpat but is missing `expat_config.h`
alerque opened this issue · 3 comments
Trying to bump a luaexpeat dependency on something in Homebrew I ran into trouble moving to 1.5.x because for whatever reason even the newer versions of libExpat don't supply expat_config.h
as expected.
See Homebrew/homebrew-core#114831 (comment)
This may be something upstream in libExpat, or it could be just an expectation that luaexpat needs to adjust.
That file is needed. The settings in that file can change the ABI of the resuling compiled lib. So you need the specific version of the header file that was used to compile the binary.
On MacOS I typically do a brew info expat
to find the location (in my case /usr/local/Cellar/expat/2.4.8
), and then follow that up with the luarocks command like this;
luarocks install luaexpat EXPAT_DIR=/usr/local/Cellar/expat/2.4.8
Hello guys.
I'm facing the same error above, howerver, I'm running luarocks inside a CentOs Docker container.
This is commando I run
RUN luarocks install luaexpat 1.5.0
and this is the error
src/lxplib.c:12:26: fatal error: expat_config.h: No such file or directory
#include "expat_config.h"
^
compilation terminated.
Error: Build error: Failed compiling object src/lxplib.o
So, my question is: how to solve that inside a docker container?
@felipepazsquid Do you have the expat-dev or equivalent package installed on CentOS? Many distros split up library packages to have just the binaries with the header files in a separate package. You likely need the -dev or -devel or whatever RHEL is calling it these days for whatever provides libexpat.