unable to start jscoverage-server (OS X 10.6)

Questions, problems, suggestions, bug reports, and so on.
Post Reply
twelvelabs

unable to start jscoverage-server (OS X 10.6)

Post by twelvelabs » 2009-12-30 6:13 am

I downloaded jscoverage-0.4 and compiled it on OS X 10.6. The jscoverage executable works fine, but attempting to start jscoverage-server fails with the following message:

$ jscoverage-server --verbose
Starting HTTP server on 127.0.0.1:8080
jscoverage-server: could not bind to address
$

I tried substituting a few different port numbers thinking that maybe 8080 was in use by something else, but nothing worked - even ports that I know for sure are available.

Nothing suspicious in the system log. Is this a known issue?

Ed
Posts: 120
Joined: 2008-10-11 6:52 pm

Re: unable to start jscoverage-server (OS X 10.6)

Post by Ed » 2009-12-30 7:02 pm

It's not a known issue, but it may be an issue. :(

I don't have a Mac, so I haven't tested it on OS X. I have been able to get the jscoverage-server program running on FreeBSD, so it should probably work on most BSD-like systems.

There is a Mac version available but I don't know if it includes the jscoverage-server program or not.

Guest

Re: unable to start jscoverage-server (OS X 10.6)

Post by Guest » 2010-02-22 5:45 pm

I cannot get jscoverage to compile on FreeBSD 4.11 - what's the secret??
thanks!!
Mark

Ed
Posts: 120
Joined: 2008-10-11 6:52 pm

Re: unable to start jscoverage-server (OS X 10.6)

Post by Ed » 2010-02-22 6:00 pm

Guest wrote:I cannot get jscoverage to compile on FreeBSD 4.11 - what's the secret??
thanks!!
Mark
You may need to use a more recent version of FreeBSD to get it to work - I haven't tried that version. What error are you getting?

Also, what version of JSCoverage are you compiling? Is this the released version (0.4) or the SVN version?

Guest

Re: unable to start jscoverage-server (OS X 10.6)

Post by Guest » 2010-02-22 6:53 pm

Thanks I've tried both svn and .4
SVN is broken when running bootstrap step - the autoconf/automake stuff is pretty ugly/old in FreeBSD 4.x.

For the .4 stuff - configure runs fine - but there's no file in ref-config for config.mk to include:

Code: Select all

-bash-2.05b$ gmake
gmake  all-recursive
gmake[1]: Entering directory `/home/trostler/jscoverage-0.4'
Making all in js
gmake[2]: Entering directory `/home/trostler/jscoverage-0.4/js'
gmake -f Makefile.ref DISABLE_JIT=1 OBJROOT=obj BUILD_OPT=1
gmake[3]: Entering directory `/home/trostler/jscoverage-0.4/js'
config.mk:167: ref-config/FreeBSD4.11-YAHOO-20081117.mk: No such file or directory
Makefile.ref:58: NANOJIT_ARCH not defined in config/FreeBSD4.11-YAHOO-20081117.mk, JIT disabled
gmake[3]: *** No rule to make target `ref-config/FreeBSD4.11-YAHOO-20081117.mk'.  Stop.
gmake[3]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/trostler/jscoverage-0.4'
gmake: *** [all] Error 2
Hacking further & using 'Darwin.mk' as a template - & taking '-Wstrict-aliasing=2' out of js/config.mk (using gcc 2.95) finally leads to this:

Code: Select all

gmake -f Makefile.ref  ./obj/libjs.a ./obj/libjs.dylib ./obj/js 
gmake[4]: Entering directory `/home/trostler/jscoverage-0.4/js'
Makefile.ref:61: disabling JIT per build specification
g++ -o obj/json.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_trostler -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti  json.cpp
json.cpp: In method `StringifyClosure::~StringifyClosure()':
jscntxt.h:935: `static void JSAutoTempValueRooter::operator delete(void *, unsigned int)' is private
json.cpp:153: within this context
gmake[4]: *** [obj/json.o] Error 1
gmake[4]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/trostler/jscoverage-0.4'
gmake: *** [all] Error 2

guess it doesn't like a private destructor? So I comment that all out - the #ifndef AIX block in jscntxt.h where it's complaining which then gets me to:

Code: Select all

-bash-2.05b$ gmake
gmake -f Makefile.ref DISABLE_JIT=1 OBJROOT=obj BUILD_OPT=1
gmake[1]: Entering directory `/home/trostler/jscoverage-0.4/js'
Makefile.ref:61: disabling JIT per build specification
cd editline; gmake -f Makefile.ref all
gmake[2]: Entering directory `/home/trostler/jscoverage-0.4/js/editline'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/home/trostler/jscoverage-0.4/js/editline'
gmake -f Makefile.ref  ./obj/libjs.a ./obj/libjs.dylib ./obj/js 
gmake[2]: Entering directory `/home/trostler/jscoverage-0.4/js'
Makefile.ref:61: disabling JIT per build specification
g++ -o obj/json.o -c -Wall -Wno-format -MMD -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX -DAVMPLUS_IA32 -DAVMPLUS_UNIX  -UDEBUG -DNDEBUG -UDEBUG_trostler -DEDITLINE -I. -I./obj  -Os -fstrict-aliasing -fno-exceptions -fno-rtti  json.cpp
json.cpp: In method `StringifyClosure::~StringifyClosure()':
jscntxt.h:935: `static void JSAutoTempValueRooter::operator delete(void *, unsigned int)' is private
json.cpp:153: within this context
gmake[2]: *** [obj/json.o] Error 1
gmake[2]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/trostler/jscoverage-0.4/js'
gmake: *** [all] Error 2
SO I basically don't know what I'm doing! I need a legit 'bsd4.11.mk' or something... thanks!! Mark

Guest

Re: unable to start jscoverage-server (OS X 10.6)

Post by Guest » 2010-02-22 7:31 pm

Ok have gotten further - here is my bsd.mk:

Code: Select all


CC = gcc
CCC = g++
CFLAGS +=  -Wall -Wno-format -MMD
OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE

RANLIB = ranlib
MKSHLIB = $(CCC) -shared $(XMKSHLIBOPTS)

SO_SUFFIX = so

#.c.o:
#      $(CC) -c -MD $*.d $(CFLAGS) $<

CPU_ARCH = $(shell uname -m)
ifeq (86,$(findstring 86,$(CPU_ARCH)))
CPU_ARCH = x86
OS_CFLAGS+= -DX86_LINUX
OS_CFLAGS += -DAVMPLUS_IA32
NANOJIT_ARCH = i386
endif
GFX_ARCH = x

OS_LIBS = -lc

ASFLAGS += -x assembler-with-cpp

ifeq ($(CPU_ARCH),alpha)

# Ask the C compiler on alpha linux to let us work with denormalized
# double values, which are required by the ECMA spec.

OS_CFLAGS += -mieee
endif

# Use the editline library to provide line-editing support.
JS_EDITLINE = 1

# Don't allow Makefile.ref to use libmath
NO_LIBM = 1

So now everything in js/ compile & the library is created.
However now in the top-level directory encoding.h can't find stdint.h - which I don't have - so am getting rid of all references to that...

Ed
Posts: 120
Joined: 2008-10-11 6:52 pm

Re: unable to start jscoverage-server (OS X 10.6)

Post by Ed » 2010-02-23 4:38 am

Guest wrote:Hacking further & using 'Darwin.mk' as a template - & taking '-Wstrict-aliasing=2' out of js/config.mk (using gcc 2.95) finally leads to this:

Code: Select all

...
SO I basically don't know what I'm doing! I need a legit 'bsd4.11.mk' or something... thanks!! Mark
That is basically the right idea - if there is no .mk file for your system, you can probably copy one of the others - but the main problem is that GCC 2.95 is very old. You are probably going to get a lot of compilation errors with that. The oldest version I have used to compile jscoverage is from the GCC 3.4.x series. Is there a more recent version of GCC available on your platform? (Maybe it is installed as gcc-3.4, gcc3.4, gcc34, etc.?)

ShiftEleven

Re: unable to start jscoverage-server (OS X 10.6)

Post by ShiftEleven » 2010-03-08 3:16 pm

How has your patch come along? Were you able to get it working?

Post Reply