-
Type: Bug
-
Resolution: Won't Fix
-
Priority: 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
- xulwrapper - a tiny wrapper for starting mongodb
# - Copyright (c) 2010, Canonical Ltd.
- Author: Clint Byrum <clint@ubuntu.com>
# - This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
# - This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
# - You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
# - This wrapper is necessary as xulrunner does not follow normal library sematics
- Please see https://bugs.launchpad.net/ubuntu/+source/xulrunner-1.9.2/+bug/286906
- 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" "$@"