You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Noah Slater <ns...@tumbolia.org> on 2009/11/24 23:34:57 UTC

libmozjs-dev conflicts with firefox on Ubuntu

Hey,

I'm just trying to prepare the release on a fresh Ubuntu 9.10 virtual machine, and I've run into something rather strange. The libmozjs-dev library conflicts, through some weird dependancy chain, with firefox. Has anyone run into this before? Any Ubuntu hackers know what's going on here?

Thanks,

Noah

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Brian Candler <B....@pobox.com>.
On Tue, Nov 24, 2009 at 10:34:57PM +0000, Noah Slater wrote: I'm just trying
> to prepare the release on a fresh Ubuntu 9.10 virtual machine, and I've
> run into something rather strange. The libmozjs-dev library conflicts,
> through some weird dependancy chain, with firefox. Has anyone run into
> this before? Any Ubuntu hackers know what's going on here?

Yes.

The solution I use is to link with spidermonkey from xulrunner-dev, and
set LD_RUN_PATH when compiling so the binary knows where it is. Details in
a comment at
https://issues.apache.org/jira/browse/COUCHDB-562

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Brian Candler <B....@pobox.com>.
On Wed, Nov 25, 2009 at 09:35:57AM +0000, Brian Candler wrote:
> Maybe the ubuntu-server flavour would be OK too, I haven't tried that for
> 9.10.

I upgraded a VM from ubuntu-server jaunty to ubuntu-server karmic, on the
grounds that I would have to do it sooner or later anyway.

The good news:

* ubuntu-server still doesn't install the ubuntu couchdb package by default

* libmozjs-dev remained installed happily (no firefox/xulrunner for it to
  conflict with)

* I was able to build r884057 against libmozjs-dev and it works.
  (I was confused by a whole load of invalid_json errors being thrown;
  it turned out to be that under /usr/local/lib/couchdb/erlang/lib
  I had both mochiweb-r97 and mochiweb-r113, and zapping r97 fixed
  everything. I believe erlang thinks that r97 > r113 :-)

The bad news:

* if you wanted to use xulrunner-dev, you would get a metric crapload of
  irrelevant packages installed as well.

# apt-get install xulrunner-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  binutils-static
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  dictionaries-common fontconfig hicolor-icon-theme hunspell-en-us libasound2
  libatk1.0-0 libatk1.0-data libavahi-client3 libavahi-common-data
  libavahi-common3 libcairo2 libcanberra0 libcups2 libdatrie1
  libdirectfb-1.2-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
  libhunspell-1.2-0 libidl0 libjasper1 libjpeg62 libnss3-1d libnss3-dev
  libogg0 libpango1.0-0 libpango1.0-common libpixman-1-0 libpng12-0
  libstartup-notification0 libsysfs2 libtdb1 libthai-data libthai0 libtiff4
  libts-0.0-0 libvorbis0a libvorbisfile3 libxcb-atom1 libxcb-aux0
  libxcb-event1 libxcb-render-util0 libxcb-render0 libxcomposite1 libxcursor1
  libxfont1 libxrandr2 tsconf x-ttcidfont-conf xfonts-encodings xfonts-utils
  xulrunner-1.9.1 xulrunner-1.9.1-dev
Suggested packages:
  ispell jed-extra hunspell openoffice.org-hunspell openoffice.org-core
  libasound2-plugins libcanberra-gtk0 libcanberra-pulse cups-common
  librsvg2-common gvfs libjasper-runtime ttf-japanese-gothic
  ttf-japanese-mincho ttf-thryomanes ttf-baekmuk ttf-arphic-gbsn00lp
  ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp
The following packages will be REMOVED
  libmozjs-dev
The following NEW packages will be installed
  dictionaries-common fontconfig hicolor-icon-theme hunspell-en-us libasound2
  libatk1.0-0 libatk1.0-data libavahi-client3 libavahi-common-data
  libavahi-common3 libcairo2 libcanberra0 libcups2 libdatrie1
  libdirectfb-1.2-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
  libhunspell-1.2-0 libidl0 libjasper1 libjpeg62 libnss3-1d libnss3-dev
  libogg0 libpango1.0-0 libpango1.0-common libpixman-1-0 libpng12-0
  libstartup-notification0 libsysfs2 libtdb1 libthai-data libthai0 libtiff4
  libts-0.0-0 libvorbis0a libvorbisfile3 libxcb-atom1 libxcb-aux0
  libxcb-event1 libxcb-render-util0 libxcb-render0 libxcomposite1 libxcursor1
  libxfont1 libxrandr2 tsconf x-ttcidfont-conf xfonts-encodings xfonts-utils
  xulrunner-1.9.1 xulrunner-1.9.1-dev xulrunner-dev
0 upgraded, 54 newly installed, 1 to remove and 0 not upgraded.
Need to get 22.9MB of archives.
After this operation, 105MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

So I have decided against this for now.

Cheers,

Brian.

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Brian Candler <B....@pobox.com>.
On Tue, Nov 24, 2009 at 10:42:11PM +0000, Noah Slater wrote:
> This is pretty serious IMO. CouchDB is now conflicting with Firefox and a bunch of other things.

The CouchDB which ubuntu bundles is built against xulrunner's libmozjs, and
they patch the startup script so that LD_LIBRARY_PATH is set.
http://bazaar.launchpad.net/%7Eubuntu-branches/ubuntu/karmic/couchdb/karmic/annotate/head%3A/debian/patches/mozjs1.9_ldlibpath.patch

More details in the thread starting
http://mail-archives.apache.org/mod_mbox/couchdb-user/200911.mbox/<20...@uk.tiscali.com>

Incidentally, I use xubuntu on my fairly old laptop. A big advantage of this
over regular ubuntu is that xubuntu-desktop depends on a *lot* fewer
packages than ubuntu-desktop; and in particular, you don't get ubuntu's own
build of couchdb. This is preferable when you want to build your own.

Maybe the ubuntu-server flavour would be OK too, I haven't tried that for
9.10.

Regards,

Brian.

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Matt Goodall <ma...@gmail.com>.
2009/11/25 Randall Leeds <ra...@gmail.com>:
> Seems like the best thing would be for the xulrunner(-dev) packages in
> ubuntu to make sure pkg-config can find the sdk and then use pkg-config to
> find the libraries.

Yes, the path has already changed once since Karmic was released.

- Matt

>
> -Randall
>
> On Tue, Nov 24, 2009 at 16:11, Benoit Chesneau <bc...@gmail.com> wrote:
>
>> On Wed, Nov 25, 2009 at 1:01 AM, Jan Lehnardt <ja...@apache.org> wrote:
>> >
>> > On 25 Nov 2009, at 00:40, Noah Slater wrote:
>> >
>> >>
>> >> On 24 Nov 2009, at 23:32, Noah Slater wrote:
>> >>
>> >>>
>> >>> On 24 Nov 2009, at 22:51, Elliot Murphy wrote:
>> >>>
>> >>>> libmozjs is not available in the Ubuntu 9.10 environment, so the
>> CouchDB package is patched to build and run against xulrunner, where
>> libmozjs.so is available. I don't know all the details of this, but it's
>> some sort of complication with the way spidermonkey releases are made (or
>> not made). You definitely don't want to install libmozjs on Ubuntu 9.10, as
>> you saw it will try to remove the world.
>> >>>>
>> >>>> I'm know you know this already, but just so the search engines help
>> the next person out: the easiest way to get the correct build dependencies
>> installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then
>> you'll have all the right xulrunner-dev stuff installed to be able to build
>> from source.
>> >>>
>> >>> If I do this, will I need to hack any environment variables or anything
>> else?
>> >>
>> >> Nope, this does not work with a simple "./configure" which is a bit of a
>> problem.
>> >>
>> >> What do you suggest Ubuntu users do if they want to build CouchDB from
>> source?
>> >>
>> >> Having to hack around with stuff is undesirable.
>> >>
>> >> If there is a patch to configure.ac someone wants to submit, I'd be
>> happy to apply.
>> >>
>> >> At the moment, we look in a bunch of standard directories for the
>> dependancies, and we could modify this.
>> >
>> > I think additionally looking in the non-standard directory that xulrunner
>> uses in addition to the existing search path is the most sensible way
>> forward.
>> > These would be /usr/lib/xulrunner-1.9.1.5/ for libmoz.js (--with-js-lib)
>> and /usr/include/xulrunner-1.9.1.5/unstable for jsapi.h (--with-js-include).
>> We'd need to check how much of the version string we can wildcard.
>> >
>> > Cheers
>> > Jan
>> > --
>> >
>> >
>>
>> Could we build statically couchjs ? actually building it against
>> xullrunner lib won't be enough since it need to find them when it's
>> loaded aparts doing the hack ubuntu does in their startup script.
>>
>>
>> I could have a look in configure.ac later this morning but wonder what
>> is the best way
>>
>> - benoît
>>
>

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Randall Leeds <ra...@gmail.com>.
Seems like the best thing would be for the xulrunner(-dev) packages in
ubuntu to make sure pkg-config can find the sdk and then use pkg-config to
find the libraries.

-Randall

On Tue, Nov 24, 2009 at 16:11, Benoit Chesneau <bc...@gmail.com> wrote:

> On Wed, Nov 25, 2009 at 1:01 AM, Jan Lehnardt <ja...@apache.org> wrote:
> >
> > On 25 Nov 2009, at 00:40, Noah Slater wrote:
> >
> >>
> >> On 24 Nov 2009, at 23:32, Noah Slater wrote:
> >>
> >>>
> >>> On 24 Nov 2009, at 22:51, Elliot Murphy wrote:
> >>>
> >>>> libmozjs is not available in the Ubuntu 9.10 environment, so the
> CouchDB package is patched to build and run against xulrunner, where
> libmozjs.so is available. I don't know all the details of this, but it's
> some sort of complication with the way spidermonkey releases are made (or
> not made). You definitely don't want to install libmozjs on Ubuntu 9.10, as
> you saw it will try to remove the world.
> >>>>
> >>>> I'm know you know this already, but just so the search engines help
> the next person out: the easiest way to get the correct build dependencies
> installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then
> you'll have all the right xulrunner-dev stuff installed to be able to build
> from source.
> >>>
> >>> If I do this, will I need to hack any environment variables or anything
> else?
> >>
> >> Nope, this does not work with a simple "./configure" which is a bit of a
> problem.
> >>
> >> What do you suggest Ubuntu users do if they want to build CouchDB from
> source?
> >>
> >> Having to hack around with stuff is undesirable.
> >>
> >> If there is a patch to configure.ac someone wants to submit, I'd be
> happy to apply.
> >>
> >> At the moment, we look in a bunch of standard directories for the
> dependancies, and we could modify this.
> >
> > I think additionally looking in the non-standard directory that xulrunner
> uses in addition to the existing search path is the most sensible way
> forward.
> > These would be /usr/lib/xulrunner-1.9.1.5/ for libmoz.js (--with-js-lib)
> and /usr/include/xulrunner-1.9.1.5/unstable for jsapi.h (--with-js-include).
> We'd need to check how much of the version string we can wildcard.
> >
> > Cheers
> > Jan
> > --
> >
> >
>
> Could we build statically couchjs ? actually building it against
> xullrunner lib won't be enough since it need to find them when it's
> loaded aparts doing the hack ubuntu does in their startup script.
>
>
> I could have a look in configure.ac later this morning but wonder what
> is the best way
>
> - benoît
>

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Benoit Chesneau <bc...@gmail.com>.
On Wed, Nov 25, 2009 at 1:01 AM, Jan Lehnardt <ja...@apache.org> wrote:
>
> On 25 Nov 2009, at 00:40, Noah Slater wrote:
>
>>
>> On 24 Nov 2009, at 23:32, Noah Slater wrote:
>>
>>>
>>> On 24 Nov 2009, at 22:51, Elliot Murphy wrote:
>>>
>>>> libmozjs is not available in the Ubuntu 9.10 environment, so the CouchDB package is patched to build and run against xulrunner, where libmozjs.so is available. I don't know all the details of this, but it's some sort of complication with the way spidermonkey releases are made (or not made). You definitely don't want to install libmozjs on Ubuntu 9.10, as you saw it will try to remove the world.
>>>>
>>>> I'm know you know this already, but just so the search engines help the next person out: the easiest way to get the correct build dependencies installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then you'll have all the right xulrunner-dev stuff installed to be able to build from source.
>>>
>>> If I do this, will I need to hack any environment variables or anything else?
>>
>> Nope, this does not work with a simple "./configure" which is a bit of a problem.
>>
>> What do you suggest Ubuntu users do if they want to build CouchDB from source?
>>
>> Having to hack around with stuff is undesirable.
>>
>> If there is a patch to configure.ac someone wants to submit, I'd be happy to apply.
>>
>> At the moment, we look in a bunch of standard directories for the dependancies, and we could modify this.
>
> I think additionally looking in the non-standard directory that xulrunner uses in addition to the existing search path is the most sensible way forward.
> These would be /usr/lib/xulrunner-1.9.1.5/ for libmoz.js (--with-js-lib) and /usr/include/xulrunner-1.9.1.5/unstable for jsapi.h (--with-js-include). We'd need to check how much of the version string we can wildcard.
>
> Cheers
> Jan
> --
>
>

Could we build statically couchjs ? actually building it against
xullrunner lib won't be enough since it need to find them when it's
loaded aparts doing the hack ubuntu does in their startup script.


I could have a look in configure.ac later this morning but wonder what
is the best way

- benoît

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Jan Lehnardt <ja...@apache.org>.
On 25 Nov 2009, at 00:40, Noah Slater wrote:

> 
> On 24 Nov 2009, at 23:32, Noah Slater wrote:
> 
>> 
>> On 24 Nov 2009, at 22:51, Elliot Murphy wrote:
>> 
>>> libmozjs is not available in the Ubuntu 9.10 environment, so the CouchDB package is patched to build and run against xulrunner, where libmozjs.so is available. I don't know all the details of this, but it's some sort of complication with the way spidermonkey releases are made (or not made). You definitely don't want to install libmozjs on Ubuntu 9.10, as you saw it will try to remove the world.
>>> 
>>> I'm know you know this already, but just so the search engines help the next person out: the easiest way to get the correct build dependencies installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then you'll have all the right xulrunner-dev stuff installed to be able to build from source.
>> 
>> If I do this, will I need to hack any environment variables or anything else?
> 
> Nope, this does not work with a simple "./configure" which is a bit of a problem.
> 
> What do you suggest Ubuntu users do if they want to build CouchDB from source?
> 
> Having to hack around with stuff is undesirable.
> 
> If there is a patch to configure.ac someone wants to submit, I'd be happy to apply.
> 
> At the moment, we look in a bunch of standard directories for the dependancies, and we could modify this.

I think additionally looking in the non-standard directory that xulrunner uses in addition to the existing search path is the most sensible way forward.
These would be /usr/lib/xulrunner-1.9.1.5/ for libmoz.js (--with-js-lib) and /usr/include/xulrunner-1.9.1.5/unstable for jsapi.h (--with-js-include). We'd need to check how much of the version string we can wildcard.

Cheers
Jan
--


Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Noah Slater <ns...@tumbolia.org>.
On 24 Nov 2009, at 23:32, Noah Slater wrote:

> 
> On 24 Nov 2009, at 22:51, Elliot Murphy wrote:
> 
>> libmozjs is not available in the Ubuntu 9.10 environment, so the CouchDB package is patched to build and run against xulrunner, where libmozjs.so is available. I don't know all the details of this, but it's some sort of complication with the way spidermonkey releases are made (or not made). You definitely don't want to install libmozjs on Ubuntu 9.10, as you saw it will try to remove the world.
>> 
>> I'm know you know this already, but just so the search engines help the next person out: the easiest way to get the correct build dependencies installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then you'll have all the right xulrunner-dev stuff installed to be able to build from source.
> 
> If I do this, will I need to hack any environment variables or anything else?

Nope, this does not work with a simple "./configure" which is a bit of a problem.

What do you suggest Ubuntu users do if they want to build CouchDB from source?

Having to hack around with stuff is undesirable.

If there is a patch to configure.ac someone wants to submit, I'd be happy to apply.

At the moment, we look in a bunch of standard directories for the dependancies, and we could modify this.


Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Noah Slater <ns...@tumbolia.org>.
On 24 Nov 2009, at 22:51, Elliot Murphy wrote:

> libmozjs is not available in the Ubuntu 9.10 environment, so the CouchDB package is patched to build and run against xulrunner, where libmozjs.so is available. I don't know all the details of this, but it's some sort of complication with the way spidermonkey releases are made (or not made). You definitely don't want to install libmozjs on Ubuntu 9.10, as you saw it will try to remove the world.
> 
> I'm know you know this already, but just so the search engines help the next person out: the easiest way to get the correct build dependencies installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then you'll have all the right xulrunner-dev stuff installed to be able to build from source.

If I do this, will I need to hack any environment variables or anything else?

Thanks,

Noah

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Elliot Murphy <el...@canonical.com>.
On 11/24/2009 05:42 PM, Noah Slater wrote:
>
> On 24 Nov 2009, at 22:39, Benoit Chesneau wrote:
>
>> On Tue, Nov 24, 2009 at 11:34 PM, Noah Slater<ns...@tumbolia.org>  wrote:
>>> Hey,
>>>
>>> I'm just trying to prepare the release on a fresh Ubuntu 9.10 virtual machine, and I've run into something rather strange. The libmozjs-dev library conflicts, through some weird dependancy chain, with firefox. Has anyone run into this before? Any Ubuntu hackers know what's going on here?
>>>
>>> Thanks,
>>>
>>> Noah
>>
>> Afaik this is the usual xulrunner mess. On ubuntu CouchDB is build
>> against xulrunner. Don't remember exact path, but there is something
>> about it in ml.
>
> Found a matching bug report:
>
> https://bugs.launchpad.net/ubuntu/+source/xulrunner/+bug/486079
>
> This is pretty serious IMO. CouchDB is now conflicting with Firefox and a bunch of other things.
>


libmozjs is not available in the Ubuntu 9.10 environment, so the CouchDB 
package is patched to build and run against xulrunner, where libmozjs.so 
is available. I don't know all the details of this, but it's some sort 
of complication with the way spidermonkey releases are made (or not 
made). You definitely don't want to install libmozjs on Ubuntu 9.10, as 
you saw it will try to remove the world.

I'm know you know this already, but just so the search engines help the 
next person out: the easiest way to get the correct build dependencies 
installed on Ubuntu (or Debian) is "apt-get build-dep couchdb" and then 
you'll have all the right xulrunner-dev stuff installed to be able to 
build from source.

The situation with libmozjs vs xulrunner in Ubuntu is somewhat confusing 
and annoying for developers, and I have not yet worked out how I might 
do something tangible to help improve things. At the Ubuntu Developer 
Summit in Dallas last week I brought this up with Alexander Sack who up 
until a few days ago was the Firefox/Mozilla maintainer in Ubuntu, and 
he was going to try and put me in touch with the right people to figure 
out how to improve things, but so far nothing meaningful to report.

-- 
Elliot Murphy | https://launchpad.net/~statik/

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Matt Goodall <ma...@gmail.com>.
2009/11/24 Noah Slater <ns...@tumbolia.org>:
>
> On 24 Nov 2009, at 22:39, Benoit Chesneau wrote:
>
>> On Tue, Nov 24, 2009 at 11:34 PM, Noah Slater <ns...@tumbolia.org> wrote:
>>> Hey,
>>>
>>> I'm just trying to prepare the release on a fresh Ubuntu 9.10 virtual machine, and I've run into something rather strange. The libmozjs-dev library conflicts, through some weird dependancy chain, with firefox. Has anyone run into this before? Any Ubuntu hackers know what's going on here?
>>>
>>> Thanks,
>>>
>>> Noah
>>
>> Afaik this is the usual xulrunner mess. On ubuntu CouchDB is build
>> against xulrunner. Don't remember exact path, but there is something
>> about it in ml.
>
> Found a matching bug report:
>
> https://bugs.launchpad.net/ubuntu/+source/xulrunner/+bug/486079
>
> This is pretty serious IMO. CouchDB is now conflicting with Firefox and a bunch of other things.
>
>

Try this, http://mattgoodall.blogspot.com/2009/09/build-couchdb-on-ubuntu-910-karmic.html

I had to dig into the source for Ubuntu's CouchDB build to find out what to do.

- Matt

Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Noah Slater <ns...@tumbolia.org>.
On 24 Nov 2009, at 22:39, Benoit Chesneau wrote:

> On Tue, Nov 24, 2009 at 11:34 PM, Noah Slater <ns...@tumbolia.org> wrote:
>> Hey,
>> 
>> I'm just trying to prepare the release on a fresh Ubuntu 9.10 virtual machine, and I've run into something rather strange. The libmozjs-dev library conflicts, through some weird dependancy chain, with firefox. Has anyone run into this before? Any Ubuntu hackers know what's going on here?
>> 
>> Thanks,
>> 
>> Noah
> 
> Afaik this is the usual xulrunner mess. On ubuntu CouchDB is build
> against xulrunner. Don't remember exact path, but there is something
> about it in ml.

Found a matching bug report:

https://bugs.launchpad.net/ubuntu/+source/xulrunner/+bug/486079

This is pretty serious IMO. CouchDB is now conflicting with Firefox and a bunch of other things.


Re: libmozjs-dev conflicts with firefox on Ubuntu

Posted by Benoit Chesneau <bc...@gmail.com>.
On Tue, Nov 24, 2009 at 11:34 PM, Noah Slater <ns...@tumbolia.org> wrote:
> Hey,
>
> I'm just trying to prepare the release on a fresh Ubuntu 9.10 virtual machine, and I've run into something rather strange. The libmozjs-dev library conflicts, through some weird dependancy chain, with firefox. Has anyone run into this before? Any Ubuntu hackers know what's going on here?
>
> Thanks,
>
> Noah

Afaik this is the usual xulrunner mess. On ubuntu CouchDB is build
against xulrunner. Don't remember exact path, but there is something
about it in ml.

- benoît