Bug 138017 - offsets.rb:183:in `buildOffsetsMap': unhandled exception - is offlineasm dependency tracking broken?
Summary: offsets.rb:183:in `buildOffsetsMap': unhandled exception - is offlineasm depe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-10-23 13:24 PDT by Michael Saboff
Modified: 2014-10-23 13:54 PDT (History)
0 users

See Also:


Attachments
Patch (1.68 KB, patch)
2014-10-23 13:31 PDT, Michael Saboff
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2014-10-23 13:24:26 PDT
Sometimes when changing build targets or updating source repository with changes to JavaScriptCore/llint/LowLevelInterpreter{32_64,64}.asm, building with Xcode will fail.  The failure manifests in two different ways:
A ruby exception from the Offline Assembler build phase
    offsets.rb:183:in `buildOffsetsMap': unhandled exception
or a linker error when linking JavaScriptCore:

Undefined symbols for architecture x86_64:
  "_llint_entry", referenced from:
      __ZN3JSC5LLInt10initializeEv in LLIntData.o
     (maybe you meant: _llint_entry_osr_function_for_construct_arityCheck, _llint_entry_osr_function_for_construct , _llint_entry_osr , _llint_entry_osr_function_for_call , _llint_entry_osr_function_for_call_arityCheck )
  "_sanitizeStackForVMImpl", referenced from:
      __ZN3JSC18sanitizeStackForVMEPNS_2VME in VM.o
  "_vmEntryRecord", referenced from:
      __ZN3JSC9ExecState11callerFrameERPv in CallFrame.o
  "_vmEntryToJavaScript", referenced from:
      __ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE in JITCode.o
  "_vmEntryToNative", referenced from:
      __ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE in Interpreter.o
      __ZN3JSC11Interpreter16executeConstructEPNS_9ExecStateEPNS_8JSObjectENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE in Interpreter.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is due to the LLInt Offset build phase Generate Derived Sources has $(SRCROOT)/llint/LowLevelAssembler.asm declared as an input and $(BUILT_PRODUCTS_DIR)/LLIntOffsets/LLIntDesiredOffsets.h.  When Xcode builds it does dependency analysis on those two files.  These two file declarations can be eliminated as the ruby script itself does dependency analysis.

rdar://problem/16974705
Comment 1 Michael Saboff 2014-10-23 13:31:14 PDT
Created attachment 240364 [details]
Patch
Comment 2 Mark Lam 2014-10-23 13:37:21 PDT
Comment on attachment 240364 [details]
Patch

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

r=me with typo fix.

> Source/JavaScriptCore/ChangeLog:8
> +        Removed from the nput file $(SRCROOT)/llint/LowLevelAssembler.asm and output file

typo: nput ==> input
Comment 3 Michael Saboff 2014-10-23 13:54:17 PDT
Committed r175141: <http://trac.webkit.org/changeset/175141>