bastibe / lunatic-python

A two-way bridge between Python and Lua
http://labix.org/lunatic-python
GNU Lesser General Public License v2.1
301 stars 82 forks source link

Error: PYTHON_LIBRT must be defined when building under Linux #78

Closed ennucore closed 4 years ago

ennucore commented 4 years ago

When I try to build lunatic-python from this git repository, I get error PYTHON_LIBRT must be defined when building under Linux:

$ make
python setup.py build
running build
running build_ext
building 'lua-python' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/usr/include/python3.8 -I/usr/include/python3.8 -c src/pythoninlua.c -o build/temp.linux-x86_64-3.8/src/pythoninlua.o -I/usr/include/lua5.3
src/pythoninlua.c: In function ‘luaopen_python’:
src/pythoninlua.c:639:5: error: #error PYTHON_LIBRT must be defined when building under Linux!
  639 | #   error PYTHON_LIBRT must be defined when building under Linux!
      |     ^~~~~
error: command 'gcc' failed with exit status 1
make: *** [Makefile:12: all] Error 1

Please, tell me, what this error is and how should I define PYTHON_LIBRT OS: Arch Linux Python version: 3.8 Lua version: 5.3

greatwolf commented 4 years ago

See issue #74.

ennucore commented 4 years ago

It worked, thanks