Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 2013 15:22:27 GMT
From:      Mark Martinec <Mark.Martinec@ijs.si>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/182906: audio/taglib .h files not c++ pedantic clean, breaks audio/soundkonverter (mp4coverart.h:49: error: comma at end of enumerator list)
Message-ID:  <201310111522.r9BFMR9S074067@oldred.freebsd.org>
Resent-Message-ID: <201310111530.r9BFU0N7046094@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182906
>Category:       ports
>Synopsis:       audio/taglib .h files not c++ pedantic clean, breaks audio/soundkonverter (mp4coverart.h:49: error: comma at end of enumerator list)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 11 15:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Mark Martinec
>Release:        9.2-STABLE
>Organization:
J. Stefan Institute
>Environment:
FreeBSD neli.ijs.si 9.2-STABLE FreeBSD 9.2-STABLE #0 r255973: Tue Oct  1 19:43:49 CEST 2013     mark@neli.ijs.si:/usr/obj/usr/src/sys/NELI  amd64
>Description:
Building of port audio/soundkonverter fails because it tries to include a
file /usr/local/include/taglib/mp4coverart.h (installed by port audio/taglib)
using a c++ compiler with a -pedantic option enabled:

In file included from /usr/local/include/taglib/mp4item.h:31,
                 from /usr/local/include/taglib/mp4tag.h:37,
                 from /wrkdirs/usr/ports/audio/soundkonverter/work/soundkonverter-2.0.4/metadata/tagengine.cpp:32:
/usr/local/include/taglib/mp4coverart.h:49: error: comma at end of enumerator list
*** [CMakeFiles/soundkonverter.dir/metadata/tagengine.o] Error code 1


Sure enough, there is a trailing comma there
in /usr/local/include/taglib/mp4coverart.h near line 49:

      enum Format {
        JPEG    = TypeJPEG,
        PNG     = TypePNG,
        BMP     = TypeBMP,
        GIF     = TypeGIF,
        Unknown = TypeImplicit,
      };


Using system default compiler: c++ (GCC) 4.2.1 20070831 patched [FreeBSD].
Fresh versions from ports: audio/soundkonverter 2.0.4, audio/taglib 1.9.1.
Full build log at: http://www.ijs.si/usr/mark/tmp/soundkonverter-2.0.4.log

The 'comma at end of enumerator' is not valid in C++ (nor in C89),
although it is valid in C99. Apparently it becomes valid in C++11,
but we are not there yet.
>How-To-Repeat:
Build audio/soundkonverter from ports.
>Fix:
Depending on a point of view, the error is either in the exported .h file(s)
by a port audio/taglib, or in using a -pedantic option in audio/soundkonverter
which tries to include plain C include files from a C++ code.

Perhaps the least effort solution would be to drop -pedantic from
C++ options in port audio/soundkonverter .

A cleaner solution would be to drop trailing commas in .h files
as installed by port audio/taglib, in particular the mp4coverart.h file.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310111522.r9BFMR9S074067>