Giter VIP home page Giter VIP logo

Comments (3)

h1ght avatar h1ght commented on May 26, 2024

did some1 solved this issue?

i added a backshla infront of "
\"

from torrenttools.

Tr4il avatar Tr4il commented on May 26, 2024

I tried building torrenttools and ran into the same issues as OP (currently it doesn't build anywhere, not on Debian, not on anything), but I tried fixing issue number 4 in file_matcher.hpp
This part errors out because fmt deprecated the _format function several versions ago.
I did some digging and tried to fix it having absolutely 0 experience in c++, and ended up with this
So,
std::string pattern = ".*.{}$"_format(extension);
becomes
std::string pattern = fmt::format(".*.{}$", extension);

Only now, I'm running into a new issue, with:

In file included from /usr/include/fmt/format.h:49,
                 from /home/tr4il/torrenttools/src/info.cpp:3:
/usr/include/fmt/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v10::detail::parse_format_specs(ParseContext&) [with T = dottorrent::announce_url; ParseContext = compile_parse_context<char>; decltype (ctx.begin()) = const char*]’:
/usr/include/fmt/core.h:2639:51:   required from here
/home/tr4il/torrenttools/src/info.cpp:289:28:   in ‘constexpr’ expansion of ‘fmt::v10::basic_format_string<char, long unsigned int, const dottorrent::announce_url&>(tracker_tier_entry)’
/usr/include/fmt/core.h:2740:40:   in ‘constexpr’ expansion of ‘fmt::v10::detail::parse_format_string<true, char, format_string_checker<char, long unsigned int, dottorrent::announce_url> >(((fmt::v10::basic_format_string<char, long unsigned int, const dottorrent::announce_url&>*)this)->fmt::v10::basic_format_string<char, long unsigned int, const dottorrent::announce_url&>::str_, fmt::v10::detail::format_string_checker<char, long unsigned int, dottorrent::announce_url>(fmt::v10::basic_string_view<char>((* & s))))’
/usr/include/fmt/core.h:2489:44:   in ‘constexpr’ expansion of ‘fmt::v10::detail::parse_replacement_field<char, format_string_checker<char, long unsigned int, dottorrent::announce_url>&>((p + -1), end, (* & handler))’
/usr/include/fmt/core.h:2457:33:   in ‘constexpr’ expansion of ‘(& handler)->fmt::v10::detail::format_string_checker<char, long unsigned int, dottorrent::announce_url>::on_replacement_field((& handler)->fmt::v10::detail::format_string_checker<char, long unsigned int, dottorrent::announce_url>::on_arg_id(), begin)’
/usr/include/fmt/core.h:2632:20:   in ‘constexpr’ expansion of ‘((fmt::v10::detail::format_string_checker<char, long unsigned int, dottorrent::announce_url>*)this)->fmt::v10::detail::format_string_checker<char, long unsigned int, dottorrent::announce_url>::on_format_specs(id, begin, begin)’
/usr/include/fmt/core.h:2548:45: error: ‘fmt::v10::detail::type_is_unformattable_for<dottorrent::announce_url, char> _’ has incomplete type
 2548 |     type_is_unformattable_for<T, char_type> _;
      |                                             ^
/usr/include/fmt/core.h: In instantiation of ‘constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&)[with bool PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; T = const dottorrent::announce_url; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’:
/usr/include/fmt/core.h:1808:51:   required from ‘constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T = {long unsigned int, const dottorrent::announce_url}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {long unsigned int, dottorrent::announce_url}]’
/usr/include/fmt/core.h:1826:18:   required from ‘constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {long unsigned int, const dottorrent::announce_url}]’
/usr/include/fmt/core.h:2788:44:   required from ‘std::string fmt::v10::format(format_string<T ...>, T&& ...) [with T = {long unsigned int, const dottorrent::announce_url&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, long unsigned int, const dottorrent::announce_url&>]’
/home/tr4il/torrenttools/src/info.cpp:289:28:   required from here
/usr/include/fmt/core.h:1576:63: error: ‘fmt::v10::detail::type_is_unformattable_for<const dottorrent::announce_url, char> _’ has incomplete type
 1576 |     type_is_unformattable_for<T, typename Context::char_type> _;
      |                                                               ^
/usr/include/fmt/core.h:1580:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1580 |       formattable,
      |       ^~~~~~~~~~~
/usr/include/fmt/core.h:1580:7: note: ‘formattable’ evaluates to false
make[3]: *** [CMakeFiles/torrenttools.dir/build.make:216: CMakeFiles/torrenttools.dir/src/info.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:1092: CMakeFiles/torrenttools.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1099: CMakeFiles/torrenttools.dir/rule] Error 2
make: *** [Makefile:564: torrenttools] Error 2

Which, as far as I can find, is another fmt related error. But I can't figure this one out.

from torrenttools.

Tr4il avatar Tr4il commented on May 26, 2024

Apologies for the double post, but I did some more digging into this now seemingly dead project and there is also a develop branch. Using vcpkg, that builds just fine!
So, for whoever is still interested, here's the steps, tested on Debian Bookworm and Ubuntu 22.04.

  1. Install deps:
sudo apt install git cmake libstdc++-12-dev g++ libssl-dev autoconf automake libtool nasm libtbb-dev pkg-config autoconf libtool ninja-build
  1. Clone vcpkg repo:
git clone https://github.com/Microsoft/vcpkg.git

Remember to insert the path to this folder later on

  1. Run bootstrap script:
./vcpkg/bootstrap-vcpkg.bat
  1. Clone torrenttools repo and checkout develop branch
git clone https://github.com/fbdtemme/torrenttools
cd torrenttools
git checkout develop
  1. Prepare the build, don't forget the vcpkg path:
cmake -S . -B cmake-build-debug --preset linux-isal -DCMAKE_TOOLCHAIN_FILE=[VCPKG-PATH]/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DTORRENTTOOLS_BUILD_TESTS=OFF
  1. Build it.
cmake --build cmake-build-debug
  1. Congratulations, your build should be in cmake-build-debug/Debug!
./torrenttools --version
torrenttools v0.7.0

Cryptographic backends:
  isa-l_crypto    : 2.24.0
  openssl         : OpenSSL 3.0.11 19 Sep 2023

from torrenttools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.