Bug 116820

Summary: Link error in CodeBlock, maximumBytecodeIndex is not defined correctly
Product: WebKit Reporter: Xan Lopez <xan.lopez>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: anilsson, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
codeorigin-link.diff none

Xan Lopez
Reported 2013-05-27 04:06:42 PDT
Getting this error: Linking CXX executable ../../../bin/jsc ../../../lib/libjavascriptcore.so.0.1: undefined reference to `JSC::CodeOrigin::maximumBytecodeIndex' cc: /home/xan/bbndk/host_10_0_9_404/linux/x86/usr/bin/ntoarm-ld error 1 The problem is that maximumBytecodeIndex is being declared like this: struct CodeOrigin { static const unsigned maximumBytecodeIndex = (1u << 29) - 1; but according to the C++ spec apparently you cannot define static members like that, it will only count as a declaration. This page explains it pretty well: http://stackoverflow.com/questions/3536372/defining-static-members-in-c A simple fix is to define this in the cpp file, removing the assignment in the struct declaration. Patch coming.
Attachments
codeorigin-link.diff (2.74 KB, patch)
2013-05-27 04:09 PDT, Xan Lopez
no flags
Xan Lopez
Comment 1 2013-05-27 04:09:19 PDT
Created attachment 202966 [details] codeorigin-link.diff
Xan Lopez
Comment 2 2013-05-28 03:38:12 PDT
Apparently this was fixed without review as a build fix already, so closing.
Note You need to log in before you can comment on or make changes to this bug.