Opened 5 months ago

Last modified 5 weeks ago

#12421 pending defect (pending)

BUILD: Scummvm Fails to Compile with GCC v10.3.0

Reported by: rubyFeedback Owned by: sev-
Priority: normal Component: Ports
Version: Keywords:
Cc: Game:

Description (last modified by digitall)

Not sure what the error is ...

./configure --prefix=/home/Programs/Scummvm/2.2.0/

Running ScummVM configure...
Looking for C++ compiler... g++
Checking for compiler version... 10.3.0, ok
Building as C++11... no
Checking best debug mode... -g + split DWARF + Gold + var tracking
Checking for whether C++ compiler accepts -Wglobal-constructors... no
Checking for whether C++ compiler accepts -Wno-undefined-var-template... no
Checking for whether C++ compiler accepts -Wno-pragma-pack... no
Checking endianness... /usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtbegin.o: unknown program property type 0xc0010002 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtbegin.o: unknown program property type 0xc0010001 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Temp/cchxxKUI.o: unknown program property type 0xc0010002 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Temp/cchxxKUI.o: unknown program property type 0xc0010001 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtend.o: unknown program property type 0xc0010002 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtend.o: unknown program property type 0xc0010001 in .note.gnu.property section
little
Checking 64-bitness... yes
Type with 1 byte... char
Type with 2 bytes... short
Type with 4 bytes... int
Type with 8 bytes... long
Alignment required... no
Checking host CPU architecture... x86_64
Checking hosttype... linux-gnu
Checking for pkg-config... yes
Looking for sdl-config... /usr/binsdl2-config
Checking for SDL... yes
Checking for SDL_Net... no
Checking if host is POSIX compliant... yes
Checking if posix_spawn is supported... yes
Checking whether to have a verbose build... no
Checking whether building plugins was requested... no
Checking for Ogg... yes
Checking for TTS libraries... no
Checking for Vorbis... yes
Checking for Tremor... no (Vorbis/Tremor support is mutually exclusive)
Checking for OPL2LPT... no
Checking for FLAC >= 1.0.1... yes
Checking for MAD... yes
Checking for ALSA >= 0.9... yes
Checking for libjpeg >= v6b... yes
Checking for PNG >= 1.2.8... yes
Checking for libtheoradec >= 1.0... yes
Checking for libfaad... no
Checking for SEQ MIDI... yes
Checking for sndio... no
Checking for TiMidity... yes
Checking for zlib... yes
Checking for libmpeg2 >= 0.4.0... no
Checking for liba52... No accelerated IMDCT transform found
yes
Looking for curl-config... /usr/bin
curl-config
Checking for libcurl... yes
Cloud integration... servers
Checking for FluidSynth... no
Checking for readline... skipping (text console disabled)
Checking for libunity... no
Checking for gtk... yes
Checking for FreeType2... yes
Checking for OpenGL... yes (runtime detection)
Checking whether iconv.h is present... yes
Checking whether iconv needs linking against libiconv... no
Checking signature of iconv... iconv_t, char , size_t *, char , size_t *
Checking for iconv... yes
Checking for Linux CD-ROM... yes
Checking for FriBidi... yes
Test C++11 compatibility during compilation... no
Checking for Discord RPC... no
Building translation support... yes (with runtime language detection)
Building taskbar integration support... no
Building system dialogs support... gtk
Building text-to-speech support... no
Building Bink video support... yes
Building updates support... no
Enabling Address Sanitizer... no
Enabling Thread Sanitizer... no
Backend... sdl (2.0.12), 16bit color, high resolution, savegame timestamp, HQ scalers, MT-32 emulator, Lua, Nuked OPL emulator, cloud

Engines (builtin):

SCUMM [all games]
Access
ADL
AGI
AGOS [all games]
Beavis and Butthead in Virtual Stupidity
Blade Runner
CGE
CGE2
Cinematique evo 1
Magic Composer
Cinematique evo 2
Cryo Omni3D games [all games]
Dragon History
Blazing Dragons
Drascula: The Vampire Strikes Back
Dreamweb
Full Pipe
Glk Interactive Fiction games
UFOs
Gobli*ns
The Griffon Legend
Groovie [7th Guest]
Hyperspace Delivery Boy!
Hopkins FBI
Hugo Trilogy
Illusions Engine
Kyra [all games]
Labyrinth of Time
Lure of the Temptress
MADE
MADS
Mohawk [Living Books] [Myst] [Myst ME] [Riven: The Sequel to Myst]
Mortevielle
Neverhood
Parallaction
The Journeyman Project: Pegasus Prime
Plumbers Don't Wear Ties
The Prince and The Coward
Flight of the Amazon Queen
SAGA [ITE] [IHNM]
SCI [all games]
The Lost Files of Sherlock Holmes
Beneath a Steel Sky
Mission Supernova
Broken Sword
Broken Sword II
Broken Sword 2.5
Teen Agent
Tinsel
Starship Titanic
3 Skulls of the Toltecs
Tony Tough and the Night of Roasted Moths
Toonstruck
Touche: The Adventures of the Fifth Musketeer
TsAGE
Bud Tucker in Double Trouble
Ultima
Voyeur
Wintermute [all games]
World of Xeen
Z-Vision

Engines Skipped:

Lord Avalot d'Argent
Chewy: Esc from F5
Lost Eden
Macromedia Director
Dungeon Master
Groovie [Groovie 2 games]
Kingdom: The Far Reaches
The Last Express
Lilliput
MacVenture
Mohawk [Where in Time is Carmen Sandiego?]
Mutation of JB
Red Comrades
Pink Panther
SAGA [SAGA 2 games]
Sludge
Star Trek 25th Anniversary/Judgment Rites
TestBed: the Testing framework
WAGE

Creating config.h
Creating config.mk
Creating engines/engines.mk
Creating engines/plugins_table.h

make

fatal: not a git repository (or any of the parent directories): .git

C++ backends/platform/sdl/sdl.o

In file included from ./common/stream.h:26,

from ./common/savefile.h:28,
from ./gui/EventRecorder.h:29,
from backends/platform/sdl/sdl.cpp:27:

./common/endian.h:49:3: error: #error No endianness defined

49 | # error No endianness defined

|

In file included from ./common/util.h:27,

from ./common/algorithm.h:28,
from ./common/array.h:27,
from ./common/system.h:28,
from ./backends/base-backend.h:26,
from ./backends/modular-backend.h:26,
from ./backends/platform/sdl/sdl.h:28,
from backends/platform/sdl/sdl.cpp:25:

./common/str.h:51:15: error: ‘uint32’ does not name a type; did you mean ‘Uint32’?

51 | static const uint32 npos = 0xFFFFFFFF;

| ~
| Uint32

./common/str.h:77:15: error: ‘uint32’ does not name a type; did you mean ‘Uint32’?

77 | static const uint32 _builtinCapacity = 32 - sizeof(uint32) - sizeof(char *);

| ~
| Uint32

...

Change History (9)

comment:1 by rubyFeedback, 5 months ago

I could compile scummvm 2.2.0 with gcc 10.2.0 just fine;
perhaps something changed in my local SDL setup (I don't
remember), but I can 100% say that I could compile 2.2.0
just fine with gcc 10.2.0 as-is. Either way, whatever the
error may be, could perhaps be some notification be used
to explain why this failed or will fail to compile? Perhaps
even at configure-check. I can recompile SDL just fine,
but right now the error message does not tell me much.

comment:2 by digitall, 5 months ago

Component: --Unset--Ports
Description: modified (diff)
Keywords: fails to compile removed
Summary: Can not compile scummvm it seems with gcc 10.3.0BUILD: Scummvm Fails to Compile with GCC v10.3.0

comment:3 by digitall, 5 months ago

rubyFeedback: You haven't really included sufficient detail to allow replication of this build issue, specifically as per the bug tracker landing page:
"Your OS, including version and device if appropriate (Windows 10 build 1709 32-bit, Debian 9.2 x86_64, Android 7.0 on Samsung Galaxy S7, ...) "

Given the "/home/Programs" path, I infer this is likely to be MacOS / OSX and thus likely you have installed the compiler via homebrew?

I would suggest trying rolling back to GCC v10.2.0 which is working fine for me to eliminate other build environment issues i.e. libSDL, though it looks like something is hinky with your linker and has broken the endianess check and write out to the config header i.e.

Checking endianness... /usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtbegin.o: unknown program property type 0xc0010002 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtbegin.o: unknown program property type 0xc0010001 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Temp/cchxxKUI.o: unknown program property type 0xc0010002 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Temp/cchxxKUI.o: unknown program property type 0xc0010001 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtend.o: unknown program property type 0xc0010002 in .note.gnu.property section
/usr/bin/ld.gold: warning: /home/Programs/Gcc/10.3.0/lib/gcc/x86_64-pc-linux-gnu/10.3.0/crtend.o: unknown program property type 0xc0010001 in .note.gnu.property section
little

All of the errors that follow track from ./common/endian.h:49:3: error: #error No endianness defined ... which should have killed the compilation as that is a fatal error: https://gcc.gnu.org/onlinedocs/cpp/Diagnostics.html

comment:4 by sev-, 5 months ago

Yes, something is fishy with the compiler environment, so it refused to compile our endianness patch.

However, given the output, this should be made as a fatal error in the configure and we cannot continue.

I assume, that nobody anticipated that this could not compile...

@rubyFeedback, it would be nice if you could come to the Discord and we have an interactive debugging session.

In the meantime, I'll make this as a fatal error.

comment:5 by sev-, 5 months ago

Actually, I was too hasty with the above.

We do raise a fatal error when the endianness test is not passing. Closer inspection shows that the test above was ending with 'little' as the result.

However, why there is no endianness defined is super weird. I would like to see your config.h, config.mk and config.log files after you run the configure script.

comment:6 by dwatteau, 5 months ago

@sev: I wonder if this couldn't be related to https://src.fedoraproject.org/rpms/scummvm/blob/rawhide/f/gcc-lto-2.2.0.patch which Fedora has to work around (and I also wonder if this wasn't the reason behind bug #10695).

comment:7 by sev-, 4 months ago

I do not think it is related, because the architecture of the bug reporter is x86_64 and is correctly identified as little endian.

The problem lies in another area. I need to see the files I mention in order to understand what is going on.

comment:8 by eriktorbjorn, 4 months ago

https://bugzilla.redhat.com/show_bug.cgi?id=1916925 talks about a similar error message, but I don't know if that's related either.

comment:9 by sev-, 5 weeks ago

Owner: set to sev-
Resolution: pending
Status: newpending
Note: See TracTickets for help on using tickets.