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

[libtorrent] Update to 1.2.6 and add features #10686

Merged
merged 1 commit into from
Apr 27, 2020

Conversation

FranciscoPombal
Copy link
Contributor

@FranciscoPombal FranciscoPombal commented Apr 3, 2020

Update to 1.2.5 1.2.6

Drop add-executor_type.patch because it has since been included upstream (arvidn/libtorrent@48fa534).

@msftclas
Copy link

msftclas commented Apr 3, 2020

CLA assistant check
All CLA requirements met.

ports/libtorrent/portfile.cmake Outdated Show resolved Hide resolved
ports/libtorrent/portfile.cmake Show resolved Hide resolved
@NancyLi1013
Copy link
Contributor

Hi @FranciscoPombal
Thanks for this PR.
It seems that libtorrent doesn't support uwp.
Could you please add Supports: !uwp to the bottom of CONTROL file? And also add vcpkg_fail_port_install(ON_TARGET "uwp") to the top of portfile.cmake file?

@FranciscoPombal
Copy link
Contributor Author

@NancyLi1013

Hi @FranciscoPombal
Thanks for this PR.
It seems that libtorrent doesn't support uwp.
Could you please add Supports: !uwp to the bottom of CONTROL file? And also add vcpkg_fail_port_install(ON_TARGET "uwp") to the top of portfile.cmake file?

Thanks for the review, I've addressed all comments.

Also sorry for the last-minute change, but I managed to expose most of the features listed here: https://www.libtorrent.org/building.html#building-with-cmake

I looked at the opencv4 and boost-python ports for inspiration. Configuring the boost-python module name was a little tricky, since find_package(Python) did not seem to work, but the way it is now works just fine. Please let me know if there is a better way though.

@FranciscoPombal FranciscoPombal changed the title [libtorrent] Update to 1.2.5 [libtorrent] Update to 1.2.5 and add features Apr 7, 2020
@FranciscoPombal
Copy link
Contributor Author

The linux CI problem seems unrelated to my changes.

@FranciscoPombal
Copy link
Contributor Author

Rebased again on top of master as of writing, now all the checks passed.

ports/libtorrent/portfile.cmake Outdated Show resolved Hide resolved
@NancyLi1013
Copy link
Contributor

Need to test features.

@FranciscoPombal
Copy link
Contributor Author

Small note: I changed the regex capture group of the minor python version to from ([0-9]) to ([0-9]+) so that the code still works in case it's still around when Python >= 3.10 is used.

@NancyLi1013
Copy link
Contributor

@FranciscoPombal
Thanks for your reminder.
As for feature python, it failed due to this:
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
It seems that we need to set python.exe path for feature python.

In addition, python version is not compatible with that supported in vcpkg.

As for feature tools and examples, they failed due to this:

libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertOpenStore referenced in function capi_open_store
libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertCloseStore referenced in function capi_find_key
libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertEnumCertificatesInStore referenced in function capi_find_cert
libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertFindCertificateInStore referenced in function capi_find_cert
libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertDuplicateCertificateContext referenced in function capi_load_ssl_client_cert
libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertFreeCertificateContext referenced in function capi_find_key
libcrypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp_CertGetCertificateContextProperty referenced in function capi_cert_get_fname
tools\session_log_alerts.exe : fatal error LNK1120: 7 unresolved externals

crypt32.lib seems not to be added.

Could you please try to check them again?

@FranciscoPombal
Copy link
Contributor Author

FranciscoPombal commented Apr 13, 2020

@NancyLi1013
Hi,
Thanks for the feedback. I tested everything on a Linux system building the x64-linux triplet, and it works fine, but I had not tested building on Windows.

Following your comment, on a Windows system, I tested the x86-windows, x64-windows, and x64-windows-static triplets, and the results were a mixed bag.

  • The python feature fails for all triplets
  • For the x86-windows and x64-windows triplets, the tools and examples features build just fine, but for the x64-windows-static triplet, the build fails with the "missing crypt32.lib" error you mentioned.

As far as the crypt32.lib problem on x64-windows-static with the tools and examples features is concerned, I managed to solve it by patching the build scripts (see the relevant commit).

However, I have not managed to fix the python feature problem; with the following patch,

diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake
 index a57341c7b..06c5ed3a8 100644
 --- a/ports/libtorrent/portfile.cmake
 +++ b/ports/libtorrent/portfile.cmake
 @@ -22,11 +22,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
  file(GLOB BOOST_PYTHON_LIB "${CURRENT_INSTALLED_DIR}/lib/libboost_python.*")
  string(REGEX REPLACE ".*_(python)([0-9]).([0-9]+).*" "\\1\\2\\3" BOOST_PYTHON_MODULE "${BOOST_PYTHON_LIB}")
  
 +vcpkg_find_acquire_program(PYTHON3)
 +
  vcpkg_configure_cmake(
      SOURCE_PATH ${SOURCE_PATH}
      PREFER_NINJA # Disable this option if project cannot be built with Ninja
      OPTIONS
          ${FEATURE_OPTIONS}
 +        -DPYTHON_EXECUTABLE=${PYTHON3}
          -Dboost-python-module-name=${BOOST_PYTHON_MODULE}
  )

I eventually get this error,

[176/178] cmd.exe /C "cd . && C:\Users\User\Documents\experimental\vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=bindings\python\CMakeFiles\python-libtorrent.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe  bindings\python\CMakeFiles\python-libtorrent.dir\src\module.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\sha1_hash.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\converters.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\create_torrent.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\fingerprint.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\utility.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\session.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\entry.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_info.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\string.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_handle.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_status.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\session_settings.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\version.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\alert.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\datetime.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\peer_info.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\ip_filter.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\magnet_uri.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\error_code.cpp.obj  /out:bindings\python\libtorrent.cp37-win_amd64.pyd /implib:bindings\python\libtorrent.lib /pdb:bindings\python\libtorrent.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  torrent-rasterbar.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\python37_d.lib wsock32.lib ws2_32.lib Iphlpapi.lib dbghelp.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\libssl.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\libcrypto.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\boost_system-vc140-mt-gd.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\boost_date_time-vc140-mt-gd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
FAILED: bindings/python/libtorrent.cp37-win_amd64.pyd 
cmd.exe /C "cd . && C:\Users\User\Documents\experimental\vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=bindings\python\CMakeFiles\python-libtorrent.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe  bindings\python\CMakeFiles\python-libtorrent.dir\src\module.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\sha1_hash.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\converters.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\create_torrent.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\fingerprint.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\utility.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\session.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\entry.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_info.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\string.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_handle.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_status.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\session_settings.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\version.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\alert.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\datetime.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\peer_info.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\ip_filter.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\magnet_uri.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\error_code.cpp.obj  /out:bindings\python\libtorrent.cp37-win_amd64.pyd /implib:bindings\python\libtorrent.lib /pdb:bindings\python\libtorrent.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  torrent-rasterbar.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\python37_d.lib wsock32.lib ws2_32.lib Iphlpapi.lib dbghelp.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\libssl.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\libcrypto.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\boost_system-vc140-mt-gd.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\boost_date_time-vc140-mt-gd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe bindings\python\CMakeFiles\python-libtorrent.dir\src\module.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\sha1_hash.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\converters.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\create_torrent.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\fingerprint.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\utility.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\session.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\entry.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_info.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\string.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_handle.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\torrent_status.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\session_settings.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\version.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\alert.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\datetime.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\peer_info.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\ip_filter.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\magnet_uri.cpp.obj bindings\python\CMakeFiles\python-libtorrent.dir\src\error_code.cpp.obj /out:bindings\python\libtorrent.cp37-win_amd64.pyd /implib:bindings\python\libtorrent.lib /pdb:bindings\python\libtorrent.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL torrent-rasterbar.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\python37_d.lib wsock32.lib ws2_32.lib Iphlpapi.lib dbghelp.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\libssl.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\libcrypto.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\boost_system-vc140-mt-gd.lib C:\Users\User\Documents\experimental\vcpkg\installed\x64-windows-static\debug\lib\boost_date_time-vc140-mt-gd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:bindings\python\CMakeFiles\python-libtorrent.dir/intermediate.manifest bindings\python\CMakeFiles\python-libtorrent.dir/manifest.res" failed (exit code 1104) with the following output:
Microsoft (R) Incremental Linker Version 14.25.28612.0
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1104: cannot open file 'python37.lib'
ninja: build stopped: subcommand failed.

even though the libs seem to be detected just fine in the configuration step:

-- Found PythonInterp: C:/Users/User/Documents/experimental/vcpkg/downloads/tools/python/python-3.7.3-x64/python.exe (found version "3.7.3") 
-- Testing found python version. Requested: 3.5;3.6;3.7;3.8, found: 3.7
-- Found PythonLibs: optimized;C:/Users/User/Documents/experimental/vcpkg/installed/x64-windows-static/lib/python37.lib;debug;C:/Users/User/Documents/experimental/vcpkg/installed/x64-windows-static/debug/lib/python37_d.lib (found version "3.7.3") 

Any suggestions? Or is it possible/acceptable to blacklist the python feature on Windows, for now?

Note: to new commits are separate for now to facilitate the review of each change, later I will squash them
Note2: I noticed that with or without vcpkg_find_acquire_program(PYTHON3), the build on Linux defaults to using the system's python installation; is this acceptable?

@FranciscoPombal
Copy link
Contributor Author

@NancyLi1013 I replaced the previous patch that solved the crypt32 linking problem with a better one that will actually be included upstream: arvidn/libtorrent#4547 (along with some small accompanying changes to the portfile).
Additionally, the python versions patch has been merged upstream: arvidn/libtorrent#4546.

This means that when 1.2.6 is released and this port is updated to that versions, both patches here can be dropped.

In the meantime, in my testing, I managed successful builds of all features with all 3 of the official Windows triplets, plus the x64-windows-static-md community triplet.

@gtumanyan
Copy link

1.2.6 released

@FranciscoPombal
Copy link
Contributor Author

@gtumanyan yes, I am aware of this. I will update the PR once 1.2.6 is officially tagged.

@NancyLi1013 might as well wait for 1.2.6. Requires no changes other than dropping both of the Windows patches, which have been merged upstream (arvidn/libtorrent@ade8ed3 and arvidn/libtorrent@eb50e9e)

@FranciscoPombal FranciscoPombal changed the title [libtorrent] Update to 1.2.5 and add features [libtorrent] Update to 1.2.6 and add features Apr 19, 2020
@FranciscoPombal
Copy link
Contributor Author

@gtumanyan @NancyLi1013
Updated to 1.2.6

@JackBoosY
Copy link
Contributor

The otl regressions(#10922) are not related with this PR.

@NancyLi1013
Copy link
Contributor

@FranciscoPombal
Could you please help confirm if python can work in current state?

@FranciscoPombal
Copy link
Contributor Author

@NancyLi1013 The python feature is in the same state as mentioned in #10686 (comment):

  • It works on Linux
  • It might work on macOS (I can't test it)
  • Does not work on Windows; the install is setup to fail early if a attempting to use this feature on Windows. I think this should be addressed in another PR.

@NancyLi1013
Copy link
Contributor

@FranciscoPombal
Thanks for your update.

All features have passed on the following triplets:

  • x86-windows
  • x64-windows
  • x64-windows-static
  • x64-linux

Note: For Python feature currently failed on Windows.
I also cannot build python successfully on Ubuntu 18.04.
The errors like this:

/usr/bin/ld: /home/vruil/10686/vcpkg/installed/x64-linux/lib/libpython3.7m.a(abstract.o): relocation R_X86_64_PC32 against symbol `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: relocation R_X86_64_PC32 against symbol `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Can you build python feature on your Linux machine?

@FranciscoPombal
Copy link
Contributor Author

@NancyLi1013

@FranciscoPombal
Thanks for your update.

All features have passed on the following triplets:

* x86-windows

* x64-windows

* x64-windows-static

* x64-linux

👍. Additionally, as mentioned, it should also work on x64-windows-static-md.

Note: For Python feature currently failed on Windows.

Yes, that is expected.

I also cannot build python successfully on Ubuntu 18.04.
The errors like this:

/usr/bin/ld: /home/vruil/10686/vcpkg/installed/x64-linux/lib/libpython3.7m.a(abstract.o): relocation R_X86_64_PC32 against symbol `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: relocation R_X86_64_PC32 against symbol `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Can you build python feature on your Linux machine?

That's strange, I am able to build the python feature on my Ubuntu 18.04 (amd64) machine without problems. I am using the standard python 3 package from the Ubuntu repositories (https://packages.ubuntu.com/bionic-updates/python3).

@FranciscoPombal
Copy link
Contributor Author

@NancyLi1013 I think you might need the python3-dev package which does not come installed by default. Can you confirm this please? If so, is there a user-friendly way of informing users they need this package installed for the feature to work?

@NancyLi1013
Copy link
Contributor

The errors like this:

/usr/bin/ld: /home/vruil/10686/vcpkg/installed/x64-linux/lib/libpython3.7m.a(abstract.o): relocation R_X86_64_PC32 against symbol `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Whether I install python3-dev or not, I always encounter this problem.

@FranciscoPombal
Copy link
Contributor Author

FranciscoPombal commented Apr 23, 2020

@NancyLi1013 You're right. I managed to reproduce the issue on a clean Ubuntu 18.04 install. It was working on my daily driver system because of a few fortunate but misleading circumstances.

To address this, I have made a new patch for the cmake script associated with the feature. It is worth noting that it requires installing python3-dev and python3-setuptools in the system beforehand for the build to succeed. Furthermore, while the build will succeed, this patch is still likely "wrong", because the library linked against will be the system python library, not the one provided by vcpkg. If it's ok with you, I'd like to handle this in a separate PR (actually, I'll work with upstream to improve the python bindings cmake script first). In the meantime, at least the build succeeds.

Finally, because of a comment I saw in the cmake build script, I have added a dependency on libtorrent[deprfun] for the python feature:
# Bindings module uses deprecated libtorrent features, thus we disable these warnings

@NancyLi1013
Copy link
Contributor

@FranciscoPombal
I update to the latest commit. After installing python3-tools and rebuild.
There are still some errors:

/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(grammar1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(myreadline.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(parsetok.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(tokenizer.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(accu.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(bytes_methods.o): relocation R_X86_64_32S against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(cellobject.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(classobject.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(codeobject.o): relocation R_X86_64_32S against symbol `PyCode_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(complexobject.o): relocation R_X86_64_32S against symbol `PyComplex_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(descrobject.o): relocation R_X86_64_32 against symbol `PyClassMethodDescr_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(enumobject.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(genobject.o): relocation R_X86_64_32 against symbol `PyCoro_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(fileobject.o): relocation R_X86_64_32 against symbol `PyStdPrinter_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(frameobject.o): relocation R_X86_64_32S against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(odictobject.o): relocation R_X86_64_32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(namespaceobject.o): relocation R_X86_64_32 against symbol `_PyNamespace_Type' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(Python-ast.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(ast.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(getcopyright.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(getplatform.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(getversion.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(mystrtoul.o): relocation R_X86_64_32S against symbol `_Py_ctype_table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(structmember.o): relocation R_X86_64_32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(blake2b_impl.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(parser.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(getcompiler.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@FranciscoPombal
Copy link
Contributor Author

@NancyLi1013

I've fixed the patch. It should build correctly now.

@NancyLi1013
Copy link
Contributor

@FranciscoPombal
Thanks for your further work for this issue.
It has worked on my local now.

@NancyLi1013 NancyLi1013 added info:reviewed Pull Request changes follow basic guidelines and removed requires:testing Needs tests added before merging labels Apr 26, 2020
@ras0219-msft ras0219-msft merged commit 422fb5d into microsoft:master Apr 27, 2020
@ras0219-msft
Copy link
Contributor

LGTM, thanks for the PR!

@FranciscoPombal FranciscoPombal deleted the update-libtorrent branch April 27, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants