Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903907 - x11-libs/cairo-1.17.8 x86_64-gentoo-linux-musl-ld.lld: error: undefined symbol: backtrace_symbols >>> referenced by malloc-stats.c
Summary: x11-libs/cairo-1.17.8 x86_64-gentoo-linux-musl-ld.lld: error: undefined symbo...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
Keywords: PATCH, PullRequest
Depends on:
Reported: 2023-04-06 10:48 UTC by demiank
Modified: 2023-07-06 10:21 UTC (History)
1 user (show)

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

emerge --info (emerge--info.txt,22.52 KB, text/plain)
2023-04-06 10:48 UTC, demiank
emerge log (cairo-emerge.log,220.10 KB, text/x-log)
2023-04-06 10:51 UTC, demiank
solved with this patch (malloc-stats.patch,341 bytes, patch)
2023-04-06 11:19 UTC, demiank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description demiank 2023-04-06 10:48:10 UTC
Created attachment 859613 [details]
emerge --info

x11-libs/cairo-1.17.8 fail to build
Comment 1 demiank 2023-04-06 10:51:10 UTC
Created attachment 859614 [details]
emerge log
Comment 2 demiank 2023-04-06 11:19:10 UTC
Created attachment 859615 [details, diff]
solved with this patch
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-07 02:17:00 UTC
It's not fixed for anybody else.
Comment 4 Andrei Horodniceanu 2023-07-06 10:08:14 UTC
There are 2 problems that lead to this bug. The first is that the build system assumes that libexecinfo is part of the C standard library and it doesn't try to link against anything when deciding to compile malloc-stats.c, leading to a linking error on musl systems that have the execinfo.h header present. This issue is solved upstream in

The second problem is the build system deciding to build malloc-stats.c based on the availability of the execinfo.h header. I try to solve this in by adding an option instead of the autodetection.

Given that libexecinfo is not available in ::gentoo this bug only happens when an user installs the library from an overlay on a musl system, in the reporter's (and my) case, it came from 12101111-overlay ( as a dependency of chromium.