ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.16k stars 504 forks source link

Build is broken with `cmake -DSOL2_BUILD_LUA=OFF -DSOL2_EXAMPLES=ON` #1392

Open dkogan opened 2 years ago

dkogan commented 2 years ago

Hi. I'm on Debian, trying to build sol2 v3.3.0. This happens:

$ mkdir build; cd build; cmake -DSOL2_BUILD_LUA=OFF -DSOL2_EXAMPLES=ON .. && make

....
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.4.so;/usr/lib/x86_64-linux-gnu/libm.so (found suitable exact version "5.4.3") 
-- sol2 testing enabled...
-- sol2 adding examples...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dima/debianstuff/sol2/build
[  0%] Building CXX object examples/CMakeFiles/sol2.examples.source.allocation_limit.dir/source/allocation_limit.cpp.o
remake[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libm.so dl', needed by 'x64/bin/sol2.examples.source.allocation_limit'.  Stop.
CMakeFiles/Makefile2:1135: *** [examples/CMakeFiles/sol2.examples.source.allocation_limit.dir/all] error 2

#0  examples/CMakeFiles/sol2.examples.source.allocation_limit.dir/all at /home/dima/debianstuff/sol2/build/CMakeFiles/Makefile2:1133
#1  examples/all at /home/dima/debianstuff/sol2/build/CMakeFiles/Makefile2:242
#2  all at /home/dima/debianstuff/sol2/build/CMakeFiles/Makefile2:66
Makefile:146: *** [all] error 2

#0  all at /home/dima/debianstuff/sol2/build/Makefile:144
#1  default_target at /home/dima/debianstuff/sol2/build/Makefile:5

Very reproducible, I'm guessing. Suggesions?

Thanks!