Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895828 - dev-util/cpputest-4.0 fails to compile (MUSL-CLANG-SYSTEM): sched.h:84:7: error: expected parameter declarator
Summary: dev-util/cpputest-4.0 fails to compile (MUSL-CLANG-SYSTEM): sched.h:84:7: err...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
: 831523 942372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-22 08:18 UTC by Agostino Sarubbo
Modified: 2025-01-14 02:39 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,193.35 KB, text/plain)
2023-02-22 08:18 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-22 08:18:52 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/cpputest-4.0 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-22 08:18:55 UTC
Created attachment 853824 [details]
build.log

build log and emerge --info
Comment 2 Zhixu Liu 2025-01-13 03:50:32 UTC
include/sched.h of musl has mem*/calloc/free redefined (already defined in stdlib.h)

include/CppUTest/MemoryLeakDetectorMallocMacros.h
has
#define free(a) cpputest_free_location(a, __FILE__, __LINE__)

preprocess turn prototype 'void free(void *)' to 'void cpputest_free_location(void *, "/usr/include/sched.h", 85)':

void
# 85 "/usr/include/sched.h"
    cpputest_free_location(
# 85 "/usr/include/sched.h" 3 4
    void *
# 85 "/usr/include/sched.h"
    , "/usr/include/sched.h", 85)
# 85 "/usr/include/sched.h" 3 4
                ;
then compilation failed:

././include/CppUTest/MemoryLeakDetectorMallocMacros.h:37:53: error: expected identifier before string constant
Comment 3 Zhixu Liu 2025-01-13 15:27:15 UTC
same problem for bug 942372 and 831523, please mark as duplicate of this one
Comment 4 Larry the Git Cow gentoo-dev 2025-01-14 02:32:43 UTC
The bug has been closed via the following commit(s):

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

commit 156e75fb38ab5a37f763729a7f79b89221015d9a
Author:     Z. Liu <zhixu.liu@gmail.com>
AuthorDate: 2025-01-13 14:01:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-14 02:30:59 +0000

    sys-libs/musl: reduce namespace conflicts in sched.h in _GNU_SOURCE profile
    
    patch from upstream on IRC
    
    Closes: https://bugs.gentoo.org/895828
    Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/40118
    Signed-off-by: Sam James <sam@gentoo.org>

 .../musl-sched.h-reduce-namespace-conflicts.patch  | 58 ++++++++++++++++++++++
 .../{musl-1.2.3-r8.ebuild => musl-1.2.3-r9.ebuild} |  4 ++
 .../{musl-1.2.4-r2.ebuild => musl-1.2.4-r3.ebuild} |  1 +
 .../{musl-1.2.5-r1.ebuild => musl-1.2.5-r2.ebuild} |  1 +
 4 files changed, 64 insertions(+)
Comment 5 Zhixu Liu 2025-01-14 02:38:39 UTC
*** Bug 942372 has been marked as a duplicate of this bug. ***
Comment 6 Zhixu Liu 2025-01-14 02:39:17 UTC
*** Bug 831523 has been marked as a duplicate of this bug. ***