12.0-RELEASE-p7 doesn't contain std::filesystem that has been added to 12.0-STABLE some time later
Yuri
yuri at rawbw.com
Wed Jul 10 18:23:20 UTC 2019
On 2019-07-10 07:19, Jan Beich wrote:
> C++ example:
>
> #if __cplusplus >= 201703L && __has_include(<filesystem>)
> #include <filesystem>
> #else
> #include <experimental/filesystem>
> namespace std {
> namespace filesystem = experimental::filesystem;
> }
> #endif
>
> Makefile example:
>
> .if exists(/usr/lib/libc++fs.a)
> LIBS+= -lc++fs
> .elif exists(/usr/lib/libc++experimental.a)
> # XXX Remove after FreeBSD 12.0 EOL
> LIBS+= -lc++experimental
> .else
> # XXX Remove after FreeBSD 11.2 EOL
> USE_GCC= yes
> LIBS+= -lstdc++fs
> .endif
This helps with locating the header/library, but it fails to compile in
poudriere on 12.0-RELEASE-p7:
x.cpp:213:15: error: no member named 'is_symlink' in
'std::experimental::filesystem::v1::directory_entry'
if (entry.is_symlink())
~~~~~ ^
It looks like 12.0-RELEASE-p7 is technically broken, because it doesn't
include is_symlink().
Yuri
More information about the freebsd-ports
mailing list