[MacPorts] #66956: qbittorrent @4.5.1: build failure, undefined symbols
MacPorts
noreply at macports.org
Mon Feb 20 19:44:54 UTC 2023
#66956: qbittorrent @4.5.1: build failure, undefined symbols
----------------------------+------------------------
Reporter: contextnerror | Owner: i0ntempest
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: qBittorrent |
----------------------------+------------------------
Comment (by kencu):
It's using {{{std::filesystem}}} but not finding the symbols for it in the
system {{{libc++.dylib}}} to link against:
{{{
:info:build
"std::__1::__fs::filesystem::__status(std::__1::__fs::filesystem::path
const&, std::__1::error_code*)", referenced from:
:info:build Utils::Fs::isRegularFile(Path const&) in
libqbt_base.a(fs.cpp.o)
}}}
because {{{std::filesystem}}} was not compiled into the system
{{{libc++.dylib}}} until macOS 10.15.
https://github.com/llvm/llvm-
project/blob/997dc7e00f49663b60a78e18df1dfecdf62a4172/libcxx/include/__availability#L220
To get around this (ie to provide {{{std::filesystem}}} on older systems
before 10.15) we have various options.
1. We can use the macports-libcxx port, which provides a newer libc++ to
link against. This is very easy to do (it's an option in legacysupport)
and often works, but there can sometimes be a hiccup mixing the newer
libc++.dylib and the system libc++.dylib, so you have to do a bit of
testing to make sure things work as expected.
1. You might be able to tell the software not to use std::filesystem
somehow -- force off the detection code, if there is any, turn it off with
a configure argument, etc.
1. Or we can find another way to provide the filesystem objects to the
build -- older clang versions did have libfilesystem in a separate library
that we could somehow make available to current clang versions to use.
1. Finally, there are a few options where std::filesystem is replaced with
some other port, like this port:
{{{
ghc-filesystem @1.5.12 (devel)
An implementation of C++17 std::filesystem.
}}}
which despite the name has nothing to do with ghc haskell (in this case,
ghc are the author's initials). This port is said to reproduce
std::filesystem quite accurately, and perhaps we might find a way to use
this successfully on the other systems, ideally without too much actual
patching. I haven't tried to do that as yet.
--
Ticket URL: <https://trac.macports.org/ticket/66956#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list