Date: Thu, 2 May 2024 14:03:12 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Nuno Teixeira <eduardo@freebsd.org> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: build failure affecting port: "error: reference to 'filesystem' is ambiguous" Message-ID: <9B56E755-1A91-4B69-B858-5A814BF85E7C@FreeBSD.org> In-Reply-To: <CAFDf7UK7yM38MFoWjbeGV2%2BCEmSMHNnFH3x9rC0z3ujuxc24ZA@mail.gmail.com> References: <CAFDf7UJ2-QgwE0zU8aZ7ZP26NNPYfPYQZDMYQFxGiKDUw9nyOg@mail.gmail.com> <8A27C44B-FBB9-479B-866A-13E06AB8266A@FreeBSD.org> <CAFDf7UK7yM38MFoWjbeGV2%2BCEmSMHNnFH3x9rC0z3ujuxc24ZA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nice to see that upstream chose the more correct solution. :) -Dimitry > On 2 May 2024, at 11:57, Nuno Teixeira <eduardo@freebsd.org> wrote: >=20 > Hello Dimitry, >=20 > I've quoted your words in upstream PR and it solved with: >=20 > Stop using namespace std > = https://github.com/amsynth/amsynth/commit/6fb79100a6254220e5adc69a14285725= 39ecc377 >=20 > I'm using patch globally that unbreak main and rest of supported = releases don't complaint about it. >=20 > Thanks! >=20 > Dimitry Andric <dim@freebsd.org> escreveu (ter=C3=A7a, 30/04/2024 = =C3=A0(s) 18:45): > On 30 Apr 2024, at 14:26, Nuno Teixeira <eduardo@freebsd.org> wrote: > >=20 > > I'm lost on build failure of audio/amsynth (updated to version = 1.13.3) on recent main. > > Thre strange thing is if I use llvm from ports, USES+=3Dllvm, it = fails with same error so I suspect that something related to main. > >=20 > > Any help is welcome and I didn't openned an upstream PR yet. > >=20 > > Thanks, > >=20 > > --- > > src/Configuration.cpp:35:20: error: reference to 'filesystem' is = ambiguous > > 35 | amsynthrc_fname =3D filesystem::get().config; > > | ^ > > src/filesystem.h:27:7: note: candidate found by name lookup is = 'filesystem' > > 27 | class filesystem > > | ^ > > /usr/include/c++/v1/__chrono/file_clock.h:49:1: note: candidate = found by name lookup is 'std::filesystem' > > 49 | _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM > > | ^ > > /usr/include/c++/v1/__config:892:80: note: expanded from macro = '_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM' > > 892 | inline = namespace __fs { namespace filesystem { > > | = ^ >=20 > It looks like the program defines its own "filesystem" class, and also > has "using namespace std;".=20 >=20 > Usually the easiest fix is to use "::filesystem" for the call sites = that > want to use the program's own definition. >=20 > Alternatively, rename the 'local' definition to something else, like > "my_filesystem". >=20 > -Dimitry >=20 >=20 >=20 > --=20 > Nuno Teixeira > FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9B56E755-1A91-4B69-B858-5A814BF85E7C>