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

chore(build) add define to build without expat_config.h #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Jan 4, 2023

Workaround for #32

When building the lib and the header expat_config.h is not being found, then the system is missing an important header. The settings in that header file can change the ABI of the compiled lib, hence the header is required to have.

Since on some systems/package managers the header is not included here's a workaround;

  1. ensure you have libExpat 2.4+
  2. try building the library
  3. try building while defining LUAEXPAT_SKIP_DTD_SUPPORT and XML_DTD (include DTD support)
  4. try building while defining LUAEXPAT_SKIP_DTD_SUPPORT (disable DTD support)

To build with LuaRocks you need to pull a trick since LuaRocks does not have a way to pass the defines via the command line. Instead you can override the CC setting and include the defines, like this:

luarocks install luaexpat CC="gcc -DLUAEXPAT_SKIP_DTD_SUPPORT -DXML_DTD"

@Tieske
Copy link
Member Author

Tieske commented Jan 26, 2023

@alerque can you give this workaround a try to see if it fixes your issue?

@Tieske
Copy link
Member Author

Tieske commented Jan 26, 2023

while unreleased, you'll have to checkout this branch and do the following from the repo;

luarocks make CC="gcc -DLUAEXPAT_SKIP_DTD_SUPPORT -DXML_DTD"

@alerque alerque self-assigned this Jan 26, 2023
@alerque
Copy link
Member

alerque commented Jan 26, 2023

I'll look into it. I think the issue surfaced in Homebrew builds for another project for me, I'll have to try to figure out how to replicate that.

@Tieske
Copy link
Member Author

Tieske commented Jan 26, 2023

@alerque not sure, but I think this one: Homebrew/homebrew-core#114831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants