You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Hi @waruqi . Thank you for your suggestions.
Disabling system package is not desirable in my case as my goal is to test code compilation using system Lua distributions.
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: