[collectd] Building RPM on AWS - RPATH failures

Dan Scott dan at danieljamesscott.org
Wed Jan 22 10:06:26 CET 2014


On 21 January 2014 20:29, Dan Fandrich <dan at coneharvesters.com> wrote:

> On Tue, Jan 21, 2014 at 08:35:17AM +0000, Dan Scott wrote:
> > I've attached the rpmbuild SPEC file. The relevant lines are:
> >
> > %build
> > %configure --enable-java --with-java=%{java_home}/ --disable-battery
> > --disable-rpath
> > %{__make} %{?_smp_mflags}
>
> Those macros can hide a lot. What is the actual configure line?  And what
> are
> the actual link lines for one of the binaries that's at issue?
> Running ./configure --help | grep rpath doesn't actually show me any such
> option
> as --disable-rpath when I try it.  There is one hard-coded -Wl,-rpath line
> in
> the configure.ac file tha takes effect when linking with libjvm.so. It's
> possible that is being used, but it would only be a "standard" location if
> your
> libjvm.so is in /usr/lib or /usr/lib64, etc., which is unlikely. It could
> be
> coming from a pkgconfig source as well. Can you search the config.log file
> to
> see where this is being added?
>

The actual configure line is:

+ ./configure --build=x86_64-redhat-linux --host=x86_64-redhat-linux
--target=x86_64-amazon-linux-gnu --program-prefix= --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib
--mandir=/usr/share/man --infodir=/usr/share/info --enable-java
--with-java=/usr/lib/jvm/java/ --disable-battery --disable-rpath

I found these lines related to rpath in the config.log. Is this what you
mean?

configure:10697: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic   -Wl,-rpath -Wl,/foo conftest.c  >&5

configure:20901: Building with JAVA_LDFLAGS set to:
 -L/usr/lib/jvm/java/jre/lib/amd64/server -Wl,-rpath
-Wl,/usr/lib/jvm/java/jre/lib/amd64/server

configure:21070: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic    -I/usr/lib/jvm/java/include
-I/usr/lib/jvm/java/include/linux
-L/usr/lib/jvm/java/jre/lib/amd64/server -Wl,-rpath
-Wl,/usr/lib/jvm/java/jre/lib/amd64/server conftest.c -ljvm  -ldl  >&5

configure:22916: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic  -D_REE
NTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 -I/usr/lib64/perl5/CORE    -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE
 -fstack-protector  -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm
-lcrypt -lutil -lpthread -lc conftest.c -ldl  >&5

configure:22987: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -I/usr/lib64/perl5/CORE    -Wl,-E
-Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector
 -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil
-lpthread -lc conftest.c -ldl  >&5

configure:23047: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic  -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -I/usr/lib64/perl5/CORE  -Wall -Werror   -Wl,-E
-Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector
 -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil
-lpthread -lc conftest.c -ldl  >&5

configure:37142: running /bin/sh ./configure --disable-option-checking
'--prefix=/usr'  '--build=x86_64-redhat-linux' '--host=x86_64-redhat-linux'
'--target=x86_64-amazon-linux-gnu' '--program-prefix=' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/var/lib' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--enable-java'
'--with-java=/usr/lib/jvm/java/' '--disable-battery' '--disable-rpath'
'build_alias=x86_64-redhat-linux' 'host_alias=x86_64-redhat-linux'
'target_alias=x86_64-amazon-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic'
'PKG_CONFIG_PATH=%{_PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
'--enable-ltdl-convenience' --cache-file=/dev/null --srcdir=.


Thanks for your info,

Dan


> >>> Dan
>
> > On 20 January 2014 19:43, Dan Fandrich <dan at coneharvesters.com> wrote:
> >
> >     On Mon, Jan 20, 2014 at 05:31:37PM +0000, Dan Scott wrote:
> >     > I'm trying to build the RPMs of the latest collectd (5.4.0) for AWS
> >     Linux.
> >     >
> >     > I'm basing my .spec file on the existing AWS spec file (5.0).
> >     >
> >     > The compile and link is running fine, but I'm getting a few
> failures for
> >     RPATH
> >     > (below). Anyone have any ideas? I've tried using the disable-rpath
> option
> >     for
> >     > the configure, but I still receive the same error.
> >
> >     What configure options is this build using?
> >
> >     >>> Dan
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20140122/64dcdf01/attachment.html>


More information about the collectd mailing list