JSCoverage
code coverage for JavaScript

Bug #44 - Build error when compiling jscoverage 0.5.1

Submitted by: Jens
Date submitted: 2012-06-07 22:33:45 UTC
Status: Open
I tried compiling jscoverage 0.5.1 from source.

It fails with a linker error (see below). Any ideas?

 -- Jens

make[4]: Entering directory
`/home/jens/AeroFS/fzi-hiwijob/FZILogViz/vendor/jscoverage-0.5.1/js/shell'
g++ -o js  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual
-Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align
-Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic
-fno-strict-aliasing -pthread -pipe  -DNDEBUG -DTRIMMED -Os -freorder-blocks
-fno-reorder-functions   js.o    -lpthread   -Wl,-rpath-link,/bin
-Wl,-rpath-link,/lib  -L../dist/bin -L../dist/lib  ../editline/libeditline.a
../libjs_static.a -ldl -lm      
../libjs_static.a(jsapi.o): In function `JS_AddArgumentFormatter':
jsapi.cpp:(.text+0xa46): undefined reference to `strcmp'
../libjs_static.a(jsapi.o): In function `JS_RemoveArgumentFormatter':
jsapi.cpp:(.text+0xb22): undefined reference to `strcmp'
../libjs_static.a(jsapi.o): In function `JS_StringToVersion':
jsapi.cpp:(.text+0x122b): undefined reference to `strcmp'
../libjs_static.a(jsapi.o): In function `JS_ConvertArgumentsVA':
jsapi.cpp:(.text+0x789c): undefined reference to `strncmp'
../libjs_static.a(jsapi.o): In function `JS_PushArgumentsVA':
jsapi.cpp:(.text+0x849c): undefined reference to `strncmp'
../libjs_static.a(jsxml.o): In function `GetBooleanXMLSetting(JSContext*, char
const*, int*)':
jsxml.cpp:(.text+0x20eb): undefined reference to `strcmp'
js.o: In function `Snarf(JSContext*, JSObject*, unsigned int, long*, long*)':
js.cpp:(.text+0x393): undefined reference to `strerror'
js.cpp:(.text+0x457): undefined reference to `strerror'
js.o: In function `CountHeap(JSContext*, unsigned int, long*)':
js.cpp:(.text+0xefe): undefined reference to `strcmp'
js.o: In function `GCParameter(JSContext*, unsigned int, long*)':
js.cpp:(.text+0x111e): undefined reference to `strcmp'
js.cpp:(.text+0x1132): undefined reference to `strcmp'
js.cpp:(.text+0x1146): undefined reference to `strcmp'
js.cpp:(.text+0x115a): undefined reference to `strcmp'
js.o:js.cpp:(.text+0x116e): more undefined references to `strcmp' follow
js.o: In function `Options(JSContext*, JSObject*, unsigned int, long*, long*)':
js.cpp:(.text+0x18f4): undefined reference to `strdup'
js.o: In function `split_getProperty(JSContext*, JSObject*, long, long*)':
js.cpp:(.text+0x1acb): undefined reference to `strcmp'
js.o: In function `Process(JSContext*, JSObject*, char*, int)':
js.cpp:(.text+0x291a): undefined reference to `strcmp'
js.cpp:(.text+0x2948): undefined reference to `strerror'
js.cpp:(.text+0x2bcb): undefined reference to `strerror'
js.o: In function `split_resolve(JSContext*, JSObject*, long, unsigned int,
JSObject**)':
js.cpp:(.text+0x307d): undefined reference to `strcmp'
js.o: In function `its_setProperty(JSContext*, JSObject*, long, long*)':
js.cpp:(.text+0x3457): undefined reference to `strcmp'
js.cpp:(.text+0x3477): undefined reference to `strcmp'
../editline/libeditline.a(editline.o): In function `hist_add':
editline.c:(.text+0xa8): undefined reference to `strdup'
../editline/libeditline.a(editline.o): In function `substrcmp':
editline.c:(.text+0x144): undefined reference to `strncmp'
../editline/libeditline.a(editline.o): In function `last_argument':
editline.c:(.text+0xcf0): undefined reference to `strdup'
../editline/libeditline.a(editline.o): In function `h_search':
editline.c:(.text+0x150c): undefined reference to `strdup'
editline.c:(.text+0x153d): undefined reference to `strncmp'
../editline/libeditline.a(editline.o): In function `readline':
editline.c:(.text+0x1692): undefined reference to `strdup'
../editline/libeditline.a(editline.o): In function `add_history':
editline.c:(.text+0x172f): undefined reference to `strcmp'
../libjs_static.a(jscntxt.o): In function
`js_ReportIsNullOrUndefined(JSContext*, int, long, JSString*)':
jscntxt.cpp:(.text+0x1ec7): undefined reference to `strcmp'
jscntxt.cpp:(.text+0x1ed8): undefined reference to `strcmp'
../libjs_static.a(jsdhash.o): In function `JS_DHashMatchStringKey':
jsdhash.cpp:(.text+0x460): undefined reference to `strcmp'
../libjs_static.a(jsopcode.o): In function `Decompile(SprintStack*, unsigned
char*, int, JSOp) [clone .isra.31]':
jsopcode.cpp:(.text+0x3045): undefined reference to `strncmp'
jsopcode.cpp:(.text+0x9724): undefined reference to `strncmp'
jsopcode.cpp:(.text+0x9b56): undefined reference to `strncmp'
../libjs_static.a(jsopcode.o): In function `DecompileDestructuring(SprintStack*,
unsigned char*, unsigned char*) [clone .part.33]':
jsopcode.cpp:(.text+0xcf46): undefined reference to `strncmp'
../libjs_static.a(jsscript.o): In function `js_compare_strings(void const*, void
const*)':
jsscript.cpp:(.text+0xc5): undefined reference to `strcmp'
../libjs_static.a(jsscript.o): In function `SaveScriptFilename(JSRuntime*, char
const*, unsigned int)':
jsscript.cpp:(.text+0x158): undefined reference to `strcmp'
../libjs_static.a(jsscript.o): In function `js_SaveScriptFilename':
jsscript.cpp:(.text+0x374): undefined reference to `strncmp'
../libjs_static.a(jsscript.o): In function `js_NewScriptFromCG':
jsscript.cpp:(.text+0xaf5): undefined reference to `strncmp'
../libjs_static.a(jsxdrapi.o): In function `JS_XDRFindClassIdByName':
jsxdrapi.cpp:(.text+0x1bf8): undefined reference to `strcmp'
/usr/bin/ld: js: hidden symbol `strncmp' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[4]: *** [js] Error 1
make[4]: Leaving directory
`/home/jens/AeroFS/fzi-hiwijob/FZILogViz/vendor/jscoverage-0.5.1/js/shell'
make[3]: *** [libs] Error 2
make[3]: Leaving directory
`/home/jens/AeroFS/fzi-hiwijob/FZILogViz/vendor/jscoverage-0.5.1/js'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/jens/AeroFS/fzi-hiwijob/FZILogViz/vendor/jscoverage-0.5.1/js'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/jens/AeroFS/fzi-hiwijob/FZILogViz/vendor/jscoverage-0.5.1'
make: *** [all] Error 2
Submitted by: Ed
Date submitted: 2012-06-07 22:41:45 UTC
What operating system / GCC version are you using?
Submitted by: Jens
Date submitted: 2012-06-10 18:56:12 UTC
Ubuntu Linux 12.04

gcc version is 4.6.3

Add a comment

Your name:
Your email address (optional - will never be displayed):
Comment:
Attachment (optional - maximum 64 KiB):
Copyright © 2008 Silicon Forks siliconforks.com
siliconforks@siliconforks.com