Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newer MacOS has sufficiently new libExpat but is missing expat_config.h #32

Open
alerque opened this issue Nov 7, 2022 · 3 comments
Open

Comments

@alerque
Copy link
Member

alerque commented Nov 7, 2022

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.

@Tieske
Copy link
Member

Tieske commented Nov 8, 2022

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

@felipepazsquid
Copy link

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?

@alerque
Copy link
Member Author

alerque commented Nov 11, 2022

@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.

@Tieske Tieske changed the title Newer MacOS has sufficiently new libExpat but not the expected header files Newer MacOS has sufficiently new libExpat but is missing expat_config.h Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants