Closed ahmam closed 1 year ago
I encountered similar errors when trying to build from an Ubuntu 18.04 Singularity container. Adding the -DNO_ASM=ON
flag to cmake skips the assembler specific compilation.
However, I then encounter an error when the compiler tries to turn off extended floating point (an x86 feature I believe):
[ 33%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/d_main.cpp.o
/root/ViZDoom/src/vizdoom/src/d_main.cpp: In function 'void D_DoomInit()':
/root/ViZDoom/src/vizdoom/src/d_main.cpp:2233:15: error: '_FPU_EXTENDED' was not declared in this scope
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^~~~~~~~~~~~~
/root/ViZDoom/src/vizdoom/src/d_main.cpp:2233:15: note: suggested alternative: '_FPU_RESERVED'
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^~~~~~~~~~~~~
_FPU_RESERVED
/root/ViZDoom/src/vizdoom/src/d_main.cpp:2233:32: error: '_FPU_DOUBLE' was not declared in this scope
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^~~~~~~~~~~
/root/ViZDoom/src/vizdoom/src/d_main.cpp:2233:32: note: suggested alternative: '_FPU_DEFAULT'
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^~~~~~~~~~~
_FPU_DEFAULT
/root/ViZDoom/src/vizdoom/src/d_main.cpp: In function 'void D_DoAdvanceDemo()':
/root/ViZDoom/src/vizdoom/src/d_main.cpp:1522:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (gameinfo.advisoryTime)
^~
/root/ViZDoom/src/vizdoom/src/d_main.cpp:1531:2: note: here
case 1:
^~~~
/root/ViZDoom/src/vizdoom/src/d_main.cpp:1533:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (!M_DemoNoPlay)
^~
/root/ViZDoom/src/vizdoom/src/d_main.cpp:1552:2: note: here
default:
^~~~~~~
src/vizdoom/src/CMakeFiles/vizdoom.dir/build.make:964: recipe for target 'src/vizdoom/src/CMakeFiles/vizdoom.dir/d_main.cpp.o' failed
make[2]: *** [src/vizdoom/src/CMakeFiles/vizdoom.dir/d_main.cpp.o] Error 1
CMakeFiles/Makefile2:940: recipe for target 'src/vizdoom/src/CMakeFiles/vizdoom.dir/all' failed
make[1]: *** [src/vizdoom/src/CMakeFiles/vizdoom.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Commenting out the related lines lets compilation proceed, but then generates another error:
[ 46%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/p_spec.cpp.o
/root/ViZDoom/src/vizdoom/src/p_spec.cpp: In function 'void P_InitSectorSpecial(sector_t*, int, bool)':
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
};
^
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1282:4: error: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:1295:50: warning: left shift of negative value [-Wshift-negative-value]
(-FRACUNIT/2)<<(sector->special - Carry_East5),
^
/root/ViZDoom/src/vizdoom/src/p_spec.cpp: In function 'bool P_TestActivateLine(line_t*, AActor*, int, int)':
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:353:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (line->args[1] >= 64)
^~
/root/ViZDoom/src/vizdoom/src/p_spec.cpp:357:5: note: here
case Teleport:
^~~~
It seems GCC 7.3 switched narrowing warnings to errors. Adding -Wno-narrowing
to the previous make step passes.
Then the following error:
[ 32%] Building CXX object src/vizdoom/src/CMakeFiles/vizdoom.dir/xlat/parse_xlat.cpp.o
In file included from /root/ViZDoom/src/vizdoom/src/xlat/parse_xlat.cpp:161:0:
xlat_parser.y: In function 'void yy_reduce(yyParser*, int)':
xlat_parser.y:101:80: error: 'union YYMINORTYPE' has no member named 'yy'; did you mean 'yy0'?
FLineTrans(special&0xffff, flags+arg.addflags, arg.args[0], arg.args[1], arg.args[2], arg.args[3], arg.args[4]));
^~
yy0
xlat_parser.y:101:83: error: unable to find numeric literal operator 'operator""addflags'
FLineTrans(special&0xffff, flags+arg.addflags, arg.args[0], arg.args[1], arg.args[2], arg.args[3], arg.args[4]));
^~~~~~~~~~~~
xlat_parser.y:101:83: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
xlat_parser.y:101:113: error: 'union YYMINORTYPE' has no member named 'yy'; did you mean 'yy0'?
ial&0xffff, flags+arg.addflags, arg.args[0], arg.args[1], arg.args[2], arg.args[3], arg.args[4]));
^~
yy0
xlat_parser.y:101:116: error: unable to find numeric literal operator 'operator""args'
^
xlat_parser.y:101:116: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
In file included from /root/ViZDoom/src/vizdoom/src/xlat/parse_xlat.cpp:161:0:
xlat_parser.y:101:145: error: 'union YYMINORTYPE' has no member named 'yy'; did you mean 'yy0'?
FLineTrans(special&0xffff, flags+arg.addflags, arg.args[0], arg.args[1], arg.args[2], arg.args[3], arg.args[4]));
....
xlat_parser.y:332:14: error: 'union YYMINORTYPE' has no member named 'yy'; did you mean 'yy0'?
A->filter = B;
^~
yy0
xlat_parser.y:332:20: error: base operand of '->' is not a pointer
A->filter = B;
Downgrading to Ubuntu 16.04 and gcc 4.8.5, vizdoom compiles with cmake ... -DNO_ASM=ON
.
Old issue, partially solved, closing.
I tried to install Vizdoom from a conda environment on a power9 server with a redhat7 and i got this error. Red Hat Enterprise Linux Server release 7.5 (Maipo) -cmake version 2.8.12.2 -gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) -GNU Make 3.82 -Boost libraries 1.34 -ViZDoom version 1.1.4 -Python 3 -openjdk version "1.8.0_171" -OpenJDK Runtime Environment (build 1.8.0_171-b10) -OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode) -I have installed all the necessary dependencies
conda create -n my_vizdoom python=3.6 pip cmake numpy
source activate my_vizdoom
pip install vizdoom==1.1.4