On 30 Apr 2024, at 14:26, Nuno Teixeira <edua...@freebsd.org> wrote: > > 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+=llvm, it fails with > same error so I suspect that something related to main. > > Any help is welcome and I didn't openned an upstream PR yet. > > Thanks, > > --- > src/Configuration.cpp:35:20: error: reference to 'filesystem' is ambiguous > 35 | amsynthrc_fname = 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 { > | > ^
It looks like the program defines its own "filesystem" class, and also has "using namespace std;". Usually the easiest fix is to use "::filesystem" for the call sites that want to use the program's own definition. Alternatively, rename the 'local' definition to something else, like "my_filesystem". -Dimitry