pytgcalls / ntgcalls

A Native Implementation of Telegram Calls in a seamless way.
https://pytgcalls.github.io
GNU Lesser General Public License v3.0
49 stars 10 forks source link

cannot Generate the CPP bindings #9

Closed MrAliSalehi closed 7 months ago

MrAliSalehi commented 7 months ago

Describe the bug as the docs says I ran this command:

python3 setup.py build_shared

in the root directory ofc, got this error:

[ 97%] Building CXX object ntgcalls/CMakeFiles/ntgcalls.dir/utils/dispatch_queue.cpp.o
[100%] Linking CXX shared library libntgcalls.so

/usr/bin/ld: cannot find -lX11: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [ntgcalls/CMakeFiles/ntgcalls.dir/build.make:293: ntgcalls/libntgcalls.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:176: ntgcalls/CMakeFiles/ntgcalls.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
  File "Projects/ntgcalls/setup.py", line 232, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "Projects/ntgcalls/setup.py", line 198, in run
    subprocess.run(
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '-j8']' returned non-zero exit status 2.

running on Debian latest build

MrAliSalehi commented 7 months ago

this issue was solved by installing x11:

sudo apt install libx11-dev

maybe mentioning dependencies in the documents somewhere could help future users, thanks

Laky-64 commented 7 months ago

@MrAliSalehi technically it is mentioned here:

https://pytgcalls.github.io/NTgCalls/Build%20Guide#Linux