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: add version 2.0.8, support conan v2, update dependencies #15415

Merged
merged 4 commits into from
Feb 1, 2023

Conversation

toge
Copy link
Contributor

@toge toge commented Jan 23, 2023

Specify library name and version: libtorrent/*

  • add version 2.0.8
  • support conan v2
  • update dependencies
  • remove unused patches

notice: libtorrent 2.0.{0..6} can't use recent boost


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit ef6dfc0
libtorrent/1.2.3
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libtorrent-rasterbar.so' links to system library 'm' but it is not in cpp_info.system_libs.
libtorrent/2.0.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libtorrent-rasterbar.so' links to system library 'm' but it is not in cpp_info.system_libs.
libtorrent/2.0.8
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libtorrent-rasterbar.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\torrent-rasterbar.dll' links to system library 'mswsock' but it is not in cpp_info.system_libs.

jwillikers
jwillikers previously approved these changes Jan 26, 2023
uilianries
uilianries previously approved these changes Jan 31, 2023
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


def requirements(self):
if tools.Version(self.version) < "2.0.0":
self.requires("boost/1.79.0")
# libtorrent 2.0.x [x<=6] have issue for recent boost https://github.com/arvidn/libtorrent/discussions/6757
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for detailing it!

"find_public_dependency(Iconv)",
replace)
if self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libstdc++":
# https://github.com/arvidn/libtorrent/issues/3557
tools.replace_in_file(os.path.join(self._source_subfolder, "include", "libtorrent", "file_storage.hpp"),
replace_in_file(self, os.path.join(self.source_folder, "include", "libtorrent", "file_storage.hpp"),
"file_entry& operator=(file_entry&&) & noexcept = default;",
"file_entry& operator=(file_entry&&) & = default;")

def build(self):
self._validate_dependency_graph()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to move to validate() now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SpaceIm
I combine _validate_dependency_graph() to validate().
Thanks.

Comment on lines 3 to 8
from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc, msvc_runtime_flag
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

many unused imports according to linter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.


def generate(self):
tc = CMakeToolchain(self)
tc.variables["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tc.variables["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared
tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

tc.variables["python-bindings"] = False
tc.variables["python-bindings"] = False
if is_msvc(self):
tc.variables["static_runtime"] = "MT" in msvc_runtime_flag(self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tc.variables["static_runtime"] = "MT" in msvc_runtime_flag(self)
tc.variables["static_runtime"] = is_msvc_static_runtime(self)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
Thanks for your review a lot!

@toge toge dismissed stale reviews from uilianries and jwillikers via 6c119da January 31, 2023 16:36
toge and others added 2 commits February 1, 2023 01:36
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 4 (607c732ef94fa8302a7e671abc8183918c373ae9):

  • libtorrent/2.0.1@:
    All packages built successfully! (All logs)

  • libtorrent/1.2.3@:
    All packages built successfully! (All logs)

  • libtorrent/2.0.8@:
    All packages built successfully! (All logs)


Conan v2 pipeline (informative, not required for merge) ❌

Note: Conan v2 builds are informative and they are not required for the PR to be merged.

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Failure in build 4 (607c732ef94fa8302a7e671abc8183918c373ae9):

  • libtorrent/1.2.3@:
    Didn't run or was cancelled before finishing

  • libtorrent/2.0.8@:
    Didn't run or was cancelled before finishing

  • libtorrent/2.0.1@:
    CI failed to create some packages (All logs)

    Logs for packageID 42c013a1612d9d0e9172b15a37b156b282e56bb6:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    no_cms=False
    no_comp=False
    no_ct=False
    no_deprecated=False
    no_des=False
    no_dgram=False
    no_dh=False
    no_dsa=False
    no_dso=False
    no_ec=False
    no_ecdh=False
    no_ecdsa=False
    no_engine=False
    no_filenames=False
    no_gost=False
    no_hmac=False
    no_idea=False
    no_md4=False
    no_md5=False
    no_mdc2=False
    no_ocsp=False
    no_pinshared=False
    no_rc2=False
    no_rfc3779=False
    no_rmd160=False
    no_rsa=False
    no_seed=False
    no_sha=False
    no_sm2=False
    no_sm3=False
    no_sm4=False
    no_sock=False
    no_srp=False
    no_srtp=False
    no_sse2=False
    no_ssl=False
    no_ssl3=False
    no_stdio=False
    no_tests=False
    no_threads=False
    no_tls1=False
    no_ts=False
    no_whirlpool=False
    shared=False
    
    ERROR: Missing prebuilt package for 'boost/1.76.0', 'openssl/1.1.1s'
    Use 'conan list packages openssl/1.1.1s --format=html -r=remote > table.html' and open the table.html file to see available packages
    Or try to build locally from sources with '--build=boost/1.76.0 --build=openssl/1.1.1s'
    
    More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

Hooks produced the following warnings for commit 607c732
libtorrent/2.0.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libtorrent-rasterbar.so' links to system library 'm' but it is not in cpp_info.system_libs.
libtorrent/1.2.3
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libtorrent-rasterbar.so' links to system library 'm' but it is not in cpp_info.system_libs.
libtorrent/2.0.8
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libtorrent-rasterbar.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\torrent-rasterbar.dll' links to system library 'mswsock' but it is not in cpp_info.system_libs.

@conan-center-bot conan-center-bot merged commit 7def4a5 into conan-io:master Feb 1, 2023
StellaSmith pushed a commit to StellaSmith/conan-center-index that referenced this pull request Feb 2, 2023
…ate dependencies

* libtorrent: add version 2.0.8, support conan v2, update dependencies

* drop support gcc5, update cmake version

* use dependencies instead of options

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

* remove unused imports, add layout, refine validate(), use is_msvc_static_runtime

---------

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

5 participants