Thanks for the response Hao. Unfortunately that didn't work for me, the default /usr/lib64 is inserted anyways. I'm building on CentOS 6.5, using the instructions for CentOS 6.6 here: http://mesos.apache.org/gettingstarted/
- Erik On Sat, Jul 11, 2015 at 10:08 PM, haosdent <haosd...@gmail.com> wrote: > Hi, @Erik I think you need to change "-Wl,-rpath=/usr/local/lib" to > "-Wl,-rpath,/usr/local/lib". My build step: > > ``` > LDFLAGS="-Wl,-rpath,/usr/local/lib" ../configure > ``` > > And the result show the RPATH only contains /usr/local/lib > > ``` > $objdump -x ./src/.libs/libmesos.so |grep RPATH > RPATH /usr/local/lib > ``` > > On Sun, Jul 12, 2015 at 12:06 PM, Erik Weathers <eweath...@groupon.com> > wrote: > > > hi mesos dev people, > > > > I'm hoping to enlist some help in building mesos such that the > libmesos.so > > has its RPATH set as our environment expects. Specifically, in our > > environment we install our own custom-built libraries under > /usr/local/lib, > > so I want the RPATH in the libmesos.so ELF to look like so: > > > > Library rpath: [/usr/local/lib:/usr/lib64] > > > > I've tried to effect this change by running configure like so: > > > > LDFLAGS="-Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local > > > > This resulted in the following RPATH being embedded in libmesos.so: > > > > Library rpath: [/usr/lib64:/usr/local/lib] > > > > The RPATH *does* have /usr/local/lib, but I want that to be the 1st > entry, > > not the 2nd. I'm not familiar enough with autoconf nor libtool to figure > > out how to get the order reversed. I *could* hack the embedded RPATH > with > > the chrpath tool, but I'd prefer changing build arguments instead. > > > > I see in the g++ cmd that generates the .so that there are includes of > > /usr/lib64 earlier than my passed LDFLAGS, so I wonder if it's a > > configure.ac change I need to make to allow the LDFLAGS to be shoved in > > front instead of behind the automatically generated /usr/lib64 portion. > > > > Notably, simple use of the --prefix=/usr/local option allows the mesos-* > > binaries to have the embedded RPATH as I want, I'm only struggling with > the > > libmesos.so RPATH. > > > > Thanks for whatever help you might provide! > > > > - Erik > > > > P.S., this is for building mesos-0.22.1 > > P.P.S., I tried --with-rpath=/usr/local/lib, but that didn't help either. > > > > > > -- > Best Regards, > Haosdent Huang >