Does not compile with llvm clang due to invalid friend declarations

Bug #1358266 reported by Tobias Föhst
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
speech-tools (Debian)
Fix Released
Unknown
speech-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When compiling software using speech-tools, LLVM Clang gives errors regarding invalid friend declarations:
/usr/include/estools/EST_String.h:576:16: error: friend declaration specifying a default argument must be a definition

The reason is, that the standard does only allow friend declarations with default arguments if these also are definitions. GCC is a bit forgiving and ignored this issue up to now.

A workaround with minimal change would be to replace the default arguments by overloading. Please find an according patch attached to this report.

Tags: patch
Revision history for this message
Tobias Föhst (foehst) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-friend-declarations.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Sergio Oller (zeehio) wrote :

Thank you for your contribution. This bug report was already reported on Debian [1]. On the next speech-tools upload it will be fixed, and on the following sync with ubuntu repositories it will be fixed too for Ubuntu.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756335

Changed in speech-tools (Ubuntu):
status: New → Fix Committed
Changed in speech-tools (Debian):
status: Unknown → Fix Committed
Changed in speech-tools (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Fixed long ago (Xenial had it):

speech-tools (1:2.1~release-8) unstable; urgency=medium

  [ Samuel Thibault ]
  * Team upload.

  [ Sergio Oller ]
  * Use dh with debian/compat=9 for hardening
     - Drop Build-depends: hardening-wrapper
     - Honor CFLAGS, CXXFLAGS, LDFLAGS
     - Use dh --with autoreconf
  * Add patch wrong-default-declaration.diff by Alexander to be able to
    build with clang. Closes: #756335

 -- Samuel Thibault <email address hidden> Fri, 22 Aug 2014 02:21:54 +0200

Changed in speech-tools (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.