Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Breeder

ZDOOM 2.81. on Pi 2 Compiling Woes

Recommended Posts

Using this guide:

http://zdoom.org/wiki/Compile_ZDoom_on_Linux

I end up here:

Using this guide to compile on my Raspberry Pi 2

http://zdoom.org/wiki/Compile_ZDoom_on_Linux

I end up here:


[ 61%] Building CXX object src/CMakeFiles/zdoom.dir/d_main.cpp.o
/home/pi/zdoom/src/d_main.cpp: In function ‘void D_DoomInit()’:
/home/pi/zdoom/src/d_main.cpp:1980:15: error: ‘_FPU_EXTENDED’ was not declared in this scope
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^
/home/pi/zdoom/src/d_main.cpp:1980:32: error: ‘_FPU_DOUBLE’ was not declared in this scope
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^
src/CMakeFiles/zdoom.dir/build.make:2822: recipe for target 'src/CMakeFiles/zdoom.dir/d_main.cpp.o' failed
make[2]: *** [src/CMakeFiles/zdoom.dir/d_main.cpp.o] Error 1
CMakeFiles/Makefile2:683: recipe for target 'src/CMakeFiles/zdoom.dir/all' failed
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2

Share this post


Link to post
Breeder said:

Using this guide:

http://zdoom.org/wiki/Compile_ZDoom_on_Linux

I end up here:

Using this guide to compile on my Raspberry Pi 2

http://zdoom.org/wiki/Compile_ZDoom_on_Linux

I end up here:


[ 61%] Building CXX object src/CMakeFiles/zdoom.dir/d_main.cpp.o
/home/pi/zdoom/src/d_main.cpp: In function ‘void D_DoomInit()’:
/home/pi/zdoom/src/d_main.cpp:1980:15: error: ‘_FPU_EXTENDED’ was not declared in this scope
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^
/home/pi/zdoom/src/d_main.cpp:1980:32: error: ‘_FPU_DOUBLE’ was not declared in this scope
cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
^
src/CMakeFiles/zdoom.dir/build.make:2822: recipe for target 'src/CMakeFiles/zdoom.dir/d_main.cpp.o' failed
make[2]: *** [src/CMakeFiles/zdoom.dir/d_main.cpp.o] Error 1
CMakeFiles/Makefile2:683: recipe for target 'src/CMakeFiles/zdoom.dir/all' failed
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2


At the top of d_main.cpp, comment out the ifdefs for FPU_CONTROL.h.

Share this post


Link to post
Csonicgo said:

At the top of d_main.cpp, comment out the ifdefs for FPU_CONTROL.h.



This is what it looks like without me touching it...


#ifdef HAVE_FPU_CONTROL
#include <fpu_control.h>
#endif
#include <float.h>



It's already commented out by default isn't it?

Share this post


Link to post

No, it isn't commented out. In C/C++, # isn't a normal comment, it marks a preprocessor directive, which does have an effect on the way the code will be processed and compiled. For example, #include is the standard way to include libraries, and #ifdef and #endif do conditioned processing.

Share this post


Link to post
scifista42 said:

No, it isn't commented out. In C/C++, # isn't a normal comment, it marks a preprocessor directive, which does have an effect on the way the code will be processed and compiled. For example, #include is the standard way to include libraries, and #ifdef and #endif do conditioned processing.



So what would I use then, a ";"?

On a side note, without editing the code, it's now compiling... further than before. That's odd!!!


EDIT: Compiling manually got me to 99%, then it complained because I don't have fmodapi44461linux.tar.gz, which ironically you can't even get from their site atm.

I tried going through the script service and that got to 100%, but then when I went to exit and reboot the system, Retropie informed me twice that it had in fact not been installed.

Share this post


Link to post
Breeder said:

So what would I use then, a ";"?


// commented-out code


or

/*
commented-out code
*/

or you can replace #ifdef HAVE_FPU_CONTROL by #if 0

Share this post


Link to post

EDIT: Thanks, now I know! :)

This is resolved now. First off I didn't realize that I could just install Zdoom through the Retropie-setup script, that would have saved me all this hassle.

Secondly, what I did wrong was install fmod. by using the uninstall command and rebooting, I was then able to install zdoom via the script and all is well.


On a side note I still can't compile on my Laptop, even after having removed the old fmod with uninstall. Here is what I get:

https://dl.dropboxusercontent.com/u/108185675/zdoompc.txt

Share this post


Link to post

What compiler are you using?

Share this post


Link to post

Definitely one that's too old. The ZDoom master branch requires a fully C++11 compliant compiler - even Visual Studio 2013 won't work correctly because some things in there are not C++11 compliant.

VS 2015 is ok, though, and anything older than 2013 will outright refuse to work.

Share this post


Link to post

The error messages complain about lambda functions, which means it at least recognize that they are lambda functions, so if it's a Visual Studio it's probably 2013. Previous compilers would just report a syntax error I guess.

/home/xd3l/zdoom/src/zscript/zcc_expr.cpp: In lambda function:
/home/xd3l/zdoom/src/zscript/zcc_expr.cpp:253:59: error: ‘val’ was not declared in this scope
   { PEX_PreInc  , (PType **)&TypeSInt32,  [](auto *val) { val->IntVal += 1; return val; } },
                                                           ^
/home/xd3l/zdoom/src/zscript/zcc_expr.cpp:253:84: error: unable to deduce lambda return type from ‘val’
   { PEX_PreInc  , (PType **)&TypeSInt32,  [](auto *val) { val->IntVal += 1; return val; } },

Share this post


Link to post

But VC++ 2013 understood auto already, so my guess would be 2012, not 2013. But who knows? 2013 certainly had its issues with C++11 which is why I discontinued using it for anything.

Share this post


Link to post

So in other words... my Linux distro is long over due for an update.

EDIT: No, that didn't help. So what would I do? I'm using Linux Mint 64 bit. A Debian distro.

Share this post


Link to post

There are two base versions of Linux Mint, the original which bases its releases on Ubuntu releases, and Debian Edition, a semi rolling-release based off whatever the state of the latest Debian Testing is.

Then there are multiple versions of Linux Mint, the latest for its Ubuntu based varients is 17.3 "Rosa", which has Cinnamon, Mate, Xfce and Kde varients.

Share this post


Link to post
Danfun64 said:

There are two base versions of Linux Mint, the original which bases its releases on Ubuntu releases, and Debian Edition, a semi rolling-release based off whatever the state of the latest Debian Testing is.

Then there are multiple versions of Linux Mint, the latest for its Ubuntu based varients is 17.3 "Rosa", which has Cinnamon, Mate, Xfce and Kde varients.



17.3 Rosa with Xfce.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×