[MDEV-24215] warning: "MAP_HUGETLB" redefined Created: 2020-11-15  Updated: 2020-11-19  Resolved: 2020-11-16

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.5
Fix Version/s: 10.5.9

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None
Environment:

non x86



 Description   

from collection of builds https://buildd.debian.org/status/package.php?p=mariadb-10.5

https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.5&arch=alpha&ver=1%3A10.5.8-1&stamp=1605284237&raw=0
https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.5&arch=hppa&ver=1%3A10.5.8-1&stamp=1605264422&raw=0

In file included from /<<PKGBUILDDIR>>/mysys/mysys_priv.h:20,
                 from /<<PKGBUILDDIR>>/mysys/array.c:18:
/<<PKGBUILDDIR>>/include/my_sys.h:968: warning: "MAP_HUGETLB" redefined
  968 | #define MAP_HUGETLB 0x40000
      | 
In file included from /usr/include/alpha-linux-gnu/sys/mman.h:41,
                 from /<<PKGBUILDDIR>>/include/my_global.h:444,
                 from /<<PKGBUILDDIR>>/mysys/mysys_priv.h:19,
                 from /<<PKGBUILDDIR>>/mysys/array.c:18:
/usr/include/alpha-linux-gnu/bits/mman.h:38: note: this is the location of the previous definition
   38 | # define MAP_HUGETLB   0x100000 /* Create huge page mapping.  */
      | 
[  0%] Linking C executable simple-t

6cf8f05fd9deb900a78898576b85753e09fedd incorrectly in accounting for linux < 3.8
a) defined it unconditionally
b) assumed incorrectly that all architectures have the same number for MAP_HUGE_SHIFT and MAP_HUGETLB on all architectures.



 Comments   
Comment by Daniel Black [ 2020-11-15 ]

bb-10.5-danielblack-MDEV-24125-MAP_HUGETLB pushed

FYI otto. This was from debian failures.

Note those architectures that have this warning will not have a functional large-page (defaults to off) support. What 0x40000 maps to, e.g. mips MAP_STACK will be used instead.

Comment by Daniel Black [ 2020-11-18 ]

GH commits:
7f30a5c423249c7fcfc9f9ac1578d06263aa37ac
8cc5d2845c0b679ca90cf6145d02c761cbce897d

Comment by Otto Kekäläinen [ 2020-11-18 ]

I've updated downstream issue https://bug.debian.org/975063 with reference to this. Thanks danblack for looking into this and fixing it!

Comment by Daniel Black [ 2020-11-19 ]

+3b486c28f710940631b5cb7a9781965827fbfa4b (needed if there's a warning the the build of my_largepage.c)

Generated at Thu Feb 08 09:28:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.