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

building for Python 2 #4560

Closed
beroal opened this issue Apr 19, 2020 · 5 comments
Closed

building for Python 2 #4560

beroal opened this issue Apr 19, 2020 · 5 comments

Comments

@beroal
Copy link

beroal commented Apr 19, 2020

Please provide the following information

libtorrent version (or branch): 1.2.5 RC_1_2

platform/architecture: ArchLinux 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19 +0000 x86_64 GNU/Linux

compiler and compiler version: g++ (Arch Linux 9.3.0-1) 9.3.0, cmake 3.17.1

I am trying to build the library with the Python binding for Python 2 with the following command.

  cmake \f
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -Dpython-bindings=ON \
    -Dboost-python-module-name="python-2.7" \
    "../libtorrent"
  make

Assigning python2 or python-2.7 to boost-python-module-name causes an error like this.

    libtorrent ... Skipped
Reset branch 'makepkg'
CMake Error at /usr/lib64/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package):
  Could not find a package configuration file provided by "boost_python-2.7"
  (requested version 1.72.0) with any of the following names:

    boost_python-2.7Config.cmake
    boost_python-2.7-config.cmake

  Add the installation prefix of "boost_python-2.7" to CMAKE_PREFIX_PATH or
  set "boost_python-2.7_DIR" to a directory containing one of the above
  files.  If "boost_python-2.7" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/lib64/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
  /usr/share/cmake-3.17/Modules/FindBoost.cmake:444 (find_package)
  bindings/python/CMakeLists.txt:56 (find_package)


==> ERROR: A failure occurred in build().

Probably, I misunderstood bindings/python/CMakeLists.txt. If python is assigned to boost-python-module-name, import libtorrent in Python 2 fails with

ImportError: /usr/lib/libboost_python38.so.1.72.0: undefined symbol: PyUnicode_InternFromString
@wiserain
Copy link

You may want to try the module name as python27.

@beroal
Copy link
Author

beroal commented Apr 27, 2020

Now it builds the library, but for Python 3.8.

Building code:

  echo "Debug python version: $_boost"

  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -Dpython-bindings=ON \
    -Dboost-python-module-name="$_boost" \
    "../libtorrent"
  make

Log:

Debug python version: python27
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Compiler default is C++14
-- Building in C++14 mode
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- Found Iconv: /usr/lib/libc.so  
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1f")  
-- Found Boost: /usr/lib64/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0") found components: system 
-- Found PythonInterp: /usr/bin/python (found version "3.8.2") 
-- Found PythonLibs: /usr/lib/libpython3.8.so (found version "3.8.2") 
-- Found Boost: /usr/lib64/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0") found components: python27 
-- Performing Test _WNO_DEPRECATED_DECLARATIONS
-- Performing Test _WNO_DEPRECATED_DECLARATIONS - Success
-- Python site packages: lib/python3.8/site-packages
-- Python extension suffix: .cpython-38-x86_64-linux-gnu.so
-- The following features have been enabled:

 * BUILD_SHARED_LIBS, build libtorrent as a shared library
 * python-bindings, build python bindings
 * dht, enable support for Mainline DHT
 * deprecated-functions, enable deprecated functions for backwards compatibility
 * encryption, Enables encryption in libtorrent
 * exceptions, build with exception support
 * extensions, Enables protocol extensions
 * i2p, build with I2P support
 * logging, build with logging
 * mutable-torrents, Enables mutable torrent support
 * streaming, Enables support for piece deadline

-- The following RECOMMENDED packages have been found:

 * Iconv, GNU encoding conversion library, <https://www.gnu.org/software/libiconv/>
   Convert strings between various encodings
 * OpenSSL, Full-strength general purpose cryptography library, <https://www.openssl.org/>
   Provides HTTPS support to libtorrent

-- The following REQUIRED packages have been found:

 * Threads
 * boost_system (required version == 1.72.0)
 * PythonInterp
 * PythonLibs
 * boost_headers (required version == 1.72.0)
 * boost_python (required version == 1.72.0)
 * Boost

-- The following features have been disabled:

 * static_runtime, build libtorrent with static runtime
 * build_tests, build tests
 * build_examples, build examples
 * build_tools, build tools

-- Configuring done
-- Generating done
-- Build files have been written to: /var/abs/local/libtorrent-rasterbar-1_2-git/src/py2
Scanning dependencies of target torrent-rasterbar
[  0%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/web_connection_base.cpp.o
[  1%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/alert.cpp.o
[  1%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/announce_entry.cpp.o
[  2%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/alert_manager.cpp.o
[  3%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/assert.cpp.o
[  3%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bandwidth_limit.cpp.o
[  4%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bandwidth_manager.cpp.o
[  4%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bandwidth_queue_entry.cpp.o
[  5%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bdecode.cpp.o
[  5%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bitfield.cpp.o
[  6%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/block_cache.cpp.o
[  7%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bloom_filter.cpp.o
[  7%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/chained_buffer.cpp.o
[  8%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/choker.cpp.o
[  8%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/close_reason.cpp.o
[  9%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/cpuid.cpp.o
[  9%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o
[ 10%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/create_torrent.cpp.o
[ 11%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_buffer_holder.cpp.o
[ 11%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/entry.cpp.o
[ 12%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/error_code.cpp.o
[ 12%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/file_storage.cpp.o
[ 13%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/file_progress.cpp.o
[ 13%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/generate_peer_id.cpp.o
[ 14%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/lazy_bdecode.cpp.o
[ 14%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/escape_string.cpp.o
[ 15%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/string_util.cpp.o
[ 16%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/file.cpp.o
[ 16%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/path.cpp.o
[ 17%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/fingerprint.cpp.o
[ 17%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/gzip.cpp.o
[ 18%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/hasher.cpp.o
[ 18%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/sha1.cpp.o
[ 19%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/hex.cpp.o
[ 20%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/http_connection.cpp.o
[ 20%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/http_stream.cpp.o
[ 21%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/http_parser.cpp.o
[ 21%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/i2p_stream.cpp.o
[ 22%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/identify_client.cpp.o
[ 22%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ip_filter.cpp.o
[ 23%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ip_notifier.cpp.o
[ 23%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ip_voter.cpp.o
[ 24%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/listen_socket_handle.cpp.o
[ 25%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/performance_counters.cpp.o
[ 25%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/peer_class.cpp.o
[ 26%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/peer_class_set.cpp.o
[ 26%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/peer_connection.cpp.o
[ 27%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bt_peer_connection.cpp.o
[ 27%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/web_peer_connection.cpp.o
[ 28%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/http_seed_connection.cpp.o
[ 29%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/peer_connection_handle.cpp.o
[ 29%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/instantiate_connection.cpp.o
[ 30%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/merkle.cpp.o
[ 30%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/natpmp.cpp.o
[ 31%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/openssl.cpp.o
[ 31%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/part_file.cpp.o
[ 32%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/packet_buffer.cpp.o
[ 32%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/piece_picker.cpp.o
[ 33%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/platform_util.cpp.o
[ 34%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/proxy_base.cpp.o
[ 34%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/peer_list.cpp.o
[ 35%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/puff.cpp.o
[ 35%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/random.cpp.o
[ 36%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/receive_buffer.cpp.o
[ 36%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/read_resume_data.cpp.o
[ 37%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/write_resume_data.cpp.o
[ 38%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/request_blocks.cpp.o
[ 38%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/resolve_links.cpp.o
[ 39%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/resolver.cpp.o
[ 39%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/session.cpp.o
[ 40%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/session_call.cpp.o
[ 40%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/session_handle.cpp.o
[ 41%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/session_impl.cpp.o
[ 41%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/session_settings.cpp.o
[ 42%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/proxy_settings.cpp.o
[ 43%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/session_stats.cpp.o
[ 43%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/settings_pack.cpp.o
[ 44%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/sha1_hash.cpp.o
[ 44%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/socket_io.cpp.o
[ 45%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/socket_type.cpp.o
[ 45%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/socks5_stream.cpp.o
[ 46%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/stat.cpp.o
[ 46%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/stat_cache.cpp.o
[ 47%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/storage.cpp.o
[ 48%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/storage_piece_set.cpp.o
[ 48%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/storage_utils.cpp.o
[ 49%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/time.cpp.o
[ 49%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/timestamp_history.cpp.o
[ 50%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/torrent.cpp.o
[ 50%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/torrent_handle.cpp.o
[ 51%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/torrent_info.cpp.o
[ 52%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/torrent_peer.cpp.o
[ 52%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/torrent_peer_allocator.cpp.o
[ 53%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/torrent_status.cpp.o
[ 53%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/tracker_manager.cpp.o
[ 54%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/http_tracker_connection.cpp.o
[ 54%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/utf8.cpp.o
[ 55%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/udp_tracker_connection.cpp.o
[ 55%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/udp_socket.cpp.o
[ 56%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/upnp.cpp.o
[ 57%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/utp_socket_manager.cpp.o
[ 57%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/utp_stream.cpp.o
[ 58%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/file_pool.cpp.o
[ 58%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/lsd.cpp.o
[ 59%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_io_job.cpp.o
[ 59%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_job_fence.cpp.o
[ 60%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_job_pool.cpp.o
[ 61%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_buffer_pool.cpp.o
[ 61%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_io_thread.cpp.o
[ 62%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/disk_io_thread_pool.cpp.o
[ 62%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/enum_net.cpp.o
[ 63%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/broadcast_socket.cpp.o
[ 63%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/magnet_uri.cpp.o
[ 64%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/parse_url.cpp.o
[ 64%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ConvertUTF.cpp.o
[ 65%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/xml_parse.cpp.o
[ 66%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/version.cpp.o
[ 66%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ffs.cpp.o
[ 67%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/add_torrent_params.cpp.o
[ 67%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/peer_info.cpp.o
[ 68%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/stack_allocator.cpp.o
[ 68%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ut_pex.cpp.o
[ 69%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/ut_metadata.cpp.o
[ 70%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/smart_ban.cpp.o
[ 70%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/pe_crypto.cpp.o
[ 71%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/dht_state.cpp.o
[ 71%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/dht_storage.cpp.o
[ 72%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/dos_blocker.cpp.o
[ 72%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/dht_tracker.cpp.o
[ 73%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/msg.cpp.o
[ 73%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/node.cpp.o
[ 74%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/node_entry.cpp.o
[ 75%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/refresh.cpp.o
[ 75%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/rpc_manager.cpp.o
[ 76%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/find_data.cpp.o
[ 76%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/put_data.cpp.o
[ 77%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/node_id.cpp.o
[ 77%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/routing_table.cpp.o
[ 78%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/traversal_algorithm.cpp.o
[ 79%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/item.cpp.o
[ 79%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/get_peers.cpp.o
[ 80%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/get_item.cpp.o
[ 80%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/ed25519.cpp.o
[ 81%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/sample_infohashes.cpp.o
[ 81%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/kademlia/dht_settings.cpp.o
[ 82%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/add_scalar.cpp.o
[ 82%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/fe.cpp.o
[ 83%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/ge.cpp.o
[ 84%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/key_exchange.cpp.o
[ 84%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/keypair.cpp.o
[ 85%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/sc.cpp.o
[ 85%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/sign.cpp.o
[ 86%] Building CXX object CMakeFiles/torrent-rasterbar.dir/ed25519/src/verify.cpp.o
[ 86%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/hasher512.cpp.o
[ 87%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/sha512.cpp.o
[ 88%] Linking CXX shared library libtorrent-rasterbar.so
[ 88%] Built target torrent-rasterbar
Scanning dependencies of target python-libtorrent
[ 89%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/sha1_hash.cpp.o
[ 90%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/create_torrent.cpp.o
[ 90%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/module.cpp.o
[ 90%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/converters.cpp.o
[ 90%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/fingerprint.cpp.o
[ 91%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/utility.cpp.o
[ 91%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/session.cpp.o
[ 92%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/entry.cpp.o
[ 93%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/torrent_info.cpp.o
[ 93%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/string.cpp.o
[ 94%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/torrent_handle.cpp.o
[ 94%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/torrent_status.cpp.o
[ 95%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/session_settings.cpp.o
[ 95%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/version.cpp.o
[ 96%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/alert.cpp.o
[ 96%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/datetime.cpp.o
[ 97%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/peer_info.cpp.o
[ 98%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/ip_filter.cpp.o
[ 98%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/magnet_uri.cpp.o
[ 99%] Building CXX object bindings/python/CMakeFiles/python-libtorrent.dir/src/error_code.cpp.o
[ 99%] Linking CXX shared module libtorrent.cpython-38-x86_64-linux-gnu.so
[ 99%] Built target python-libtorrent
Scanning dependencies of target python_bindings
[100%] Generating timestamp
running build
running egg_info
creating /var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info
writing /var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info/PKG-INFO
writing dependency_links to /var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info/dependency_links.txt
writing top-level names to /var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info/top_level.txt
writing manifest file '/var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info/SOURCES.txt'
reading manifest file '/var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info/SOURCES.txt'
writing manifest file '/var/abs/local/libtorrent-rasterbar-1_2-git/src/py2/bindings/python/libtorrent.egg-info/SOURCES.txt'
[100%] Built target python_bindings

@FranciscoPombal
Copy link
Contributor

Current CMake script is using the deprecated PythonInterp and PythonLibs scripts. For what it's worth, here is an attempt at improving it, though supporting python 2 is not a priority: #4574

@wiserain
Copy link

Not sure how and what it is now, but it was okay with 1.2.5 and python2.7. Here is cmake command I used to build it.

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -Dpython-bindings=ON \
    -Dboost-python-module-name="python27" \
    -DPython_ADDITIONAL_VERSIONS="2.7" \
    "../"
  make

@beroal
Copy link
Author

beroal commented Apr 27, 2020

    -DPython_ADDITIONAL_VERSIONS="2.7"

Thank you! I did not provide this variable to cmake. Now it builds.

@beroal beroal closed this as completed Apr 27, 2020
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