Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 371733 - www-client/elinks-0.12_pre5-r1 - lib.o: undefined reference to `JS_SetOperationCallback'
Summary: www-client/elinks-0.12_pre5-r1 - lib.o: undefined reference to `JS_SetOperati...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 372041
Blocks:
  Show dependency tree
 
Reported: 2011-06-15 10:30 UTC by Raphaël Droz
Modified: 2011-07-11 20:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,91.62 KB, text/plain)
2011-06-15 10:32 UTC, Raphaël Droz
Details
emerge --info (emerge.info,4.99 KB, text/plain)
2011-06-15 10:33 UTC, Raphaël Droz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raphaël Droz 2011-06-15 10:30:33 UTC
www-client/elinks-0.12_pre5-r1 fails to link.

Reproducible: Always




related: bug #350256 and bug #349660
Comment 1 Raphaël Droz 2011-06-15 10:32:52 UTC
Created attachment 277099 [details]
build log

build.log.
the error:


lib.o: In function `continue_download':
download.c:(.text+0x7b171): warning: the use of `tempnam' is dangerous, better use `mkstemp'
lib.o: In function `setup_safeguard.clone.0':
spidermonkey.c:(.text+0x45426): undefined reference to `JS_SetOperationCallback
Comment 2 Raphaël Droz 2011-06-15 10:33:18 UTC
Created attachment 277101 [details]
emerge --info
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2011-06-16 21:26:30 UTC
(In reply to comment #2)
> Created attachment 277101 [details]
> emerge --info

What version of spidermonkey do you have installed on your system?
Comment 4 Raphaël Droz 2011-06-16 22:19:42 UTC
spidermonkey 1.9.2.15
Comment 5 Roger 2011-06-17 06:58:57 UTC
This undefined reference seems to originate from the patch ".../elinks/files/elinks-0.12pre5-spidermonkey-callback.patch".  Which seems to be for >=dev-lang/spidermonkey-1.9 (=dev-lang/spidermonkey-1.9.2.15).

You can view the elinks/Changelog and see who committed the patch (and contact them?) -- maybe they misspelled the function name?

I've commented out this patch within the elinks-0.12_pre5-r1.ebuild, and Elinks seems to build fine now here now, but have not tested Javascript functionality at all.  I'm not sure why the person committed the previous stated patch.


(On a side note, I now keep seeing portage wanting to rebuild elinks, even after it was already built -- complaining and wanting emerge -pv @preserved-rebuild.  I'm sure this side issue is either nothing or miniscule. My notes for the time being, to lead you all in the right direction!)
Comment 6 Roger 2011-06-17 12:31:56 UTC
This bug is induced by a leftover spidermonkey-1.7.0 "/usr/lib/libjs.so" file.  See Spidermonkey Bug #372041. 

Manually move or remove it (mv/rm).  (Spidermonkey-1.9.2.15 no longer has a "/usr/lib/libjs.so" file.)

Then rebuild ELinks with the usual callback.patch.
Comment 7 Raphaël Droz 2011-06-17 13:34:05 UTC
After the suppression of libjs.so elinks compiles and links fine.
The following script (a simple redirection with a timeOut) is supported.
http://www.tizag.com/javascriptT/examples/timedelay.php
Comment 8 Roger 2011-06-17 19:13:27 UTC
Javascript redirect works here on x86, too.
Comment 9 K. Posern 2011-06-21 15:37:51 UTC
Thanks for the solution!

Same here [amd64 / 64bit]:

qlist spidermonkey|grep libjs:
/usr/lib64/libjs.so
/usr/lib64/libjs_static.a

qlist spidermonkey|grep libjs|xargs rm

USE=threadsafe emerge -vtq spidermonkey
<<< HERE I HAVE TO ADMIT THAT I ALSO CHANGED THE threadsafe useflag... don't know if this changes the behaviour of the ebuild to generate [or not] the libjs.so file... ... but I guess not...

qlist spidermonkey|grep libjs:
/usr/lib64/libjs_static.a

And then www-client/elinks-0.12_pre5-r1 compiled fine!
Comment 10 Roger 2011-06-22 07:51:46 UTC
This bug can be closed, but be weary of other users who may have an orphaned libjs.so file to remaining on their system, elinks will then fail to compile.

I'm marking as resolved-obsolete as this may have occurred by compiling using an old spidermonkey-1.7.0 ebuild, but was later fixed.  Either manually removing the file, or reinstalling spidermonkey-1.7.0 and then upgrading to spidermonkey-1.9 should reclaim and remove the file after the upgrade to spidermonkey-1.9.