Page 1 of 1

[SOLVED] Cannot compile (Model3GraphicsState.h)

PostPosted: Tue Dec 14, 2021 12:14 pm
by zuppa_di_pesce
Code: Select all
In file included from Src/OSD/SDL/Main.cpp:451:
Src/Model3/Model3GraphicsState.h: In member function ‘virtual void CModel3GraphicsState::RenderFrame()’:
Src/Model3/Model3GraphicsState.h:74:5: error: ‘BeginFrameVideo’ was not declared in this scope
   74 |     BeginFrameVideo();
      |     ^~~~~~~~~~~~~~~
Src/Model3/Model3GraphicsState.h:80:5: error: ‘EndFrameVideo’ was not declared in this scope
   80 |     EndFrameVideo();
      |     ^~~~~~~~~~~~~
Am I missing some packages?
Code: Select all
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/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++,fortran,objc,obj-c++,ada,go,d,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=/builddir/build/BUILD/gcc-11.2.1-20211203/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20211203 (Red Hat 11.2.1-7) (GCC)

Re: Fedora 35: cannot compile (Model3GraphicsState.h)

PostPosted: Tue Dec 14, 2021 4:54 pm
by rokfpoewrkcpoqwkcp
I also get compile errors using gcc at the moment.
I use gcc in Msys2 - Windows 10. (gcc version 11.2.0)

Compiling without the -j switch seems to work.
I guess there has been a change with gcc?

Re: Fedora 35: cannot compile (Model3GraphicsState.h)

PostPosted: Wed Dec 15, 2021 4:54 am
by zuppa_di_pesce
rokfpoewrkcpoqwkcp wrote:Compiling without the -j switch seems to work
SOLVED! Thank you. 8-)

Re: [SOLVED] Cannot compile (Model3GraphicsState.h)

PostPosted: Wed Dec 15, 2021 7:49 am
by gm_matthew
Model3GraphicsState.h should only be included if the DEBUG option is enabled, so I'm not sure why it's being compiled at all.

In any case, I've fixed the cause of the build error in the latest SVN.

Re: [SOLVED] Cannot compile (Model3GraphicsState.h)

PostPosted: Wed Dec 15, 2021 3:18 pm
by Shoegazer
R869/R870 breaks compilation on linux test systems (R868 compiles okay):

Information:
* OS: Linux Mint 20.2 / kernel 5.13
* Compiler: gcc-11.2.0
* Compile log:

Code: Select all
Checked out revision 870.
Creating directory     : bin
Creating directory     : obj
Generating dependencies: Src/CPU/PowerPC/PPCDisasm.cpp -> obj/PPCDisasm.d
Compiling              : Src/CPU/PowerPC/PPCDisasm.cpp -> obj/PPCDisasm.o
Generating dependencies: Src/BlockFile.cpp -> obj/BlockFile.d
Compiling              : Src/BlockFile.cpp -> obj/BlockFile.o
/bin/sh: 1: cannot create obj/PPCDisasm.d: Directory nonexistent
make: *** [Makefiles/Rules.inc:279: obj/PPCDisasm.o] Error 2
make: *** Waiting for unfinished jobs....
Src/BlockFile.cpp: In member function ‘void CBlockFile::ReadString(std::string*, uint32_t)’:
Src/BlockFile.cpp:51:10: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   51 |     fread(&c, sizeof(char), 1, fp);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Src/BlockFile.cpp: In member function ‘unsigned int CBlockFile::ReadDWord(uint32_t*)’:
Src/BlockFile.cpp:73:8: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   73 |   fread(data, sizeof(uint32_t), 1, fp);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: [SOLVED] Cannot compile (Model3GraphicsState.h)

PostPosted: Wed Dec 15, 2021 3:56 pm
by gm_matthew
Shoegazer wrote:R869/R870 breaks compilation on linux test systems (R868 compiles okay):

Information:
* OS: Linux Mint 20.2 / kernel 5.13
* Compiler: gcc-11.2.0
* Compile log:

Code: Select all
Checked out revision 870.
Creating directory     : bin
Creating directory     : obj
Generating dependencies: Src/CPU/PowerPC/PPCDisasm.cpp -> obj/PPCDisasm.d
Compiling              : Src/CPU/PowerPC/PPCDisasm.cpp -> obj/PPCDisasm.o
Generating dependencies: Src/BlockFile.cpp -> obj/BlockFile.d
Compiling              : Src/BlockFile.cpp -> obj/BlockFile.o
/bin/sh: 1: cannot create obj/PPCDisasm.d: Directory nonexistent
make: *** [Makefiles/Rules.inc:279: obj/PPCDisasm.o] Error 2
make: *** Waiting for unfinished jobs....
Src/BlockFile.cpp: In member function ‘void CBlockFile::ReadString(std::string*, uint32_t)’:
Src/BlockFile.cpp:51:10: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   51 |     fread(&c, sizeof(char), 1, fp);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Src/BlockFile.cpp: In member function ‘unsigned int CBlockFile::ReadDWord(uint32_t*)’:
Src/BlockFile.cpp:73:8: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   73 |   fread(data, sizeof(uint32_t), 1, fp);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The error appears to be "cannot create obj/PPCDisasm.d: Directory nonexistent"... I'm confused, is it failing to create the obj folder for some reason?

Re: [SOLVED] Cannot compile (Model3GraphicsState.h)

PostPosted: Wed Dec 15, 2021 4:09 pm
by Shoegazer
It seemed that way. That said, when I tried compiling again, it succeeded(!)

My only guess is that supermodel can compile so fast that sometimes certain tasks such as the one in the log above complete before they should (a race condition of sorts). This project compiles in less than 30 seconds on this system (Intel i7-10870H), with -j9 specified. In any event, probably not something worth worrying too much about.