Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1764

rpath linking of libmozjs.so causes issues on Ubuntu

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.4.4
    • Component/s: Build
    • Labels:
      None
    • Environment:
      Ubuntu
    • Linux

      This is a forwarding of the fix for this bug in Ubuntu

      https://bugs.launchpad.net/ubuntu/+source/mongodb/+bug/557024

      In building 1.4.4 for Ubuntu Maverick, we've recently added a simple wrapper script that sets LD_LIBRARY_PATH to the current home of the system's xulrunner library.

      This is being done because the version of xulrunner changes quite often, breaking any programs that were built against the previous version with rpath embedded.

      It would make more sense to provide this wrapper with mongodb on Ubuntu systems than setting rpath. I do know that ultimately, what would make more sense would be a stable ABI in xulrunner and placement in /usr/lib, but for now that seems unlikely.

      Below is the wrapper script, which would most likely need to be customized with some variables from the build configuration to work properly.

      I've attached a patch to SConstruct and buildscripts/hacks_ubuntu.py that will remove the rpath and use LD_LIBRARY_PATH instead to run smoke tests.

      #!/bin/sh

      1. xulwrapper - a tiny wrapper for starting mongodb
        #
      2. Copyright (c) 2010, Canonical Ltd.
      3. Author: Clint Byrum <clint@ubuntu.com>
        #
      4. This program is free software; you can redistribute it and/or modify
      5. it under the terms of the GNU General Public License as published by
      6. the Free Software Foundation; either version 2 of the License, or
      7. (at your option) any later version.
        #
      8. This program is distributed in the hope that it will be useful,
      9. but WITHOUT ANY WARRANTY; without even the implied warranty of
      10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      11. GNU General Public License for more details.
        #
      12. You should have received a copy of the GNU General Public License
      13. along with this program; see the file COPYING. If not, write to
      14. the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      15. Boston, MA 02111-1307, USA.
        #
      16. This wrapper is necessary as xulrunner does not follow normal library sematics
      17. Please see https://bugs.launchpad.net/ubuntu/+source/xulrunner-1.9.2/+bug/286906
      18. for more information.
        #
        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/xulrunner-`xulrunner-1.9.2 --gre-version`
        bname=`basename $0`
        if [ "$bname" = "xulwrapper" ] ; then
        echo xulwrapper must not be used to wrap itself. Paradox avoided.
        exit 1
        fi
        exec "/usr/lib/mongodb/$bname" "$@"

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            clint-fewbar Clint Byrum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: