Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408813 - media-video/avidemux-2.5.6-r1 configure failed: Could not find SpiderMonkey
Summary: media-video/avidemux-2.5.6-r1 configure failed: Could not find SpiderMonkey
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 408885 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-19 07:58 UTC by juantxorena@gmail.com
Modified: 2012-04-18 17:31 UTC (History)
14 users (show)

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


Attachments
patch that gets avidemux past configure stage with system spidermonkey (avidemux-2.5.6-r1-ebuild-spidermonkey.patch,804 bytes, patch)
2012-03-19 16:38 UTC, JTRiley
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description juantxorena@gmail.com 2012-03-19 07:58:46 UTC
media-video/avidemux-2.5.6-r1, recently put on portage, doesn't install. The build.log throws the following lines:

-- Checking for SpiderMonkey
-- *************************
Could not find jsapi.h
CMake Error at cmake/admConfigHelper.cmake:16 (MESSAGE):
  Could not find SpiderMonkey
Call Stack (most recent call first):
  cmake/admCheckMiscLibs.cmake:100 (PRINT_LIBRARY_INFO)
  CMakeLists.txt:136 (INCLUDE)

Is obviously a spidermonkey-related issue. I'm using the latest stable release of it, which is dev-lang/spidermonkey-1.8.2.15, but I've tried with dev-lang/spidermonkey-1.8.2.15-r1 with the same result.

The error says that it cannot find jsapi.h, but is installed by both versions of spidermonkey at /usr/include/js/jsapi.h

Reproducible: Always

Steps to Reproduce:
1. Try to install latest unstable avidemux version

Actual Results:  
Doesn't pass the configure phase

Expected Results:  
Get installed
Comment 1 Damien Granger 2012-03-19 08:52:18 UTC
Modifying the ebuild by switching in src_configure the following compile flag makes the trick:
-DUSE_SYSTEM_SPIDERMONKEY=OFF

That way avidemux should use the builtin spidermonkey lib. Hope this will get fixed because we'd rather use the system spidermonkey library.

Note that this flag was not present in former media-video/avidemux-2.5.6.ebuild
Would that mean that its default behavior is OFF?
Comment 2 juantxorena@gmail.com 2012-03-19 11:25:48 UTC
The r1 revision was made for removing the dependency of the internal library and force the use of the external one, which is a good idea IMHO. Avidemux is known to suck in that particular matter.
Comment 3 Small_Penguin 2012-03-19 14:59:03 UTC
You can make it find the header file by adding following command at the end of the src_prepare() function:

sed -i -e 's/jsapi.h/js\/jsapi.h/' cmake/admCheckMiscLibs.cmake || die

Unfortunately, it still won't find the js library.
Comment 4 JTRiley 2012-03-19 16:38:25 UTC
Created attachment 305887 [details, diff]
patch that gets avidemux past configure stage with system spidermonkey

I was able to fix the avidemux 2.5.6-r1 configure check by explicitly specifying the spidermonkey include and libs to mycmakeargs:

For SpiderMonkey==1.8.5-r1:

-DSPIDERMONKEY_INCLUDE_DIR="${EPREFIX}/usr/include/js"
-DSPIDERMONKEY_LIBRARY_DIR="${EPREFIX}/usr/$(get_libdir)/libmozjs185.so"

For 1.8 < SpiderMonkey < 1.8.5-r1:

-DSPIDERMONKEY_INCLUDE_DIR="${EPREFIX}/usr/include/js"
-DSPIDERMONKEY_LIBRARY_DIR="${EPREFIX}/usr/$(get_libdir)/libmozjs.so"

For SpiderMonkey <= 1.7.0:

-DSPIDERMONKEY_INCLUDE_DIR="${EPREFIX}/usr/include/js"
-DSPIDERMONKEY_LIBRARY_DIR="${EPREFIX}/usr/$(get_libdir)/libjs.so"

After getting past the configure stage I run into the following compile issue with both 1.8.2.15 and 1.8.5 versions of spidermonkey:

https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=709892

I was able to successfully build avidemux against the system's spidermonkey using version 1.7.0

This leads me to believe that avidemux 2.5.6 is not compatible with Spidermonkey 1.8* at all. I updated the ebuild's deps and added the necessary cmake args - patch attached. If you'd rather have the full patched ebuild it's in my overlay:

http://git.overlays.gentoo.org/gitweb/?p=user/jtriley.git;a=blob;f=media-video/avidemux/avidemux-2.5.6-r1.ebuild
Comment 5 Bernard Cafarelli gentoo-dev 2012-03-19 17:23:40 UTC
*** Bug 408885 has been marked as a duplicate of this bug. ***
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2012-03-19 19:03:11 UTC
2.5.6-r1 masked until the build failure is solved.
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2012-03-19 22:27:56 UTC
I had to revert to use bundled spidermonkey :(
Avidemux expects a very old version of spidermonkey and the effort to update it to use a newer version would be non-trivial. Please bug upstream about this, although I suspect most of the development takes place on the 2.6 branch nowadays...