Bug#897734: darkradiant: ftbfs with GCC-8
Juhani Numminen
juhaninumminen0 at gmail.com
Thu May 24 10:35:12 BST 2018
Control: tags -1 + patch
On Fri, 04 May 2018 12:21:18 +0000 Matthias Klose <doko at debian.org> wrote:
> Package: src:darkradiant
> Version: 2.5.0-2
[...]
> The package fails to build in a test rebuild on at least amd64 with
> gcc-8/g++-8, but succeeds to build with gcc-7/g++-7. The
> severity of this report will be raised before the buster release.
>
> The full build log can be found at:
> http://aws-logs.debian.net/2018/05/01/gcc8/darkradiant_2.5.0-2_unstable_gcc8.log.gz
The error is:
> In file included from ../../libs/os/file.h:4,
> from FileChooser.cpp:9:
> ../../libs/os/fs.h:20:21: error: 'filesystem' is not a namespace-name
> namespace fs = std::filesystem;
In the new libstdc++-8-dev, the standard header <filesystem> from C++17 is available,
whereas earlier libstdc++'s only had <experimental/filesystem>.
DarkRadiant's build system thinks it can use either the <filesystem> or <experimental/filesystem>
header, but only the experimental version will work because of two reasons:
1) to use <filesystem>, g++ requires -std=c++17 or gnu++17, which the build system doesn't set
2) the headers actually have different APIs
(e.g. there is add_perms in [1], but not in [2])
I've attached a patch that makes the Debian package compile with GCC 8 (and 7).
Cheers,
Juhani
[1] http://en.cppreference.com/w/cpp/experimental/fs/perms
[2] http://en.cppreference.com/w/cpp/filesystem/perms
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03_c++17_filesystem.patch
Type: text/x-patch
Size: 1262 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-games-devel/attachments/20180524/cba96fd7/attachment.bin>
More information about the Pkg-games-devel
mailing list