Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 890178 - dev-perl/X11-XCB-0.190.0 fails to compile (USR-MERGE-SYSTEM): XCB.xs:183:36: error: __PACKAGE__ undeclared (first use in this function)
Summary: dev-perl/X11-XCB-0.190.0 fails to compile (USR-MERGE-SYSTEM): XCB.xs:183:36: ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
Keywords: PATCH
Depends on:
Blocks: clang-16-porting
  Show dependency tree
Reported: 2023-01-08 06:05 UTC by Agostino Sarubbo
Modified: 2023-01-17 01:55 UTC (History)
2 users (show)

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

build.log (build.log,331.41 KB, text/plain)
2023-01-08 06:05 UTC, Agostino Sarubbo
X11-XCB-0.190.0-clang16-debug.patch (X11-XCB-0.190.0-debug.patch,1.41 KB, patch)
2023-01-17 01:42 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-01-08 06:05:36 UTC

Issue: dev-perl/X11-XCB-0.190.0 fails to compile (USR-MERGE-SYSTEM).
Discovered on: amd64 (internal ref: usr-merge_tinderbox)

(USR-MERGE-SYSTEM) in the summary means that the bug was found on a machine that runs default/linux/amd64/17.1/systemd/merged-usr profile but this bug MAY or MAY NOT BE related to the new profile.
Comment 1 Agostino Sarubbo gentoo-dev 2023-01-08 06:05:38 UTC
Created attachment 847876 [details]

build log and emerge --info
Comment 2 Peter Levine 2023-01-15 08:24:26 UTC
The problem doesn't appear to be related to clang-16.  build.log shows it was being built with gcc and I can't reproduce with clang-15+stricter settings.
Comment 3 Peter Levine 2023-01-15 09:29:50 UTC
(In reply to Peter Levine from comment #2)
> The problem doesn't appear to be related to clang-16.  build.log shows it
> was being built with gcc and I can't reproduce with clang-15+stricter
> settings.

Disregard.  Although the config shows gcc is used, there is likely a clang-16 bug since I'm getting "warning: incompatible pointer types passing 'xcb_client_message_data_t *'" and for some reason clang is ignoring "/etc/clang/gentoo-stricter.cfg".
Comment 4 Peter Levine 2023-01-16 07:06:44 UTC
OK, I misread. The warning isn't related to function pointers and is innocuous.

The issue isn't related to clang.  It is results from building dev-lang/perl with the "debug" USE flag.  After rebuilding dependent perl modules against it, building dev-perl/X11-XCB fails.
Comment 5 Peter Levine 2023-01-16 09:00:07 UTC
Upstream PR submitted:

Two issues in one. The "__PACKAGE__ undeclared" issue is not clang-specific.  There's a "call to undeclared function" issue that is clang-16 specific.
Comment 6 Peter Levine 2023-01-17 01:42:28 UTC
Created attachment 848699 [details, diff]

PR accepted upstream.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-17 01:43:48 UTC
Great work, thank you.
Comment 8 Larry the Git Cow gentoo-dev 2023-01-17 01:55:22 UTC
The bug has been closed via the following commit(s):

commit 7b75d588596d13dbd739cc0cf1100d3cc28afd9b
Author:     Sam James <>
AuthorDate: 2023-01-17 01:54:40 +0000
Commit:     Sam James <>
CommitDate: 2023-01-17 01:54:40 +0000

    dev-perl/X11-XCB: backport build fixes
    Thanks-to: Peter Levine <>
    Signed-off-by: Sam James <>

 dev-perl/X11-XCB/X11-XCB-0.190.0-r1.ebuild         | 63 ++++++++++++++++++++++
 .../files/X11-XCB-0.190.0-build-fixes.patch        | 37 +++++++++++++
 2 files changed, 100 insertions(+)