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

Help resolving a compile issue #1402

Open
andrewschott opened this issue Jul 13, 2022 · 1 comment
Open

Help resolving a compile issue #1402

andrewschott opened this issue Jul 13, 2022 · 1 comment

Comments

@andrewschott
Copy link

SLADE Version: (3.2.1)
Operating System: (Linux)

Issue Details:
I am working on making an RPM for both RHEL and Fedora. In mock I am getting on all platforms (so it should be an issue with my specfile) the same error which I cannot figure out:

[ 97%] Building CXX object src/CMakeFiles/slade.dir/Scripting/Export/Archive.cpp.o
In file included from /builddir/build/BUILD/SLADE-3.2.1/src/Scripting/Export/Archive.cpp:40:
/builddir/build/BUILD/SLADE-3.2.1/src/../thirdparty/sol/sol.hpp: In member function 'void sol::state_view::open_libraries(Args&& ...)':
/builddir/build/BUILD/SLADE-3.2.1/src/../thirdparty/sol/sol.hpp:24888:75: error: 'luaopen_bit32' was not declared in this scope; did you mean 'luaopen_utf8'?
24888 |                                                 luaL_requiref(L, "bit32", luaopen_bit32, 1);
      |                                                                           ^~~~~~~~~~~~~
      |                                                                           luaopen_utf8
make[2]: *** [src/CMakeFiles/slade.dir/build.make:4066: src/CMakeFiles/slade.dir/Scripting/Export/Archive.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:232: src/CMakeFiles/slade.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Any ideas?
Thanks,
Andrew.

@quotepilgrim
Copy link
Contributor

quotepilgrim commented Jul 22, 2022

I've recently built SLADE from source in Fedora. The issue you're having is being caused by the fact that there is no bit32 library for lua 5.3 and up because they support bitwise operations natively. There might be a better way to to this without messing with the source code, but the solution I found was to comment out the lines in /thirdparty/sol/sol.hpp that tell lua to use the bit32 library, and then SLADE compiled successfully. See image below.

2022-07-22-100709

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

2 participants