[Scummvm-tracker] [ScummVM :: Bugs] #13090: SYMBIAN: Build Failure Due to Certain Array Declaration Formats
ScummVM :: Bugs
trac at scummvm.org
Fri Jan 28 20:50:56 UTC 2022
#13090: SYMBIAN: Build Failure Due to Certain Array Declaration Formats
-----------------------------+---------------------------------------------
Reporter: fedor4ever | Owner: fedor4ever
Type: defect | Status: closed
Priority: normal | Component: Engine: Ultima
Version: | Resolution: fixed
Keywords: Symbian, build | Game: Ultima IV: Quest of the Avatar
error |
-----------------------------+---------------------------------------------
Changes (by fedor4ever):
* owner: sev- => fedor4ever
* status: new => closed
* resolution: => fixed
Old description:
> I look for initialization pointer to member and found nothing. This is
> bad code that violate C++ standart if there no initialization -
> https://isocpp.org/wiki/faq/pointers-to-members
>
> I got error while building 2.5.0 release for Symbian:
> {{{
> elf2e32 : Error: E1066: Image failed validation
> line 427
> make[1]: ***
> [\Symbian\S60_5th_Edition_SDK_v1.0\epoc32\release\gcce\urel\Neverhoode.exe]
> Error 1
> make: *** [TARGET] Error 2
> }}}
>
> I dig more deeper and found in
> scummvm\engines\ultima\ultima4\game\item.cpp struct array declaration
> ItemLocation Items::ITEMS[N_ITEMS]. Commentin it's body solve error.
>
> After commented body I inserting several zero initialazers:
> {{{
> { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, 0 }
> }}}
> Build success.
> Uncomment one initialazer - build success.
> Uncomment another initialazer - build error.
> Inserting function pointer in several zero initialazers trigger build
> error too.
>
> scummvm/engines/ultima/nuvie/usecode/u6_object_types.h has similar struct
> array which cause same error.
>
> scummvm/engines/ultima/nuvie/keybinding/keys.cpp - has Action
> NuvieActions[] with normal functions pointers - ScummVM builds and runs.
New description:
Fixed by lephilousophe commit. Ultima 4&6 works! Thanks!
I look for initialization pointer to member and found nothing. This is bad
code that violate C++ standart if there no initialization -
https://isocpp.org/wiki/faq/pointers-to-members
I got error while building 2.5.0 release for Symbian:
{{{
elf2e32 : Error: E1066: Image failed validation
line 427
make[1]: ***
[\Symbian\S60_5th_Edition_SDK_v1.0\epoc32\release\gcce\urel\Neverhoode.exe]
Error 1
make: *** [TARGET] Error 2
}}}
I dig more deeper and found in
scummvm\engines\ultima\ultima4\game\item.cpp struct array declaration
ItemLocation Items::ITEMS[N_ITEMS]. Commentin it's body solve error.
After commented body I inserting several zero initialazers:
{{{
{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, 0 }
}}}
Build success.
Uncomment one initialazer - build success.
Uncomment another initialazer - build error.
Inserting function pointer in several zero initialazers trigger build
error too.
scummvm/engines/ultima/nuvie/usecode/u6_object_types.h has similar struct
array which cause same error.
scummvm/engines/ultima/nuvie/keybinding/keys.cpp - has Action
NuvieActions[] with normal functions pointers - ScummVM builds and runs.
--
--
Ticket URL: <https://bugs.scummvm.org/ticket/13090#comment:21>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list