#1136759 ascdc: FTBFS: ascdc.c:121:14: error: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]

Package:
src:ascdc
Source:
src:ascdc
Submitter:
Santiago Vila
Date:
2026-09-13 11:35:02 UTC
Severity:
normal
Tags:
#1136759#5
Date:
2026-05-15 18:09:44 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202605/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:ascdc, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean
   dh_auto_clean
	make -j2 clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -f ascdc
rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut  "#"*
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
xmkmf
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/lib/X11/config
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_build
	make -j2 INSTALL="install --strip-program=true"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
gcc -g -O2 -fno-strict-aliasing         -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L 				-D_POSIX_SOURCE -D_XOPEN_SOURCE 				-D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 				  				  -DFUNCPROTO=15 -DNARROWPROTO     -Wdate-time -D_FORTIFY_SOURCE=2  -c -o ascdc.o ascdc.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from ascdc.c:19:
/usr/include/features.h:199:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  199 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
ascdc.c: In function ‘swapcd’:
ascdc.c:121:14: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Wimplicit-function-declaration]
  121 |         fd = open (device, 0);
      |              ^~~~
      |              popen
ascdc.c:164:28: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  164 |                            system(cdplayer);
      |                            ^~~~~~~~~~~~~~~~
make[1]: *** [<builtin>: ascdc.o] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j2 INSTALL="install --strip-program=true" returned exit code 2
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1136759#10
Date:
2026-06-02 17:04:16 UTC
From:
To:
Hi,

I was already working on some QA improvements for this package when I
found this FTBFS bug report.

I included a fix for this issue in the following merge request:

https://salsa.debian.org/debian/ascdc/-/merge_requests/2

The build failure happens because open() is used without including
<fcntl.h>, which causes an implicit function declaration error with
newer GCC versions.

The patch adds the missing header declaration and fixes the build.

Thanks,
Rony Sousa

#1136759#17
Date:
2026-09-13 11:05:41 UTC
From:
To:
Looks good to me. I'm going to upload it "as is", but first I've
configured "fast-forward" merges in salsa because I'm aiming at linear
history.

Simple question: This bug happens in trixie now after yesterday's
point release. How is that possible, when we have not updated gcc in
trixie?

(I plan to backport this fix for trixie-proposed-updates anyway).

Thanks.

#1136759#26
Date:
2026-09-13 11:34:01 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ascdc, 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 1136759@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Rony Joao de Sousa <ronyjdesousa@gmail.com> (supplier of updated ascdc 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 02 Jun 2026 13:55:49 -0300
Source: ascdc
Architecture: source
Version: 0.3-18
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Rony Joao de Sousa <ronyjdesousa@gmail.com>
Closes: 1136759
Changes:
 ascdc (0.3-18) unstable; urgency=medium
 .
   * QA upload.
   * Ran wrap-and-sort.
   * debian/control:
       - Bumped Standards-Version to 4.7.4.
       - Removed no longer needed "Priority: optional" field.
   * debian/copyright: Updated the packaging copyright years.
   * debian/patches/:
       - debian.patch: Added missing DEP-3 metadata.
       - 0002-Fix-missing-fcntl-include.patch: Include <fcntl.h> and
         fix FTBFS caused by implicit declaration of open(). (Closes: #1136759)
   * debian/rules: Propagated hardening flags to the imake-based build system.
   * debian/upstream/metadata: Created.
   * debian/watch: Removed empty line.
Checksums-Sha1:
 3e00c903fae0dcb8f42a1156c10d50379fd26957 1512 ascdc_0.3-18.dsc
 4a9486dd116eaf901fd59422571f7794db6c44f2 4328 ascdc_0.3-18.debian.tar.xz
 eb84503d6007ab018aa7e953d77593683bf9deb8 5166 ascdc_0.3-18_source.buildinfo
Checksums-Sha256:
 317a7305687a02a6f336e1f9d60ef201e77a34d86c354f62ccca0e313ab8d47c 1512 ascdc_0.3-18.dsc
 7fb1e2aca0d2dd6d4ddd340cabba14727551b78d43227b0fa5b21b4b82f2901f 4328 ascdc_0.3-18.debian.tar.xz
 48cbc9d1bd3ad1d67ea929faeb9caedfacd9bbe96c02a346543ed1ff74b4f89c 5166 ascdc_0.3-18_source.buildinfo
Files:
 9ca95868437b47a53da0d2cdfec5d1a2 1512 sound optional ascdc_0.3-18.dsc
 d3b1cee519c521e968fb4c4c611006ea 4328 sound optional ascdc_0.3-18.debian.tar.xz
 9ec84a2ca784a8eaf261bcc3f59539f7 5166 sound optional ascdc_0.3-18_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE1Uw7+v+wQt44LaXXQc5/C58bizIFAmqmhOMACgkQQc5/C58b
izJOjAgAg2DcIIumI0LOUgm66ygIMe4sIjeZIW2c5lKMgfG9lbUzTGoSa+CLE57z
1yBTMCPHa760zqvjoLErR94RBaET9fFQFJ3pB2L153ki9+XLSndNzAuQsXJ186M6
yCeX5N//4EDYeeptiCzd822n9uxCQ4FIy1EzGxSRoiLoee3QG15tJdOinxWIkEBj
t0yq3kf9j5K+k861TYos2mbrdexu/FSJa+X2EnhJH1iC7riiDGgV+Sj0BV98NbpC
f8IFRYRhbon3ah7RIf4QRJHr2aZ/XDd9sLT9ljgyiucHxzMARZ8xq7J+1nmNxbEx
ZQ29Sn/I6V0v8SDnBGkBtySDpWU1ZQ==
=vpJj
-----END PGP SIGNATURE-----