redeclipse / base

Base environment for Red Eclipse and associated source files.
https://redeclipse.net/
424 stars 86 forks source link

Newer versions of Redeclipse Fail to Build on GNU/Linux when flags "-Werror,-Wformat-security" present. #1466

Closed JamesClarke7283 closed 4 months ago

JamesClarke7283 commented 4 months ago
engine/octarender.cpp:1804:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(0); if(load) initlights();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1804:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1805:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(1); clearvas(worldroot);
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1805:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1806:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(2); resetqueries();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1806:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1807:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(3); resetclipplanes();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1807:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1808:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(4); if(load) initenvtexs();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1808:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1809:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(5); entitiesinoctanodes();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1809:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1810:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(6); tjoints.setsize(0);
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1810:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1811:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(7); if(filltjoints) findtjoints();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1811:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1812:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(8); octarender();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1812:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1813:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(9); if(load) precachetextures();
    ^~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1813:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1814:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(10); hazesurf.create();
    ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1814:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1815:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(11); setupmaterials();
    ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1815:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1816:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(12); clearshadowcache();
    ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1816:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1817:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(13); updatevabbs(true);
    ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1817:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1818:5: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    PROGRESS(14); entities::allchanged(load);
    ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1818:5: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1821:9: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
        PROGRESS(15); genshadowmeshes();
        ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1821:9: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1822:9: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
        PROGRESS(16); updateblendtextures();
        ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1822:9: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1823:9: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
        PROGRESS(17); seedparticles();
        ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1823:9: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
engine/octarender.cpp:1824:9: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
        PROGRESS(18); genenvtexs();
        ^~~~~~~~~~~~
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^~~~~~~~~~~~~
engine/octarender.cpp:1824:9: note: treat the string as an argument to avoid this
engine/engine.h:868:68: note: expanded from macro 'PROGRESS'
#define PROGRESS(n) progress(((n) + 1) / float(max(progsteps, 1)), progresstitle)
                                                                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [<builtin>: engine/octarender.o] Error 1
make: Leaving directory '/home/james/.cache/yay/redeclipse-dev/src/redeclipse-dev/src'
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: redeclipse-dev-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
redeclipse-dev - exit status 4
JamesClarke7283 commented 4 months ago

I don't know whats causing these flags to be added, but manually compiling from source seems to work, reason is those flags are not present when compiling. the PKGBUILD does not add those flags, it even adds the flags when i use "makepkg" manually. very odd. At the very least these warnings should be resolved from a code quality/security perspective.