Re: [collectd] Building RPM on AWS - RPATH failures
Hi, Sorry for the delay in replying: [ec2-user@assets.i-b466h4e9 ~/rpmbuild/SPECS]$ pkg-config --libs libstatgrab -lstatgrab So not this. I attached the full output of the command, but it was too large and is still awaiting moderator approval - the attachment was fairly large, so it might not get accepted. Thanks for looking at this for me. On 22 January 2014 20:56, Dan Fandrich d...@coneharvesters.com wrote: On Wed, Jan 22, 2014 at 09:10:53AM +, Dan Scott wrote: On 22 January 2014 09:06, Dan Scott d...@danieljamesscott.org wrote: On 21 January 2014 20:29, Dan Fandrich d...@coneharvesters.com wrote: On Tue, Jan 21, 2014 at 08:35:17AM +, 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? Yes, but the lines in isolation won't help much without the context of where they appear in the log. The idea is to find the first instance of an rpath line that RPM is complaining about and find how it got added. 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 I suspect this is a generic test of the rpath option or the linker. It's not the one we're looking for. 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 These are likely the hard-coded instance I mentioned. 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
Re: [collectd] Building RPM on AWS - RPATH failures
On 21 January 2014 20:29, Dan Fandrich d...@coneharvesters.com wrote: On Tue, Jan 21, 2014 at 08:35:17AM +, 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 d...@coneharvesters.com wrote: On Mon, Jan 20, 2014 at 05:31:37PM +, 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
Re: [collectd] Building RPM on AWS - RPATH failures
On 22 January 2014 09:06, Dan Scott d...@danieljamesscott.org wrote: On 21 January 2014 20:29, Dan Fandrich d...@coneharvesters.com wrote: On Tue, Jan 21, 2014 at 08:35:17AM +, 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=. Sorry, just realised I forgot a link line: libtool: link: gcc -shared -fPIC -DPIC .libs/disk_la-disk.o -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 /usr/lib64/libstatgrab.so -ldl -O2 -m64
Re: [collectd] Building RPM on AWS - RPATH failures
Hi, 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} Thanks, Dan On 20 January 2014 19:43, Dan Fandrich d...@coneharvesters.com wrote: On Mon, Jan 20, 2014 at 05:31:37PM +, 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@verplant.org http://mailman.verplant.org/listinfo/collectd collectd.spec Description: Binary data ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Building RPM on AWS - RPATH failures
On Mon, Jan 20, 2014 at 05:31:37PM +, 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@verplant.org http://mailman.verplant.org/listinfo/collectd