Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 828830

Summary: sys-libs/libhugetlbfs-2.23 - alloc.c: error: _SC_LEVEL2_CACHE_LINESIZE undeclared (first use in this function)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: base-system
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/26539
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
sys-libs:libhugetlbfs-2.23:20211210-101828.log
temp.tar.bz2

Description Toralf Förster gentoo-dev 2021-12-10 15:35:04 UTC
      |                                                   ^~~~~~~
make: *** [Makefile:305: obj64/shm.o] Error 1
make: *** Waiting for unfinished jobs....
alloc.c: In function 'cachecolor':
alloc.c:264:42: error: '_SC_LEVEL2_CACHE_LINESIZE' undeclared (first use in this function)
  264 |                 cacheline_size = sysconf(_SC_LEVEL2_CACHE_LINESIZE);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
alloc.c:264:42: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:305: obj64/alloc.o] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-j4-20211209-163207

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-11.2.1 *
clang version 13.0.0
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/13/bin
/usr/lib/llvm/13
13.0.0
Python 3.9.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.57.0 *
php cli:

  HEAD of ::gentoo
commit a91c6746f6150ec510e0beecfe814f318ce98647
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Dec 10 09:21:40 2021 +0000

    2021-12-10 09:21:39 UTC

emerge -qpvO sys-libs/libhugetlbfs
[ebuild  N    ] sys-libs/libhugetlbfs-2.23  USE="-static-libs -test"
Comment 1 Toralf Förster gentoo-dev 2021-12-10 15:35:05 UTC
Created attachment 758251 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-10 15:35:06 UTC
Created attachment 758252 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-12-10 15:35:08 UTC
Created attachment 758253 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-12-10 15:35:09 UTC
Created attachment 758254 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-12-10 15:35:10 UTC
Created attachment 758255 [details]
sys-libs:libhugetlbfs-2.23:20211210-101828.log
Comment 6 Toralf Förster gentoo-dev 2021-12-10 15:35:11 UTC
Created attachment 758256 [details]
temp.tar.bz2
Comment 7 Larry the Git Cow gentoo-dev 2022-09-01 02:06:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbabd1516a53fa57ae0204216ae78741bd4928c9

commit dbabd1516a53fa57ae0204216ae78741bd4928c9
Author:     brahmajit das <listout@protonmail.com>
AuthorDate: 2022-07-23 18:47:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-01 02:04:23 +0000

    sys-libs/libhugetlbfs: fix musl build errors
    
    Fix _SC_LEVEL2_CACHE_LINESIZE undeclared and misc issues.
    
    Patches for musl that mainly closes bug 828830, plus some other patches
    for errors that come along 828830.
    
    Closes: https://bugs.gentoo.org/828830
    Closes: https://bugs.gentoo.org/832980
    Signed-off-by: brahmajit das <listout@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/26539
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libhugetlbfs-2.23-musl-ino_t-fix.patch   | 13 +++++++
 .../files/libhugetlbfs-2.23-musl-nonnull-fix.patch | 31 +++++++++++++++
 .../libhugetlbfs-2.23-musl-path-max-fix.patch      | 22 +++++++++++
 .../libhugetlbfs-2.23-musl-sc-level2-fix.patch     | 45 ++++++++++++++++++++++
 sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild     |  4 ++
 5 files changed, 115 insertions(+)