Bug 129399 - Create symlink to /usr/local/bin/jsc during installation
Summary: Create symlink to /usr/local/bin/jsc during installation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 132053
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-26 15:22 PST by David Kilzer (:ddkilzer)
Modified: 2014-04-23 02:53 PDT (History)
9 users (show)

See Also:


Attachments
Patch v1 (2.50 KB, patch)
2014-02-26 15:24 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (2.57 KB, patch)
2014-02-27 10:48 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2014-02-26 15:22:09 PST
When iOS changes were upstreamed to JavaScriptCore, we lost the creation of a symlink from /usr/local/bin/jsc to /S/L/F/JavaScriptCore.framework/Resources/jsc.

This bug is to track adding that back.
Comment 1 David Kilzer (:ddkilzer) 2014-02-26 15:22:28 PST
<rdar://problem/16168734>
Comment 2 David Kilzer (:ddkilzer) 2014-02-26 15:24:27 PST
Created attachment 225306 [details]
Patch v1
Comment 3 mitz 2014-02-26 15:49:39 PST
Comment on attachment 225306 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=225306&action=review

> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:5925
> +			shellScript = "if [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then\n    mkdir -p \"${DSTROOT}/usr/local/bin\"\n    cd \"${DSTROOT}/usr/local/bin\"\n    ln -s \"../../..${INSTALL_PATH}/jsc\" jsc\n    exit\nfi\n";

Unless I’m missing something, when building for the iOS Simulator, this will create the usr directory alongside the Applications directory (which contains Xcode.app/Developer/…) in DSTROOT, which is not desirable in production builds.
Comment 4 mitz 2014-02-26 15:50:16 PST
s/Developer/Contents\/Developer/
Comment 5 David Kilzer (:ddkilzer) 2014-02-27 10:48:44 PST
Created attachment 225394 [details]
Patch v2

Fixed install paths for iOS Simulator.
Comment 6 WebKit Commit Bot 2014-02-27 12:32:20 PST
Comment on attachment 225394 [details]
Patch v2

Clearing flags on attachment: 225394

Committed r164823: <http://trac.webkit.org/changeset/164823>
Comment 7 WebKit Commit Bot 2014-02-27 12:32:22 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Joseph Pecoraro 2014-02-27 13:12:43 PST
I'm seeing build failures on the bots:

<http://build.webkit.org/builders/Apple%20Mavericks%20LLINT%20CLoop%20%28BuildAndTest%29/builds/2260/steps/compile-webkit/logs/stdio>

> The following build commands failed:
>     PhaseScriptExecution Create\ /usr/local/bin/jsc\ symlink

I'm guessing this is because if  there is no iOS SDK then:
DebugRelease.xcconfig line 23: Unable to find included file "../../../../Internal/Configurations/UseInternalSDK.xcconfig"
iOS.xcconfig line 1: Unable to find included file "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/AspenFamily.xcconfig"

And $(INSTALL_PATH_PREFIX) may be undefined? Just a wild guess at this time.
Comment 9 Joseph Pecoraro 2014-02-27 13:14:04 PST
Or rather, INSTALL_PATH_ACTUAL would be the important thing here.
Comment 10 David Kilzer (:ddkilzer) 2014-02-27 13:36:55 PST
(In reply to comment #9)
> Or rather, INSTALL_PATH_ACTUAL would be the important thing here.

Actually, the build failed because the buildbot was trying to create a symlink where a symlink already existed (in a non-clean build).

Fixed in r164828:  <http://trac.webkit.org/changeset/r164828>
Comment 11 Csaba Osztrogonác 2014-04-10 04:31:43 PDT
After this change build-jsc unconditionally tries to create 
a symlink to /tmp/JavaScriptCore.dst/usr/local/bin:
jsc -> ../../../System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc

But if there are more user work on a Mac, the second user won't be 
able to remove and recreate this symlink and build-jsc will fail.

Could you possibly give us some hint how can we solve this problem?
Comment 12 Csaba Osztrogonác 2014-04-23 02:53:22 PDT
(In reply to comment #11)
> After this change build-jsc unconditionally tries to create 
> a symlink to /tmp/JavaScriptCore.dst/usr/local/bin:
> jsc -> ../../../System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc
> 
> But if there are more user work on a Mac, the second user won't be 
> able to remove and recreate this symlink and build-jsc will fail.
> 
> Could you possibly give us some hint how can we solve this problem?

Unfortunately I didn't get answer for this serious regression in 2 weeks. :(
I filed a new bug report to fix - https://bugs.webkit.org/show_bug.cgi?id=132053