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

fatal error: 'lua.hpp' file not found #1207

Open
mikeabrantes opened this issue Apr 29, 2023 · 4 comments
Open

fatal error: 'lua.hpp' file not found #1207

mikeabrantes opened this issue Apr 29, 2023 · 4 comments

Comments

@mikeabrantes
Copy link

mikeabrantes commented Apr 29, 2023

/otclient/src/framework/luaengine/luainterface.cpp:27:10: fatal error: 'lua.hpp' file not found
#include <lua.hpp>
         ^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/otclient.dir/src/framework/luaengine/luainterface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
make: *** [all] Error 2

This happen when executing the: "make -j$(sysctl -n hw.ncpu)"

macOS Monterey (12.4)

@sornii
Copy link

sornii commented May 27, 2024

I stumbled upon this problem as well. It seems lua was not installed. The docs suggest using brew but the lua formulae is disabled.

❯ brew install [email protected]
Error: [email protected] has been disabled because it is deprecated upstream!

We'd need to use a tap or install [email protected] by ourselves.

@diath
Copy link
Collaborator

diath commented May 28, 2024

You can brew install luajit instead and configure the project with -DLUAJIT=ON flag when running CMake.

@sornii
Copy link

sornii commented Jun 3, 2024

With @diath help and after brew install mesa now I'm stuck at

[100%] Linking CXX executable otclient
ld: warning: Linking with PIE, -image_base will be ignored
ld: warning: ignoring duplicate libraries: '-lSystem'
ld: warning: search path '/usr/X11R6/lib' not found
ld: library 'GL' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [otclient] Error 1
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
make: *** [all] Error 2

I'm using this to run the build

#!/bin/bash

PREFIX=$(brew --prefix)

cmake \
  -DUSE_STATIC_LIBS=OFF \
  -DLUAJIT=ON \
  -DBoost_INCLUDE_DIR=$PREFIX/Cellar/[email protected]/1.76.0_5/include/ \
  -DOPENSSL_INCLUDE_DIR=$PREFIX/Cellar/openssl@3/3.3.0/include/ \
  -DGMP_INCLUDE_DIR=$PREFIX/Cellar/gmp/6.3.0/include \
  -DGMP_LIBRARY=$PREFIX/Cellar/gmp/6.3.0/lib/libgmp.dylib \
  ../

make -j$((  $(sysctl -n hw.ncpu) - 1   ))

I'm using Sonoma btw.

@diath
Copy link
Collaborator

diath commented Jun 3, 2024

otclient doesn't support MacOS natively, you need XQuartz (X11 server for MacOS) installed (brew install xquartz). I'm not sure about GL though, I don't use a Mac.

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