-
Notifications
You must be signed in to change notification settings - Fork 15
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
1.8 unix fails to build with gcc 8.0.1 (fedora 29, rawhide) #10
Comments
Don't really understand this error. It's complaining that an Maybe this is a bug in GCC? |
With `(unsigned int)-1` you mean max uint? There's a const defined for that
IIRC.
|
It's not really max uint, it's more a magic number that's very unlikely to be used. It would be a shame if |
I see. Sounds like @Malvineous is against latest ANSI C guidelines. If I'm
not mistaken this is kind of out of scope of adplug/adplay (plz excuse me).
|
reverting this commit fix the issue with gcc8 |
@ildar Not against the guidelines, I just think that readable code is more important than following someone else's rules. Now that I think about it, it would be even better to do something like @rosset Thanks for finding the breaking commit. Looks like we can't remove the cast or a compiler warning will return with GCC < 8, so using a |
The magic number |
(the reason the compilation fails is due to -Werror, causing all warnings to be become errors) @Malvineous, you decide if you want to change the code or not, and close this issue as you see fit. |
Making all in src
/usr/bin/make all-am
make[2]: Entering directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libbinio -DADPLUG_DATA_DIR="/var/lib/adplug" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c -o output.o output.cc
make[2]: Leaving directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
make[2]: Entering directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libbinio -DADPLUG_DATA_DIR="/var/lib/adplug" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c -o alsa.o alsa.cc
make[2]: Leaving directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
make[2]: Entering directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libbinio -DADPLUG_DATA_DIR="/var/lib/adplug" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c -o disk.o disk.cc
make[2]: Leaving directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
make[2]: Entering directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libbinio -DADPLUG_DATA_DIR="/var/lib/adplug" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c -o ao.o ao.cc
make[2]: Leaving directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
adplay.cc:115:1: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
};
^
make[2]: *** [Makefile:497: adplay.o] Error 1
make[2]: Entering directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libbinio -DADPLUG_DATA_DIR="/var/lib/adplug" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c -o adplay.o adplay.cc
make[2]: Leaving directory '/home/filiperosset/rpmbuild/my/failed/adplay/adplay-1.8/src'
make[1]: *** [Makefile:351: all] Error 2
make: *** [Makefile:404: all-recursive] Error 1
erro: Status de saída de /var/tmp/rpm-tmp.YWr9Yj inválido (%build)
Status de saída de /var/tmp/rpm-tmp.YWr9Yj inválido (%build)
Erros na construção do RPM:
Could not execute local: rpmbuild --define '_sourcedir /home/filiperosset/rpmbuild/my/failed/adplay' --define '_specdir /home/filiperosset/rpmbuild/my/failed/adplay' --define '_builddir /home/filiperosset/rpmbuild/my/failed/adplay' --define '_srcrpmdir /home/filiperosset/rpmbuild/my/failed/adplay' --define '_rpmdir /home/filiperosset/rpmbuild/my/failed/adplay' --define 'dist .fc29' --define 'fedora 29' --eval '%undefine rhel' --define 'fc29 1' -ba /home/filiperosset/rpmbuild/my/failed/adplay/adplay.spec | tee .build-1.8-1.fc29.log
[filiperosset@raw adplay]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.0.1 20180410 (Red Hat 8.0.1-0.21) (GCC)
The text was updated successfully, but these errors were encountered: