Bug 31403 - [Qt] Disable pthread_setname_np.
Summary: [Qt] Disable pthread_setname_np.
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-11-12 04:52 PST by Jocelyn Turcotte
Modified: 2011-04-19 05:15 PDT (History)
6 users (show)

See Also:


Attachments
Patch from Qt src/3rdparty (1.15 KB, patch)
2009-11-12 05:06 PST, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff
Use TARGETING instead of BUILDING_ON (1.17 KB, patch)
2010-05-05 06:33 PDT, Benjamin Poulain
hausmann: review+
hausmann: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Turcotte 2009-11-12 04:52:38 PST
Comment from original commit in Qt's 3rdparty:

BT: JavaScriptCore makes applications crash on leopard
JavaScriptCore checks the Mac OS version when building, and uses
symbols only defined in i e.g.snow leopard when building on snow
leopard.
This means that if you build Qt on snow leopard and later move
it to leopard, applications will crash looking for a missing
symbol (pthread_setname_np in particular).
In Qt, we garuantee that you can run your applications on 10.4 and up
for Carbon, and 10.5 and up for Cocoa. So using compile time checks
this way is not a proper soulution.

Result: In Qt, never use symbols not defined on all supported OS
versions, or at least implement run-time checks.

Rev-By: Simon Hausmann
Rev-By: Tor Arne
Rev-By: MortenS
Comment 1 Jocelyn Turcotte 2009-11-12 05:06:54 PST
Created attachment 43057 [details]
Patch from Qt src/3rdparty
Comment 2 WebKit Commit Bot 2009-11-12 06:06:07 PST
Comment on attachment 43057 [details]
Patch from Qt src/3rdparty

Clearing flags on attachment: 43057

Committed r50877: <http://trac.webkit.org/changeset/50877>
Comment 3 WebKit Commit Bot 2009-11-12 06:06:11 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Mark Rowe (bdash) 2009-11-12 06:08:22 PST
Comment on attachment 43057 [details]
Patch from Qt src/3rdparty

This isn’t really the right way to address this.  I don’t know anything about how the Qt build process works but we have TARGETING_TIGER / TARGETING_LEOPARD macros that can be used to exclude code based on the minimum supported Mac OS X version that the binary will run on (rather than the BUILDING_ON macros which are about the maximum version).
Comment 5 Mark Rowe (bdash) 2009-11-12 06:09:35 PST
I’m reopening this so it can be fixed in a more appropriate manner.
Comment 6 Kenneth Rohde Christiansen 2009-11-12 06:35:17 PST
Apparently the original code using BUILDING_ON_TIGER/LEOPARD could be replaced with TARGETING_TIGER/LEOPARD instead, depending on how the Qt build system works.

Quote from Mark Rowe:

i'm not sure how the Qt build system works but I would imagine that if it builds on 10.6 but deploys on 10.5 it would be setting the so-called Mac OS X deployment target so that the right platform headers are exposed.

Tor Arne, can you look into this?
Comment 7 Kent Hansen 2010-03-10 07:03:05 PST
(In reply to comment #6)
> Apparently the original code using BUILDING_ON_TIGER/LEOPARD could be replaced
> with TARGETING_TIGER/LEOPARD instead, depending on how the Qt build system
> works.
> 
> Quote from Mark Rowe:
> 
> i'm not sure how the Qt build system works but I would imagine that if it
> builds on 10.6 but deploys on 10.5 it would be setting the so-called Mac OS X
> deployment target so that the right platform headers are exposed.
> 
> Tor Arne, can you look into this?

Maybe Platform.h should be using TARGETING rather than BUILDING_ON for that stuff? The TARGETING macros were added not that long ago.
I have a patch in the queue that switches from BUILDING_ON to TARGETING for similar reasons (https://bugs.webkit.org/show_bug.cgi?id=34888).
Comment 8 Benjamin Poulain 2010-05-05 06:33:59 PDT
Created attachment 55117 [details]
Use TARGETING instead of BUILDING_ON

Uptate with the comments of Mark and Kent.
Comment 9 Simon Hausmann 2010-06-07 04:20:12 PDT
Comment on attachment 55117 [details]
Use TARGETING instead of BUILDING_ON

r=me, but the ChangeLog needs to be a bit more verbose on what the problem is. I'll try to do that when landing it.
Comment 10 Simon Hausmann 2010-06-07 05:16:08 PDT
Committed r60773: <http://trac.webkit.org/changeset/60773>
Comment 11 Simon Hausmann 2010-06-07 05:50:07 PDT
Revision r60773 cherry-picked into qtwebkit-2.0 with commit f943ead2759537527faa7f3cb057d995291663b9