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

Bug 560860

Summary: dev-qt/qtwebkit-5.5.0 fails to build with musl
Product: Gentoo Linux Reporter: Wikky Kerr <wikky>
Component: [OLD] LibraryAssignee: Gentoo musl team <musl>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: qt, tsmksubc, wikky
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: Proposed patch for ::musl
Proposed patch for ::musl

Description Wikky Kerr 2015-09-19 19:06:55 UTC
QtWebkit fails to build on musl, because it tries to use the Backtrace API, which is not supported by musl libc.
Comment 1 Wikky Kerr 2015-09-19 19:12:39 UTC
Created attachment 412290 [details, diff]
Proposed patch for ::musl

This disables using the backtrace API on non-glibc systems.
From https://github.com/meta-qt5/meta-qt5/blob/master/recipes-qt/qt5/qtwebkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch
Comment 2 Wikky Kerr 2015-09-19 19:32:33 UTC
Created attachment 412292 [details, diff]
Proposed patch for ::musl

Sorry, the previous patch was wrong
Comment 3 Felix Janda 2015-09-20 05:02:50 UTC
For further polishing of the patch, notice that uclibc defines
__GLIBC__, so that the !__UCLIBC__ test is unnecessary.
Comment 4 Wikky Kerr 2015-09-20 10:33:24 UTC
(In reply to Felix Janda from comment #3)
> For further polishing of the patch, notice that uclibc defines
> __GLIBC__, so that the !__UCLIBC__ test is unnecessary.

No, precisely because uClibc defines __GLIBC__, !__UCLIBC__ is necessary.

Currently, the code only enables backtrace support if it detects Linux and not-uClibc. The patch adds an extra check for glibc, which ensures backtrace is only used on glibc. Without the !__UCLIBC__, backtrace would also be enabled on uClibc, and clearly that's not what the upstream intended.

Or am I completely wrong here?
Comment 5 Felix Janda 2015-09-20 16:12:00 UTC
Yes, you are right. Sorry for causing confusion.
Comment 6 Davide Pesavento gentoo-dev 2015-10-01 01:14:35 UTC
This needs to go upstream. Even though QtWebKit is deprecated, they might still agree to include it for 5.6
Comment 7 Anthony Basile gentoo-dev 2015-10-01 01:32:44 UTC
(In reply to Wiktor W Brodlo from comment #4)
> (In reply to Felix Janda from comment #3)
> > For further polishing of the patch, notice that uclibc defines
> > __GLIBC__, so that the !__UCLIBC__ test is unnecessary.
> 
> No, precisely because uClibc defines __GLIBC__, !__UCLIBC__ is necessary.
> 
> Currently, the code only enables backtrace support if it detects Linux and
> not-uClibc. The patch adds an extra check for glibc, which ensures backtrace
> is only used on glibc. Without the !__UCLIBC__, backtrace would also be
> enabled on uClibc, and clearly that's not what the upstream intended.
> 
> Or am I completely wrong here?

You should test for execinfo.h or functions in the backtrace api in the configure script and not rely on definitions of __GLIBC__ or __UCLIBC__.  While this will work, its problematic.  For example, uclibc can be configure with or without backtrace, so turning it off #ifdef __UCLIBC__ might miss that the current working version of uclibc actually does provide it.
Comment 8 Anthony Basile gentoo-dev 2015-10-01 01:33:42 UTC
Oh and I should add, i pushed the patch againt the musl overlay.  Still Davide is right, let's see about getting it upstream.
Comment 9 Michael Palimaka (kensington) gentoo-dev 2018-01-14 05:36:26 UTC
Is there any update on the status of this patch and pushing it upstream?
Comment 10 Andreas Sturmlechner gentoo-dev 2019-01-12 09:53:33 UTC
Can we assume this fixed by latest qtwebkit?
Comment 11 Michael Palimaka (kensington) gentoo-dev 2019-04-18 09:28:08 UTC
Eyeballing, it looks like it's in qtwebkit-5.212.0_pre20180120.