The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SMPEG2 - GCC 6.1.1 compilation error
Łukasz Dobrogowski
Guest

Hey,


I'm using arch linux, trying to compile https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz with gcc-6.1.1 . It fails on file audio/hufftable.cpp with the following error:

audio/hufftable.cpp:587:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing]


Full autotools log here: https://paste.kde.org/pcd8d0xzf


The same package builds fine with gcc-5.3, albeit with quite a few warnings.


Has anyone encountered this problem?



Cheers

Łukasz
More fun on Arch Linux
Llewelyn


Joined: 17 May 2016
Posts: 1
I'm running into the same issue when attemtping to compile the lib32-smpeg and lib32-smpeg2 packages from the AUR. It appears that the new release of gcc on Arch comes with much stricter defaults and many warnings are now being treated as errors. If I pass the -w option to gcc to prevent this I am able to build both packages. This isn't effective on all software that built under gcc 5.3.0 failing to build under the more strict defaults of gcc 6.1.1; however, on many where it is a warning being elevated to an error one can set environment variables with the -w flag to generate a working build.