Bug #7637

NML 4.1 fails to compile

Added by Matt about 4 years ago. Updated about 4 years ago.

Status:RejectedStart date:2015-04-26
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.4.1

Description

Tried to update the packages for openSUSE games, but failed.

gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I/usr/include/python3.4m -c nml/_lz77.c -o build/temp.linux-x86_64-3.4/nml/_lz77.o
nml/_lz77.c: In function 'encode':
nml/_lz77.c:105:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
         int max_look = input_size - position + 1;
         ^
nml/_lz77.c:108:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
         int overlap_pos = 0;
         ^
nml/_lz77.c:128:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
             int val = 0x80 | (16 - overlap_len) << 3 | overlap_pos >> 8;
             ^
cc1: some warnings being treated as errors
error: command 'gcc' failed with exit status 1
Makefile:14: recipe for target 'extensions' failed
make: *** [extensions] Error 1

https://build.opensuse.org/package/show/home:Mailaender:branches:games/nml

History

#1 Updated by frosch about 4 years ago

This seems to be an issue with your python 3.4. See here:
https://bugs.python.org/issue21121

Apparently it was fixed in python 3.4.1 or 3.4.2.

#2 Updated by frosch about 4 years ago

Indeed, it is listed as fixed in python 3.4.2rc1: https://docs.python.org/3.4/whatsnew/changelog.html#python-3-4-2rc1

The Suse build server uses 3.4.1: python3-base-3.4.1-4.2.1

If you cannot get an upgrade to 3.4.2, you have to add

extra_compile_args=["-Wno-error=declaration-after-statement"]

as parameter to Extension() in setup.py:45

#3 Updated by frosch about 4 years ago

  • Status changed from New to Rejected

The accelerator module requires C99, so it won't work with python 3.4.0 and 3.4.1.
It works with earlier and later versions though.

Also available in: Atom PDF