Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551640 - =dev-qt/qtcore-4.8.7 fails to compile on armv7a-hardened-musl
Summary: =dev-qt/qtcore-4.8.7 fails to compile on armv7a-hardened-musl
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-06-10 03:00 UTC by Michael Jones
Modified: 2018-08-20 16:15 UTC (History)
5 users (show)

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


Attachments
build.log.gz (build.log.gz,49.84 KB, application/x-targz)
2015-06-10 03:01 UTC, Michael Jones
Details
Add dev-qt/qtcore to the musl overlay (0001-dev-qt-qtcore-Fix-socklen_t-detection.-Bug-551640.patch,52.43 KB, patch)
2015-07-04 22:15 UTC, Vic Kerr (wikky)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2015-06-10 03:00:44 UTC
This bug should be made a blocker of : https://bugs.gentoo.org/show_bug.cgi?id=430702

And assigned to blueness@gentoo.org

Reproducible: Always
Comment 1 Michael Jones 2015-06-10 03:01:05 UTC
Created attachment 404864 [details]
build.log.gz
Comment 2 Michael Jones 2015-06-10 06:32:59 UTC
I believe that this is independent from, and not a duplicate of : https://bugs.gentoo.org/show_bug.cgi?id=542780
Comment 3 Felix Janda 2015-06-14 19:21:02 UTC
Try to backport the patch

http://git.alpinelinux.org/cgit/aports/tree/main/qt5-qtbase/qt-musl-socklen.patch
Comment 4 Vic Kerr (wikky) 2015-07-04 22:02:20 UTC
Also appears on amd64. Back-ported patch from [0] and seems to be building fine.

[0] https://github.com/meta-qt5/meta-qt5/blob/6d9e2a6dfc21f7d9a3a11b4bcb426b5dfe6feaeb/recipes-qt/qt5/qtbase/0014-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch
Comment 5 Vic Kerr (wikky) 2015-07-04 22:15:36 UTC
Created attachment 406192 [details, diff]
Add dev-qt/qtcore to the musl overlay
Comment 6 Anthony Basile gentoo-dev 2015-07-04 22:58:04 UTC
Okay committed to the musl overlay.(In reply to Wiktor W Brodlo from comment #4)
> Also appears on amd64. Back-ported patch from [0] and seems to be building
> fine.
> 
> [0]
> https://github.com/meta-qt5/meta-qt5/blob/
> 6d9e2a6dfc21f7d9a3a11b4bcb426b5dfe6feaeb/recipes-qt/qt5/qtbase/0014-linux-oe-
> g-Invert-conditional-for-defining-QT_SOCKLE.patch

Is this patch heading for upstream qt?
Comment 7 Vic Kerr (wikky) 2015-07-04 23:21:43 UTC
(In reply to Anthony Basile from comment #6)
> Okay committed to the musl overlay.

Thanks.

> Is this patch heading for upstream qt?

The original patch has been committed to upstream qt5 3 days ago. I can confirm =qtcore-5.5.0_rc::qt builds fine against musl. AFAIK qt4 is not maintained any more: https://blog.qt.io/blog/2015/05/26/qt-4-8-7-released/
Comment 8 Vic Kerr (wikky) 2015-07-13 17:37:39 UTC
Turns out I was wrong - the patch has not been submitted to qt5 upstream.
Comment 9 Vic Kerr (wikky) 2015-09-20 15:50:07 UTC
qtcore-4.8.{6,7}[iconv] builds fine on musl, but results in runtime errors in applications. For example:

唀猀愀最攀㨀 automoc4 㰀漀甀琀昀椀氀攀㸀 㰀猀爀挀搀椀爀㸀 㰀戀甀椀氀搀搀椀爀㸀 㰀洀漀挀 攀砀攀挀甀琀愀戀氀攀㸀 㰀挀洀愀欀攀 攀砀攀挀甀琀愀戀氀攀㸀 嬀ⴀⴀ琀漀甀挀栀崀਀

This doesn't mean anything. However, if we flip every pair of bytes, we get this UTF-16-encoded text:

Usage: automoc4 <outfile> <srcdir> <builddir> <moc executable> <cmake executable> [--touch]

(which is what's intended).

Input is also broken in some Qt4 applications.

Building with iconv disabled fixes the issue.

Qt 5 is not affected.
Comment 10 tt_1 2016-01-04 07:50:15 UTC
There is also some strange output on amd64 non-hardened. For instance, this is the output of vlc started via console. 


core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
唀渀愀戀氀攀 琀漀 氀漀愀搀 氀椀戀爀愀爀礀 椀挀甀椀㄀㠀渀 ∀䌀愀渀渀漀琀 氀漀愀搀 氀椀戀爀愀爀礀 椀挀甀椀㄀㠀渀㨀 ⠀Error loading shared library 椀挀甀椀㄀㠀渀: No such file or directory⤀∀ 
唀渀愀戀氀攀 琀漀 氀漀愀搀 最爀愀瀀栀椀挀猀猀礀猀琀攀洀 ∀raster∀ 



I switched to qt5 meanwhile, which solved all problems. But would you mind to mask the iconv useflag for qtcore:4 on musl profiles to solve this problem eventually?
Comment 11 Davide Pesavento gentoo-dev 2018-08-20 16:15:10 UTC
Qt4 is gone.