Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 829742 - sys-libs/compiler-rt-sanitizers-13.0.0-r1: error: function-like macro '__GLIBC_PREREQ' is not defined (in musl libc)
Summary: sys-libs/compiler-rt-sanitizers-13.0.0-r1: error: function-like macro '__GLIB...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL: https://github.com/llvm/llvm-project/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 829603
  Show dependency tree
 
Reported: 2021-12-21 06:38 UTC by 12101111
Modified: 2022-02-03 03:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info,8.85 KB, text/plain)
2021-12-21 06:39 UTC, 12101111
Details
build.log (build.log,255.26 KB, text/x-log)
2021-12-21 06:40 UTC, 12101111
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 12101111 2021-12-21 06:38:41 UTC
sys-libs/compiler-rt-sanitizers-13.0.0-r1 include patches that use macro __GLIBC_PREREQ, but this macro is only available in glibc.

Reproducible: Always

Steps to Reproduce:
1. emerge "=sys-libs/compiler-rt-sanitizers-13.0.0-r1"

Actual Results:  
/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0-r1/work/compiler-rt/lib/msan/msan_interceptors.cpp:660:46: error: function-like macro '__GLIBC_PREREQ' is not defined
#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_STAT_LINUX
                                             ^
/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0-r1/work/compiler-rt/lib/msan/msan_interceptors.cpp:659:50: note: expanded from macro 'SANITIZER_STAT_LINUX'
#define SANITIZER_STAT_LINUX (SANITIZER_LINUX && __GLIBC_PREREQ(2, 33))
                                                 ^
/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0-r1/work/compiler-rt/lib/msan/msan_interceptors.cpp:699:46: error: function-like macro '__GLIBC_PREREQ' is not defined
#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_STAT_LINUX
                                             ^
/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0-r1/work/compiler-rt/lib/msan/msan_interceptors.cpp:659:50: note: expanded from macro 'SANITIZER_STAT_LINUX'
#define SANITIZER_STAT_LINUX (SANITIZER_LINUX && __GLIBC_PREREQ(2, 33))
                                                 ^
2 errors generated.


Expected Results:  
Those patches should only be applied on glibc system.
Comment 1 12101111 2021-12-21 06:39:37 UTC
Created attachment 759938 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-21 06:40:11 UTC
Please do include the full build.log and emerge --info. It helps debugging for those who can't reproduce (or for whom it'd be a huge amount of effort). Avoiding conditional patching is preferred and more upstreamable.
Comment 3 12101111 2021-12-21 06:40:19 UTC
Created attachment 759939 [details]
build.log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-28 02:03:07 UTC
We actually just need https://github.com/llvm/llvm-project/commit/b4fb42300e39c99ac5bb9d02b304b713fabdec4d which should be in 13.0.1.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-03 03:35:46 UTC
Should be fixed in 13.0.1 which is in tree now.