Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTBFS with gcc-10 (or -fno-common) #63

Closed
OdyX opened this issue Jul 24, 2020 · 2 comments
Closed

FTBFS with gcc-10 (or -fno-common) #63

OdyX opened this issue Jul 24, 2020 · 2 comments
Assignees
Labels

Comments

@OdyX
Copy link
Contributor

OdyX commented Jul 24, 2020

It has been reported in Debian that sdl-kitchensink fails to build from source with gcc-10, see https://bugs.debian.org/957784

/usr/bin/ld: CMakeFiles/SDL_kitchensink.dir/src/internal/subtitle/renderers/kitsubass.c.o:./obj-x86_64-linux-gnu/./include/kitchensink/internal/libass.h:53: multiple definition of `ass_process_chunk'; CMakeFiles/SDL_kitchensink.dir/src/internal/audio/kitaudio.c.o:./obj-x86_64-linux-gnu/./include/kitchensink/internal/libass.h:53: first defined here
…

As documented here https://gcc.gnu.org/gcc-10/porting_to.html;

A common mistake in C is omitting extern when declaring a global variable in a header file. If the header is included by several files it results in multiple definitions of the same variable. In previous GCC versions this error is ignored. GCC 10 defaults to -fno-common, which means a linker error will now be reported.

Indeed, I can confirm that passing -fcommon to gcc will let the build pass, but this is just a temporary workaround I would say.

Platform

  • OS: Debian unstable/sid as of 2020-07-23, with GCC-10
  • SDL version 2.0.12+dfsg1-1
  • FFMPEG version: 7:4.3-3+b1
  • SDL_Kitchensink version : 1.0.8
@OdyX OdyX added the bug label Jul 24, 2020
katajakasa added a commit that referenced this issue Jul 24, 2020
@katajakasa
Copy link
Owner

Thanks for reporting this! Unfortunately, the dynamic linking of libass is a bit of a kludge, and I don't usually test it. That's why I had missed this. Added a quick fix on the PR, please test it out if you have the time. I will probably poke at it more a bit later, and then merge and roll a release if there are no issues.

katajakasa added a commit that referenced this issue Jul 27, 2020
@katajakasa
Copy link
Owner

Fixed and released in v1.0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants