-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
GCC cannot find lua headers on Ubuntu #5179
Comments
you can disable system package. or open a pr to improve to find lua from system in xmake-repo. add https://github.com/xmake-io/xmake-repo/blob/dev/packages/l/lua/xmake.lua |
Hi @waruqi . Thank you for your suggestions. I'd be glad to help improve xmake-repo, but I'd need some time to dive into the code. |
Xmake Version
v2.8.7+20240401
Operating System Version and Architecture
Ubuntu 24.04 LTS x86_64
Describe Bug
I am trying to compile a simple program inside an Ubuntu Docker container, but the compiler cannot locate Lua header files.
All necessary packages for building are installed inside the container, including lua5.1 and liblua5.1-dev. xmake is installed as instructed on the website. Here is the .Dockerfile contents. If you're not familiar with Docker, it's basically taking latest headless Ubuntu distribution as a base system and runs the commands between ALL_RUN ... ALL_RUN.
What I end up is a command line version of Ubuntu with xmake, gcc and lua5.1 installed.
Then I try to build this simple program:
I've attached the error message as a screenshot. Searching for
lua.hpp
gives one result in/usr/include/lua5.1/lua.hpp
.So I suspect this has something to do with the header being inside a version folder and that folder is not passed to the compiler as include directory.
Is it an xmake bug where it fails to provide proper include directories? Or is it a known Ubuntu+Lua feature, that requires special treatment? Btw, same thing happens on Debian. Am I doing something wrong here?
I'd appreciate any help.
Expected Behavior
The program is built correctly with
xmake -v luatest
Project Configuration
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: