Bug 163513 - [PATCH] Fix devel/automoc4 hangs cosmetically.
Summary: [PATCH] Fix devel/automoc4 hangs cosmetically.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 19:30 UTC by Mel
Modified: 2011-12-29 01:09 UTC (History)
1 user (show)

See Also:


Attachments
patch-kde4automoc.cpp (414 bytes, text/plain)
2011-12-21 19:30 UTC, Mel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mel 2011-12-21 19:30:11 UTC
Automoc4 unpredictably hangs when calling cmake to print colored text.
The root cause lies in QProcess calling async unsafe functions in a thread
as analyzed here:
http://lists.freebsd.org/pipermail/freebsd-stable/2011-May/062603.html

The symptom is however easily mitigated by attached patch.

Fix: Patch below uses a conservative 2 seconds for the QProcess to realize the
command has already finished.
How-To-Repeat: Build one of the larger kde4 ports to increase chances of bug showing up.
Confirmed candidates (2 cores builds):
- x11/kde4-runtime
- x11/kdelibs4
- x11/kde4-baseapps
- deskutils/kdepimlibs4
Comment 1 David Naylor 2011-12-23 15:35:50 UTC
> Automoc4 unpredictably hangs when calling cmake to print colored text.
> The root cause lies in QProcess calling async unsafe functions in a thread
> as analyzed here:
> http://lists.freebsd.org/pipermail/freebsd-stable/2011-May/062603.html
> 
> The symptom is however easily mitigated by attached patch.


There is a bug report [1] regarding this on KDE's bugzilla.  

> >Fix:
> Patch below uses a conservative 2 seconds for the QProcess to realize the
> command has already finished.


The bug report also includes a patch.  Could you give it a try?

Of note, with cmake 2.8.6, this is a mute issue as automoc has been integrated 
into cmake.  I am hoping to have a look at the underlying issue in QProcess 
shortly.  

[1] https://bugs.kde.org/show_bug.cgi?id=276461
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2011-12-26 00:38:35 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Fix synopsis and assign.
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2011-12-26 01:17:01 UTC
David Naylor <naylor.b.david@gmail.com> writes:

> Of note, with cmake 2.8.6, this is a mute issue as automoc has been integrated
> into cmake.

Just a correction here: even though automoc has been integrated into
CMake, applications themselves and the buildsystem needs to be adapted
to use it. This is going to be material for KDE5.
Comment 4 Raphael Kubo da Costa freebsd_committer freebsd_triage 2011-12-29 01:09:39 UTC
State Changed
From-To: open->closed

A fix has been committed to devel/automoc4 itself in version 0.9.88_2. 
Thanks.