installing libmozjs-dev will remove ... firefox ubuntu-desktop ubuntu-docs xulrunner-1.9.1 and a lot more

Bug #486079 reported by Sander Jonkers
82
This bug affects 14 people
Affects Status Importance Assigned to Milestone
xulrunner-1.9.1 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: libmozjs-dev

I want to install the development library of SpiderMonkey, which seems to be libmozjs-dev. However, when I try install that, apt-get warns it will remove firefox, ubuntu-desktop and a lot of other apps. IMHO that's a bug.

sander@quirinius:~$ sudo apt-get install libmozjs-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  tcl8.3
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libmozjs0d libnspr4-dev
The following packages will be REMOVED:
  couchdb couchdb-bin desktopcouch evolution-couchdb evolution-documentation-en firefox firefox-3.5 firefox-3.5-branding
  firefox-3.5-gnome-support firefox-gnome-support gnome-user-guide python-desktopcouch python-desktopcouch-records ubufox
  ubuntu-desktop ubuntu-docs xulrunner-1.9.1 xulrunner-1.9.1-gnome-support yelp
The following NEW packages will be installed:
  libmozjs-dev libmozjs0d libnspr4-dev
0 upgraded, 3 newly installed, 19 to remove and 0 not upgraded.
Need to get 844kB of archives.
After this operation, 295MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.
sander@quirinius:~$

ProblemType: Bug
Architecture: i386
Date: Fri Nov 20 23:34:54 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/sbin/synaptic
Package: synaptic 0.62.7ubuntu6
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: synaptic
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Sander Jonkers (jonkers) wrote :
Revision history for this message
Jaromil (jaromil) wrote :

This bug is embarassing: it blocks all users from compiling new applications that link the javascript interpreter

(and a lot of bleeding edge development is going on libmozjs and xulrunner)

also the versioning libmozjs0d -1d -2d is confusing: it doesn't reflects upstream versioning

Revision history for this message
Brian Candler (b-candler) wrote :

I suffer the same problem - if I want to compile couchdb from source against libmozjs-dev (*1), I am forced to uninstall firefox first (*2)

It appears there is a declared package conflict between xulrunner-1.9.1 and libmozjs-dev:

$ apt-cache show xulrunner-1.9.1 | grep Conflicts
Conflicts: j2re1.4, libmozjs-dev, libxul-dev
Conflicts: j2re1.4, libmozjs-dev, libxul-dev

This seems odd because there is no conflict between xulrunner-1.9.1 and libmozjs0d (the runtime packages). Both include a libmozjs.so albeit in different directories. So why would the runtime xulrunner-1.9.1 conflict with the development libmozjs-dev, if the two runtimes don't conflict?

Furthermore, there is no conflict between the two development packages, xulrunner-1.9.1-dev and libmozjs-dev:

$ apt-cache show xulrunner-1.9.1-dev | grep Conflicts
Conflicts: libxul-dev, mozilla-dev, xulrunner-1.9-dev, xulrunner-1.9.2-dev
Conflicts: libxul-dev, mozilla-dev, xulrunner-1.9-dev, xulrunner-1.9.2-dev
$ apt-cache show xulrunner-dev | grep Conflicts
$ apt-cache show libmozjs-dev | grep Conflicts
Conflicts: mozilla-browser (<< 2:1.8)
$

I think that is correct, because xulrunner-1.9.1-dev installs all its files under named directories like
/usr/lib/xulrunner-devel-1.9.1.5

I've checked whether there are any individual file conflicts:

$ dpkg-query -L xulrunner-1.9.1 >xulrunner-1.9.1.files
$ dpkg-query -L xulrunner-1.9.1-dev >xulrunner-1.9.1-dev.files
$ dpkg-query -L xulrunner-dev >xulrunner-dev.files
... install libmozjs-dev ...
$ dpkg-query -L libmozjs0d >libmozjs0d.files
$ dpkg-query -L libmozjs-dev >libmozjs-dev.files
$ cat *.files | sort | uniq -c | grep -v ' 1 '
      5 /.
      5 /usr
      2 /usr/include
      4 /usr/lib
      2 /usr/lib/pkgconfig
      2 /usr/lib/xulrunner-1.9.1.5
      5 /usr/share
      5 /usr/share/doc

So there are no overlaps, apart from common directories of course.

IMO it seems the declared conflict is superfluous, but there may be some subtle reason for it that I'm not aware of. If there is a real conflict, perhaps the two runtimes should conflict, or the two dev packages should conflict.

Regards,

Brian.

(*1) It's possible to build couchdb against xulrunner-dev if you jump through some hoops with LD_RUN_PATH, but that's beside the point.

(*2) I am running xubuntu karmic so I don't lose as many packages as the OP, because couchdb is not part of xubuntu-desktop. But I do lose firefox and related packages like ubufox.

Revision history for this message
Micah Gersten (micahg) wrote :

Thank you for reporting this to Ubuntu. libmozjs-dev is provided by xulrunner-1.9.1-dev now. Please try linking against that.

affects: xulrunner (Ubuntu) → xulrunner-1.9.1 (Ubuntu)
Changed in xulrunner-1.9.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
sciasbat (fabio-forno) wrote :

It's possible to compile against xulrunner-1.9.1, but there is no stable symlink to that package (1.9.1), so that when the the lib is updated via apt (eg from 1.9.1.5 to 1.9.1.6) all the programs compiled against it break (just happened with my couchdb installation).

Revision history for this message
Brian Candler (b-candler) wrote :

More specifically: the runtime package xulrunner-1.9.1 may today contain /usr/lib/xulrunner-1.9.1.5/libmozjs.so, but tomorrow may contain /usr/lib/xulrunner-1.9.1.6/libmozjs.so. So any application built against the first (e.g. using LD_RUN_PATH) will stop working when xulrunner is upgraded.

xulrunner will be a suitable production replacement for libmozjs when it's installed in a stable location, preferably under /usr/lib.

In the mean time: libmozjs.so from the libmozjs package continues to work just fine. I see no reason to continue the underlying problem reported here, which is that libmozjs-dev has superfluous conflicts declared. All this achieves is that it's impossible to install libmozjs-dev on an ubuntu-desktop machine without uninstalling a load of important stuff.

Note that on ubuntu-server, where you typically don't have firefox installed, libmozjs-dev installs just fine, and you can then build stuff which links against libmozjs. Such compiled code would then *run* just fine on an ubuntu-desktop machine, because you can install the libmozjs package without problems.

So why declare a conflict on libmozjs-dev but not on libmozjs?

Revision history for this message
Jaromil (jaromil) wrote :

i second your analysis and conclusions, thanks Brian.

should we move this bug to libmozjs-dev and fix the deps of that package?

BTW, why libmozjs.so is duplicated in two packages? this is so confusing.

Revision history for this message
Micah Gersten (micahg) wrote : Re: [Bug 486079] Re: installing libmozjs-dev will remove ... firefox ubuntu-desktop ubuntu-docs xulrunner-1.9.1 and a lot more

The problem is there is no longer a libmozjs package for xulrunner-1.9
and up. The version you see if from xulrunner-1.8

On 01/03/2010 07:25 AM, Brian Candler wrote:
> More specifically: the runtime package xulrunner-1.9.1 may today contain
> /usr/lib/xulrunner-1.9.1.5/libmozjs.so, but tomorrow may contain
> /usr/lib/xulrunner-1.9.1.6/libmozjs.so. So any application built against
> the first (e.g. using LD_RUN_PATH) will stop working when xulrunner is
> upgraded.
>
> xulrunner will be a suitable production replacement for libmozjs when
> it's installed in a stable location, preferably under /usr/lib.
>
> In the mean time: libmozjs.so from the libmozjs package continues to
> work just fine. I see no reason to continue the underlying problem
> reported here, which is that libmozjs-dev has superfluous conflicts
> declared. All this achieves is that it's impossible to install libmozjs-
> dev on an ubuntu-desktop machine without uninstalling a load of
> important stuff.
>
> Note that on ubuntu-server, where you typically don't have firefox
> installed, libmozjs-dev installs just fine, and you can then build stuff
> which links against libmozjs. Such compiled code would then *run* just
> fine on an ubuntu-desktop machine, because you can install the libmozjs
> package without problems.
>
> So why declare a conflict on libmozjs-dev but not on libmozjs?
>
>

Revision history for this message
Stephen Day (stevvooe) wrote :

Whats the word on this? How do I fix this?

Revision history for this message
Stephen Day (stevvooe) wrote :

I ran into this while trying to link a trunk version of couch and fixed it by adding a few careful configure options:

./configure --prefix=$HOME/couchdb --with-js-include=/usr/include/xulrunner-1.9.1.7/unstable/ --with-js-lib=/usr/lib/xulrunner-1.9.1.7/

I also had success with adding a few well placed links. Anyway to update the xulrunner package to place these links so that autotools can find these correctly?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xulrunner-1.9.1 (Ubuntu) because there has been no activity for 60 days.]

Changed in xulrunner-1.9.1 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.