Your message dated Wed, 01 Nov 2017 17:03:54 +0000
with message-id <[email protected]>
and subject line Bug#880492: fixed in bsdgames 2.17-26
has caused the Debian Bug report #880492,
regarding bsdgames: FTBFS: conflicting declaration of 'char* fgetln(FILE*,
size_t*)' with 'C' linkage
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
880492: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880492
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: bsdgames
Version: 2.17-25
Tags: buster sid patch
While working on switching ncurses to the new ABI (see #230990) I
noticed that bsdgames FTBFS with libncurses6. From my pbuilder log:
,----
| g++ -g -O2 -Wall -W -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings
-g -O2 -fdebug-prefix-map=/build/bsdgames-2.17=. -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2
-fdebug-prefix-map=/build/bsdgames-2.17=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Iinclude -Idab -c
dab/gamescreen.cc -o dab/gamescreen.o
| In file included from /usr/include/wchar.h:36:0,
| from /usr/include/curses.h:400,
| from dab/box.cc:48:
| include/stdio.h:38:14: error: conflicting declaration of 'char* fgetln(FILE*,
size_t*)' with 'C' linkage
| extern char *fgetln(FILE *stream, size_t *len);
| ^~~~~~
| In file included from /usr/include/curses.h:183:0,
| from dab/box.cc:48:
| include/stdio.h:38:14: note: previous declaration with 'C++' linkage
| extern char *fgetln(FILE *stream, size_t *len);
| ^~~~~~
| GNUmakefile:298: recipe for target 'dab/box.o' failed
| make[2]: *** [dab/box.o] Error 1
`----
I am not sure why this has not been triggered earlier, but it seems that
fgetln really needs to be declared as extern "C" for a C++ compiler.
Attached is a patch that works for me and which you can drop into
debian/patches, stolen from the Fedora package.
>From 3735b53ebd56c007f46680a5be911d4451599310 Mon Sep 17 00:00:00 2001
From: Sven Joachim <[email protected]>
Date: Wed, 1 Nov 2017 09:03:28 +0100
Subject: [PATCH] Fix include/stdio.h C++ incompatibility
I have seen the following error when building bsdgames with
libncurses6:
In file included from /usr/include/wchar.h:36:0,
from /usr/include/curses.h:400,
from dab/box.cc:48:
include/stdio.h:38:14: error: conflicting declaration of 'char* fgetln(FILE*, size_t*)' with 'C' linkage
extern char *fgetln(FILE *stream, size_t *len);
^~~~~~
In file included from /usr/include/curses.h:183:0,
from dab/box.cc:48:
include/stdio.h:38:14: note: previous declaration with 'C++' linkage
extern char *fgetln(FILE *stream, size_t *len);
^~~~~~
GNUmakefile:298: recipe for target 'dab/box.o' failed
Declaring fgetln as extern "C" fixes this. The patch has been taken
from the Fedora bsd-games package, see
https://src.fedoraproject.org/rpms/bsd-games/blob/ac743bec7031199ec6fc09b6eb3760ffcfcfd277/f/bsd-games-2.17-stdio-c++.patch.
---
include/stdio.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/stdio.h b/include/stdio.h
index 32a4b71..b1ac049 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -35,5 +35,11 @@
#include_next <stdio.h>
#ifndef HAVE_fgetln
+#ifdef __cplusplus
+extern "C" {
+#endif
extern char *fgetln(FILE *stream, size_t *len);
+#ifdef __cplusplus
+}
+#endif
#endif
--
2.15.0
--- End Message ---
--- Begin Message ---
Source: bsdgames
Source-Version: 2.17-26
We believe that the bug you reported is fixed in the latest version of
bsdgames, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <[email protected]> (supplier of updated bsdgames package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 01 Nov 2017 17:37:54 +0100
Source: bsdgames
Binary: bsdgames
Architecture: source
Version: 2.17-26
Distribution: unstable
Urgency: medium
Maintainer: Debian Games Team <[email protected]>
Changed-By: Dr. Tobias Quathamer <[email protected]>
Description:
bsdgames - collection of classic textual unix games
Closes: 880492
Changes:
bsdgames (2.17-26) unstable; urgency=medium
.
* Fix FTBFS with libncurses6.
Thanks to Sven Joachim <[email protected]> (Closes: #880492)
* Update Standards-Version to 4.1.1, no changes needed
Checksums-Sha1:
d6ff93f90dd0865420ebb7abf240912baa71bdd8 1936 bsdgames_2.17-26.dsc
4a9e9a4466b66ba968767693e294555551526f5c 33952 bsdgames_2.17-26.debian.tar.xz
bb413370a858ef309270b78f66c5fda8547d367c 5852 bsdgames_2.17-26_amd64.buildinfo
Checksums-Sha256:
159711a3afc18e6cdb018a68295bcf6ea6ae5b7fd0b511ae44541e955a83d52e 1936
bsdgames_2.17-26.dsc
40cba781999fee0b9617c7f2d7639df7df1785161ec056aa41fda858655b4efa 33952
bsdgames_2.17-26.debian.tar.xz
9fc3d5d422cc4d6197b4900abb7f19693976699a255ff923a475fcae3c1f61a7 5852
bsdgames_2.17-26_amd64.buildinfo
Files:
c0ae77cdb231108081a67e56ee82c854 1936 games optional bsdgames_2.17-26.dsc
561df746f8fb3d47fb56c7745e93a07c 33952 games optional
bsdgames_2.17-26.debian.tar.xz
155a42b41ae7a2fd02c206b2c5553e7f 5852 games optional
bsdgames_2.17-26_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE0cuPObxd7STF0seMEwLx8Dbr6xkFAln5+TsACgkQEwLx8Dbr
6xkP5A/8C+vdpOQPPH+UFOSrCAS/XynVp2+3EZGoUhWNYtOi2kg2IhhJ/0JybtiM
3z24l730nvxquqprUgAj/eoOsuHp8r54EG2pvZgyLdRJaAzEPxDanxb0A4QbuHw6
Xz7vzKwgTEUvOZNt8hrs3T5ivauRV/4uYFuINHdNxxK/10xZR55ZL3uMKSGbHuKu
ONJN8K+hvJMO2cVi32912TM9AwTLa/4hgiJEblLYCgEMe7mLCcDBGGK6s2f87mGP
tFmmexFsqZIY9KDTI1l/TGD6O1ehozAcaf8GhsT5m6dOwkPx1b/V8ctB4LS5ScgV
T4GOgpPvjx3M5/ric5B6Reh0J/amMYr731az8kL2RNagRNsU8YkOLHGPwuEzfbXw
ULZTaV0Cd3soCtKIuf5TWphT+LzbYJ6JmV+BwSl/pgmZrWQU837MPZqFXM1t13cj
Kc0OEgaF8yiwf/jZQaI+fIT7EpmlSttEHJhUKC7bLrKtY8MsFxsmM8eGoWgLPKGn
adKOeUugnJKWzOuKhRMe/OB0FYeyIR5KElWIUSKGwfbCS4PiE53bLH93O5zFbc1M
zvdcd1ANsISr4PoFGXhwKEtWLjrNSS7IysyAvQXNF7nMd1xwCzGe5/t/jRu4NvVo
Lmj4d2mz0o2u5KdUm07QhAmt6BIBGP+DmZa+XObaDVmnaAn6ozo=
=cSCr
-----END PGP SIGNATURE-----
--- End Message ---