Skip to content

vorbis-tools 1.4.3 fails to compile with gcc 15.2 #116

Description

@StephanTLavavej

I was able to build vorbis-tools 1.4.3 with gcc 13.2, but it fails with gcc 15.2. The proximate cause appears to be https://gcc.gnu.org/gcc-15/changes.html#c :

C23 by default: GCC 15 changes the default language version for C compilation from -std=gnu17 to -std=gnu23.

The root cause is that vorbis-tools 1.4.3 contains really old machinery that's doing bad things:

../../src/share/getopt.c:399:21: error: too many arguments to function 'getenv'; expected 0, have 1
  399 |   posixly_correct = getenv ("POSIXLY_CORRECT");
      |                     ^~~~~~  ~~~~~~~~~~~~~~~~~
../../src/share/getopt.c:207:14: note: declared here
  207 | extern char *getenv ();
      |              ^~~~~~
../../src/share/getopt.c: In function 'getopt':
../../src/share/getopt.c:964:1: warning: old-style function definition [-Wold-style-definition]
  964 | getopt (argc, argv, optstring)
      | ^~~~~~
../../src/share/getopt.c:968:1: error: number of arguments doesn't match prototype
  968 | {
      | ^
In file included from ../../src/share/getopt.c:104:
../../src/include/getopt.h:136:12: error: prototype declaration
  136 | extern int getopt ();
      |            ^~~~~~
../../src/ogginfo/ogginfo2.c: In function 'main':
../../src/ogginfo/ogginfo2.c:430:19: error: too many arguments to function 'getopt'; expected 0, have 3
  430 |     while ((ret = getopt(argc, argv, "hqvV")) >= 0) {
      |                   ^~~~~~ ~~~~
In file included from ../../src/ogginfo/ogginfo2.c:20:
../../src/include/getopt.h:136:12: note: declared here
  136 | extern int getopt ();
      |            ^~~~~~

This should be reported upstream to https://gitlab.xiph.org/xiph/vorbis-tools/-/issues .

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions