This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Make is failing in aarch64-none-linux-gnu build

Make is failing in aarch64-none-linux-gnu build using ubuntu18 docker. The same shell script properly worked in ubuntu18 virtual machine.

./../src/Emsg.h:35:1: error: unknown type name 'class'
class Emsg;
^~~~~
./../src/Emsg.h:36:1: error: unknown type name 'class'
class Emsgqueue;
^~~~~
./../src/Emsg.h:37:1: error: unknown type name 'class'
class StringBuilder;
^~~~~
./../src/Emsg.h:49:1: error: unknown type name 'class'
class Emsg
^~~~~
./../src/Emsg.h:50:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
./../src/Emsg.h:80:1: error: unknown type name 'class'
class Emsgqueue
^~~~~
./../src/Emsg.h:81:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
./../src/Emsg.h:100:1: error: unknown type name 'class'
class DbeMessages
^~~~~
./../src/Emsg.h:101:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from mmaptrace.c:32:0:
./../src/elf.h:33:1: error: unknown type name 'class'
class Symbol;
^~~~~
./../src/elf.h:34:1: error: unknown type name 'class'
class DbeFile;
^~~~~
./../src/elf.h:35:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
template <class ITEM> class Vector;
^
./../src/elf.h:36:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
template <typename Key_t, typename Value_t> class Map;
^
./../src/elf.h:64:1: error: unknown type name 'class'
class Elf : public DbeMessages, public Data_window
^~~~~
./../src/elf.h:64:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
class Elf : public DbeMessages, public Data_window
^
./../src/elf.h:147:1: error: unknown type name 'class'
class ElfReloc
^~~~~
./../src/elf.h:148:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from collector.h:28:0,
from mmaptrace.c:38:
libcol_util.h:29:0: warning: "NTXT" redefined
#define NTXT(x) x

In file included from ./../src/util.h:32:0,
from ./../src/Data_window.h:31,
from ./../src/elf.h:30,
from mmaptrace.c:32:
./../src/i18n.h:29:0: note: this is the location of the previous definition
#define NTXT(x) ((char *) (x)) /* x - string literal not to be i18n-ed */

In file included from collector.h:28:0,
from mmaptrace.c:38:
libcol_util.h:30:0: warning: "STXT" redefined
#define STXT(x) x

In file included from ./../src/util.h:32:0,
from ./../src/Data_window.h:31,
from ./../src/elf.h:30,
from mmaptrace.c:32:
./../src/i18n.h:28:0: note: this is the location of the previous definition
#define STXT(x) ((char *) (x)) /* x - static string literal to be i18n-ed */

mmaptrace.c:417:0: warning: "ELF_ST_BIND" redefined
#define ELF_ST_BIND ELF64_ST_BIND

In file included from ./../src/elf.h:27:0,
from mmaptrace.c:32:
./../../include/elf/common.h:1019:0: note: this is the location of the previous definition
#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4)

mmaptrace.c:418:0: warning: "ELF_ST_TYPE" redefined
#define ELF_ST_TYPE ELF64_ST_TYPE

In file included from ./../src/elf.h:27:0,
from mmaptrace.c:32:
./../../include/elf/common.h:1020:0: note: this is the location of the previous definition
#define ELF_ST_TYPE(val) ((val) & 0xF)

mmaptrace.c:415:21: error: unknown type name 'Elf64_auxv_t'
#define ELF_AUX Elf64_auxv_t
^
mmaptrace.c:906:8: note: in expansion of macro 'ELF_AUX'
static ELF_AUX *auxv = NULL;
^~~~~~~
mmaptrace.c: In function 'process_vsyscall_page':
mmaptrace.c:415:21: error: 'Elf64_auxv_t' undeclared (first use in this function); did you mean 'Elf64_Dyn'?
#define ELF_AUX Elf64_auxv_t
^
mmaptrace.c:953:15: note: in expansion of macro 'ELF_AUX'
auxv = (ELF_AUX*) envp;
^~~~~~~
mmaptrace.c:415:21: note: each undeclared identifier is reported only once for each function it appears in
#define ELF_AUX Elf64_auxv_t
^
mmaptrace.c:953:15: note: in expansion of macro 'ELF_AUX'
auxv = (ELF_AUX*) envp;
^~~~~~~
mmaptrace.c:953:23: error: expected expression before ')' token
auxv = (ELF_AUX*) envp;
^
mmaptrace.c:957:12: error: 'ap' undeclared (first use in this function); did you mean 'Heap'?
ELF_AUX *ap;
^~
Heap
mmaptrace.c:411:21: error: unknown type name 'Elf64_Ehdr'; did you mean 'Elf64_Dyn'?
#define ELF_EHDR Elf64_Ehdr
^
mmaptrace.c:968:3: note: in expansion of macro 'ELF_EHDR'
ELF_EHDR *ehdr = NULL;
^~~~~~~~
mmaptrace.c:411:21: error: 'Elf64_Ehdr' undeclared (first use in this function); did you mean 'Elf64_Dyn'?
#define ELF_EHDR Elf64_Ehdr
^
mmaptrace.c:974:12: note: in expansion of macro 'ELF_EHDR'
ehdr = (ELF_EHDR*)(intptr_t) ap->a_un.a_val;
^~~~~~~~
mmaptrace.c:974:21: error: expected expression before ')' token
ehdr = (ELF_EHDR*)(intptr_t) ap->a_un.a_val;
^
mmaptrace.c:974:33: error: expected ';' before 'ap'
ehdr = (ELF_EHDR*)(intptr_t) ap->a_un.a_val;
^~
mmaptrace.c:413:21: error: unknown type name 'Elf64_Shdr'; did you mean 'Elf64_Dyn'?
#define ELF_SHDR Elf64_Shdr
^
mmaptrace.c:998:7: note: in expansion of macro 'ELF_SHDR'
ELF_SHDR *shdr = (ELF_SHDR*) (base + ehdr->e_shoff);
^~~~~~~~
mmaptrace.c:413:21: error: 'Elf64_Shdr' undeclared (first use in this function); did you mean 'Elf64_Ehdr'?
#define ELF_SHDR Elf64_Shdr
^
mmaptrace.c:998:25: note: in expansion of macro 'ELF_SHDR'
ELF_SHDR *shdr = (ELF_SHDR*) (base + ehdr->e_shoff);
^~~~~~~~
mmaptrace.c:998:34: error: expected expression before ')' token
ELF_SHDR *shdr = (ELF_SHDR*) (base + ehdr->e_shoff);
^
mmaptrace.c:1046:27: error: request for member 'e_shnum' in something not a structure or union
for (i = 1; i < ehdr->e_shnum; i++)
^~
mmaptrace.c:1047:13: error: request for member 'sh_type' in something not a structure or union
if (shdr[i].sh_type == SHT_DYNSYM)
^
mmaptrace.c:1054:44: error: request for member 'sh_link' in something not a structure or union
char *symbase = base + shdr[shdr[dynSec].sh_link].sh_offset;
^
mmaptrace.c:416:21: error: unknown type name 'Elf64_Sym'; did you mean 'Elf64_Dyn'?
#define ELF_SYM Elf64_Sym
^
mmaptrace.c:1055:4: note: in expansion of macro 'ELF_SYM'
ELF_SYM *symbols = (ELF_SYM*) (base + shdr[dynSec].sh_offset);
^~~~~~~
mmaptrace.c:416:21: error: 'Elf64_Sym' undeclared (first use in this function); did you mean 'Elf64_Dyn'?
#define ELF_SYM Elf64_Sym
^
mmaptrace.c:1055:24: note: in expansion of macro 'ELF_SYM'
ELF_SYM *symbols = (ELF_SYM*) (base + shdr[dynSec].sh_offset);
^~~~~~~
mmaptrace.c:1055:32: error: expected expression before ')' token
ELF_SYM *symbols = (ELF_SYM*) (base + shdr[dynSec].sh_offset);
^
mmaptrace.c:1057:24: error: request for member 'sh_size' in something not a structure or union
int n = shdr[dynSec].sh_size / shdr[dynSec].sh_entsize;
^
mmaptrace.c:1057:47: error: request for member 'sh_entsize' in something not a structure or union
int n = shdr[dynSec].sh_size / shdr[dynSec].sh_entsize;
^
mmaptrace.c:1060:17: error: 'sym' undeclared (first use in this function); did you mean 'sync'?
ELF_SYM *sym = symbols + i;
^~~
sync
In file included from ./../src/elf.h:27:0,
from mmaptrace.c:32:
./../../include/elf/common.h:1028:24: warning: implicit declaration of function 'ELF_ST_BIND' [-Wimplicit-function-declaration]
#define ELF64_ST_BIND ELF_ST_BIND
^
mmaptrace.c:417:21: note: in expansion of macro 'ELF64_ST_BIND'
#define ELF_ST_BIND ELF64_ST_BIND
^~~~~~~~~~~~~
mmaptrace.c:1072:5: note: in expansion of macro 'ELF_ST_BIND'
ELF_ST_BIND (sym->st_info) != STB_GLOBAL || ELF_ST_TYPE (sym->st_info) != STT_FUNC)
^~~~~~~~~~~
./../../include/elf/common.h:1029:24: warning: implicit declaration of function 'ELF_ST_TYPE' [-Wimplicit-function-declaration]
#define ELF64_ST_TYPE ELF_ST_TYPE
^
mmaptrace.c:418:21: note: in expansion of macro 'ELF64_ST_TYPE'
#define ELF_ST_TYPE ELF64_ST_TYPE
^~~~~~~~~~~~~
mmaptrace.c:1072:49: note: in expansion of macro 'ELF_ST_TYPE'
ELF_ST_BIND (sym->st_info) != STB_GLOBAL || ELF_ST_TYPE (sym->st_info) != STT_FUNC)
^~~~~~~~~~~
mmaptrace.c:1085:39: error: request for member 'sh_offset' in something not a structure or union
char *bgn = base + shdr[curSec].sh_offset;
^
mmaptrace.c:1086:38: error: request for member 'sh_size' in something not a structure or union
char *end = bgn + shdr[curSec].sh_size;
^
mmaptrace.c:1135:35: error: request for member 'sh_offset' in something not a structure or union
(void*) (base + shdr[curSec].sh_offset), shdr[curSec].sh_size, 0, NULL);
^
mmaptrace.c:1135:60: error: request for member 'sh_size' in something not a structure or union
(void*) (base + shdr[curSec].sh_offset), shdr[curSec].sh_size, 0, NULL);
^
mmaptrace.c:1144:68: error: request for member 'sh_offset' in something not a structure or union
sysfuncvaddr[nvsysfuncs] = (unsigned long) (base + shdr[curSec].sh_offset);
^
mmaptrace.c:1145:60: error: request for member 'sh_size' in something not a structure or union
sysfuncsize[nvsysfuncs] = (unsigned long) (shdr[curSec].sh_size);
^
Makefile:653: recipe for target 'libgp_collector_la-mmaptrace.lo' failed
make[5]: *** [libgp_collector_la-mmaptrace.lo] Error 1
make[5]: Leaving directory '/workspace/build/src/ARM-GDB/gprofng/libcollector'
Makefile:479: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/workspace/build/src/ARM-GDB/gprofng/libcollector'
Makefile:472: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/workspace/build/src/ARM-GDB/gprofng'
Makefile:404: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/workspace/build/src/ARM-GDB/gprofng'
Makefile:7435: recipe for target 'all-gprofng' failed
make[1]: *** [all-gprofng] Error 2
make[1]: Leaving directory '/workspace/build/src/ARM-GDB'
Makefile:1004: recipe for target 'all' failed
make: *** [all] Error 2
Failed on line: 36 at command: make