Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libXext
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorgxorg
  • lib
  • libXext
  • Issues
  • #4
Closed
Open
Issue created Jul 13, 2022 by BtbN@BtbN

Build failure on aarch64

Since d965a1a8 was applied, building on aarch64 with gcc fails:

 #54 9.783   CC       XEVI.lo
#54 9.860 In file included from XEVI.c:34:
#54 9.860 XEVI.c: In function 'XeviGetVisualInfo':
#54 9.860 reallocarray.h:41:41: error: implicit declaration of function 'reallocarray'; did you mean 'Xreallocarray'? [-Werror=implicit-function-declaration]
#54 9.860    41 | # define Xreallocarray(ptr, n, size)    reallocarray((ptr), (n), (size))
#54 9.860       |                                         ^~~~~~~~~~~~
#54 9.860 reallocarray.h:44:41: note: in expansion of macro 'Xreallocarray'
#54 9.860    44 | #define Xmallocarray(n, size)           Xreallocarray(NULL, (n), (size))
#54 9.860       |                                         ^~~~~~~~~~~~~
#54 9.860 XEVI.c:150:23: note: in expansion of macro 'Xmallocarray'
#54 9.860   150 |         temp_visual = Xmallocarray(n_visual, sz_VisualID32);
#54 9.860       |                       ^~~~~~~~~~~~
#54 9.860 reallocarray.h:41:41: warning: nested extern declaration of 'reallocarray' [-Wnested-externs]
#54 9.860    41 | # define Xreallocarray(ptr, n, size)    reallocarray((ptr), (n), (size))
#54 9.860       |                                         ^~~~~~~~~~~~
#54 9.860 reallocarray.h:44:41: note: in expansion of macro 'Xreallocarray'
#54 9.860    44 | #define Xmallocarray(n, size)           Xreallocarray(NULL, (n), (size))
#54 9.860       |                                         ^~~~~~~~~~~~~
#54 9.860 XEVI.c:150:23: note: in expansion of macro 'Xmallocarray'
#54 9.860   150 |         temp_visual = Xmallocarray(n_visual, sz_VisualID32);
#54 9.860       |                       ^~~~~~~~~~~~
#54 9.861 XEVI.c:150:21: warning: assignment to 'VisualID32 *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
#54 9.861   150 |         temp_visual = Xmallocarray(n_visual, sz_VisualID32);
#54 9.861       |                     ^
#54 9.915   CC       XLbx.lo
#54 9.956 cc1: some warnings being treated as errors
#54 9.959 make[2]: *** [Makefile:545: XEVI.lo] Error 1
#54 9.959 make[2]: *** Waiting for unfinished jobs....
#54 10.04 make[2]: Leaving directory '/stage/libxext/src'
#54 10.04 make[1]: *** [Makefile:491: all-recursive] Error 1
#54 10.04 make[1]: Leaving directory '/stage/libxext'
#54 10.04 make: *** [Makefile:400: all] Error 2

Adding -D_GNU_SOURCE to CFLAGS fixes the issue. Things build just fine for x86_64 targets, so that flag must be not set on aarch64, or it's somehow getting lost.

Edited Jul 13, 2022 by BtbN
Assignee
Assign to
Time tracking