User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100912 Firefox/4.0b6pre Build Identifier: Compilation fails after -r53651:3feb012b18a3 with c++ -o js -fno-rtti -fno-exceptions -Wall -Wpointer-arith … /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/bin/ld: js: hidden symbol `js::ShapeHasher::match(js::Shape*, js::Shape const*)' isn't defined /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status make: *** [js] Error 1 make: Leaving directory `/home/ojab/src/firefox/js/src/shell' Reproducible: Always GNU ld (GNU Binutils) 220.127.116.1100620 gcc version 4.5.2 20100903 (prerelease) (GCC)
This affects only DEBUG builds due to the use of inline keyword in jspropertytree.cpp on: inline HashNumber ShapeHasher::hash(const Lookup l) Bug 593256 has added a DEBUG-only reference to ShapeHasher::hash from JSObject::checkShapeConsistency(). As a workaround in the local tree I just dropped the inline keywords from ShapeHasher::hash and ShapeHasher::match. A better solution I guess would be to move the inlines into some header.
Created attachment 474533 [details] [diff] [review] fix
Comment on attachment 474533 [details] [diff] [review] fix r=dbaron. It would probably be good to declare the inline methods as inline where they're declared in addition to where they're defined, though. I think that way you might be more likely to get errors/warnings about this.
Created attachment 474534 [details] [diff] [review] what I'm landing Also fix a JS_CHECK_SHAPE_THROTTLE=non-zero plus DEBUG-only failure to check consistency in edge case. This doesn't affect debug or release builds; to get the checking you have to build DEBUG and set that JS_CHECK_SHAPE_THROTTLE envar. /be
Oops, missed David's suggestion -- I'll add inline to the static member decls before landing. /be
Created attachment 474536 [details] [diff] [review] really gonna land this, I swear I love how Mac GCC failed to catch the problem reported in this bug... /be
http://hg.mozilla.org/tracemonkey/rev/60bbf40c518f http://hg.mozilla.org/mozilla-central/rev/fc4dc7ff4e9a /be