3

The elinks manual says if the SpiderMonkey library is installed then the configure script "should" recognize it and enable JavaScript support. But, it's not working for me so far.

Setup

  • I've got the latest elinks (2018-03-02) from git cloned under my home directory.
  • libmozjs-dev 24.8.1esr-2~deb7u1 from the Debian repos.
  • CONFIG_SCRIPTING_SPIDERMONKEY=yes Is turned on in features.conf.

Results

  • elinks builds successfully and works, but without JavaScript.

From configure output and features.log:

ECMAScript (JavaScript) ......... no

config.log has the following:

configure:9236: checking for SpiderMonkey (1.8.5 or later) in pkg-config mozjs185
Package mozjs185 was not found in the pkg-config search path.
Perhaps you should add the directory containing `mozjs185.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mozjs185' found
configure:9282: result: no
configure:9236: checking for SpiderMonkey (1.8.5 or later) in pkg-config mozilla-js
configure:9270: gcc -o conftest -g -O2 -Wall -include /usr/include/mozjs/mozjs/js/RequiredDefines.h -I/usr/include/nspr -I/usr/include/mozjs    -include /usr/include/mozjs/mozjs/js/RequiredDefines.h -I/usr/include/nspr -I/usr/include/mozjs    conftest.c -lmozjs   -ldl  -lz -lbz2 >&5
cc1: fatal error: /usr/include/mozjs/mozjs/js/RequiredDefines.h: No such file or directory
compilation terminated.

There is a directory /usr/include/mozjs but it doesn't have a child directory mozjs. There exists a /usr/include/mozjs/js/RequiredDefines.h, so I think I'm on the right track. It sort of looks like the installed SpiderMonkey is not recent enough, but I don't know whether version "24.8.1" is in the same timeline as the "1.8.5" that the configure script is looking for -- perhaps it's too new and elinks got left behind. The 1.8.5 version requirement was added to the elinks NEWS file in 2011... on the other hand the repo has commits as recently as last year.

If anyone has had success compiling JavaScript support into elinks, please advise. Experiences somewhat contemporaneous to the year 2018 would be most helpful : )

1 Answer 1

1

Currently ELinks expects SpiderMonkey 1.8.5 (libmozjs185-dev). It "should" be "possible" to update the build script for newer releases but the current HEAD is only happy with this specific version.

1
  • 1
    I'm still understanding how the autoconf script does its version-number check but that looks like where things go wrong(?). Editing the header path that gets generated into Makefile just causes configure to say the scripting library is "found, but unusable".
    – gws
    Mar 6, 2018 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .