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

luarocks install lua-resty-aws failed on Mac OS #91

Closed
AllenFang opened this issue Oct 31, 2023 · 5 comments
Closed

luarocks install lua-resty-aws failed on Mac OS #91

AllenFang opened this issue Oct 31, 2023 · 5 comments

Comments

@AllenFang
Copy link
Contributor

hello guys, I'm trying to install this package in my Mac OS(M2) but encountered an issue:

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: Failed installing dependency: https://luarocks.org/luaexpat-1.5.1-1.src.rock - Build error: Failed compiling object src/lxplib.o

it is probably a known issue from luaexpat ?! -> lunarmodules/luaexpat#32
but seems not solution yet.

Can someone help on this ? thank you 🙇

@windmgc
Copy link
Member

windmgc commented Oct 31, 2023

Do you already have expat installed on your Mac?

@windmgc
Copy link
Member

windmgc commented Oct 31, 2023

If you already have expat installed but still encounter this error, I think follow this comment lunarmodules/luaexpat#32 (comment) is the best solution

@AllenFang
Copy link
Contributor Author

AllenFang commented Oct 31, 2023

thanks for reminding @windmgc , it work when I manually install expat via homebrew and assign the EXPAT_DIR properly.

Let me issue a PR to update the readme 🙇 thank you ( I guess it's worthy to remind ppl for some mac users)

@Tieske
Copy link
Member

Tieske commented Oct 31, 2023

see lunarmodules/luaexpat#33

This is a problem with the expat installation on Mac, that header is required to be available, since settings in it will have an effect on the ABI of the compiled lib.

@AllenFang
Copy link
Contributor Author

AllenFang commented Nov 1, 2023

@Tieske Seems the PR is still pending, can I say your PR can fix this problem permanently?

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

No branches or pull requests

3 participants