Message ID | 1445817733-12772-1-git-send-email-judge.packham@gmail.com |
---|---|
State | Accepted |
Headers | show |
Dear Chris Packham, On Mon, 26 Oct 2015 13:02:13 +1300, Chris Packham wrote: > +# rabbit-mq needs -lrt > +SYSLOG_NG_CONF_ENV = LIBS=-lrt While this works, I believe a better solution is to fix the configure.ac. It already checks if nanosleep is in librt, and if so, links against librt. It should the same for those functions, if the rabbitmq support is enabled. Thanks! Thomas
Dear Chris Packham, On Mon, 26 Oct 2015 13:02:13 +1300, Chris Packham wrote: > Some of the rabbit-mq tools need to link against librt, specify > LIBS=-lrt when configuring. > > Fixes: > http://autobuild.buildroot.net/results/a3d/a3dfdebd76d47df11a8e26a215bb88fbce8dc6f7 > http://autobuild.buildroot.net/results/7d2/7d26e8efe67bf958162a309acb20800e669543e4 > http://autobuild.buildroot.net/results/7b5/7b5370d12a2ff8937cba3a201d4edce3dcd12a6e > http://autobuild.buildroot.net/results/bab/babbb089ce1a7750495323248f21402960fb6c80 > > Helped-by: Waldemar Brodkorb <wbx@openadk.org> > Signed-off-by: Chris Packham <judge.packham@gmail.com> > --- > package/syslog-ng/syslog-ng.mk | 2 ++ > 1 file changed, 2 insertions(+) Applied, thanks. I still think a better fix would be to change configure.ac, and submit the change upstream. Thomas
Hi Thomas, On Mon, Oct 26, 2015 at 4:54 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Chris Packham, > > On Mon, 26 Oct 2015 13:02:13 +1300, Chris Packham wrote: > >> +# rabbit-mq needs -lrt >> +SYSLOG_NG_CONF_ENV = LIBS=-lrt > > While this works, I believe a better solution is to fix the > configure.ac. It already checks if nanosleep is in librt, and if so, > links against librt. > > It should the same for those functions, if the rabbitmq support is > enabled. Hmm. Syslog-ng distributes rabbitmq-c as a sub package. The looking at included rabbitmq-c sources and the upstream package[1] it is checking for clock_gettime which it thinks it should find in librt. But looking at the config.log[2] for rabbitmq-c it has decided that no library is required. Is there something unexpected about clock_gettime with uclibc? [1] - https://github.com/alanxz/rabbitmq-c/blob/master/configure.ac#L104 [2] - http://autobuild.buildroot.net/results/a3d/a3dfdebd76d47df11a8e26a215bb88fbce8dc6f7/syslog-ng-3.7.1/modules/afamqp/rabbitmq-c/config.log > > Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com
On Mon, Oct 26, 2015 at 7:53 PM, Chris Packham <judge.packham@gmail.com> wrote: > Hi Thomas, > > On Mon, Oct 26, 2015 at 4:54 PM, Thomas Petazzoni > <thomas.petazzoni@free-electrons.com> wrote: >> Dear Chris Packham, >> >> On Mon, 26 Oct 2015 13:02:13 +1300, Chris Packham wrote: >> >>> +# rabbit-mq needs -lrt >>> +SYSLOG_NG_CONF_ENV = LIBS=-lrt >> >> While this works, I believe a better solution is to fix the >> configure.ac. It already checks if nanosleep is in librt, and if so, >> links against librt. >> >> It should the same for those functions, if the rabbitmq support is >> enabled. > > Hmm. Syslog-ng distributes rabbitmq-c as a sub package. The looking at > included rabbitmq-c sources and the upstream package[1] it is checking > for clock_gettime which it thinks it should find in librt. But looking > at the config.log[2] for rabbitmq-c it has decided that no library is > required. Is there something unexpected about clock_gettime with > uclibc? > > [1] - https://github.com/alanxz/rabbitmq-c/blob/master/configure.ac#L104 > [2] - http://autobuild.buildroot.net/results/a3d/a3dfdebd76d47df11a8e26a215bb88fbce8dc6f7/syslog-ng-3.7.1/modules/afamqp/rabbitmq-c/config.log > Digging a bit deeper it looks like clock_gettime is in both libc and librt. According to the (glibc) man page -lrt was needed prior to glibc 2.17 so I'm guessing this is some kind of backwards compatibility check that would happen to satisfy the posix_spawn requirements. I'll see about an upstream patch to rabbitmq-c. >> >> Thanks! >> >> Thomas >> -- >> Thomas Petazzoni, CTO, Free Electrons >> Embedded Linux, Kernel and Android engineering >> http://free-electrons.com
On Mon, Oct 26, 2015 at 8:08 PM, Chris Packham <judge.packham@gmail.com> wrote: > On Mon, Oct 26, 2015 at 7:53 PM, Chris Packham <judge.packham@gmail.com> wrote: >> Hi Thomas, >> >> On Mon, Oct 26, 2015 at 4:54 PM, Thomas Petazzoni >> <thomas.petazzoni@free-electrons.com> wrote: >>> Dear Chris Packham, >>> >>> On Mon, 26 Oct 2015 13:02:13 +1300, Chris Packham wrote: >>> >>>> +# rabbit-mq needs -lrt >>>> +SYSLOG_NG_CONF_ENV = LIBS=-lrt >>> >>> While this works, I believe a better solution is to fix the >>> configure.ac. It already checks if nanosleep is in librt, and if so, >>> links against librt. >>> >>> It should the same for those functions, if the rabbitmq support is >>> enabled. >> >> Hmm. Syslog-ng distributes rabbitmq-c as a sub package. The looking at >> included rabbitmq-c sources and the upstream package[1] it is checking >> for clock_gettime which it thinks it should find in librt. But looking >> at the config.log[2] for rabbitmq-c it has decided that no library is >> required. Is there something unexpected about clock_gettime with >> uclibc? >> >> [1] - https://github.com/alanxz/rabbitmq-c/blob/master/configure.ac#L104 >> [2] - http://autobuild.buildroot.net/results/a3d/a3dfdebd76d47df11a8e26a215bb88fbce8dc6f7/syslog-ng-3.7.1/modules/afamqp/rabbitmq-c/config.log >> > > Digging a bit deeper it looks like clock_gettime is in both libc and > librt. According to the (glibc) man page -lrt was needed prior to > glibc 2.17 so I'm guessing this is some kind of backwards > compatibility check that would happen to satisfy the posix_spawn > requirements. I'll see about an upstream patch to rabbitmq-c. > And here's a link to the pull request https://github.com/alanxz/rabbitmq-c/pull/322
diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk index 1ade7cf..3441751 100644 --- a/package/syslog-ng/syslog-ng.mk +++ b/package/syslog-ng/syslog-ng.mk @@ -11,6 +11,8 @@ SYSLOG_NG_LICENSE = LGPLv2.1+ (syslog-ng core), GPLv2+ (modules) SYSLOG_NG_LICENSE_FILES = COPYING SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \ eventlog libglib2 openssl pcre +# rabbit-mq needs -lrt +SYSLOG_NG_CONF_ENV = LIBS=-lrt SYSLOG_NG_CONF_OPTS = --disable-manpages SYSLOG_NG_PATCH = \ https://github.com/dnsjts/syslog-ng/commit/7b2b673ae2640ce9ad396f538fc25acb6e4405ec.patch \
Some of the rabbit-mq tools need to link against librt, specify LIBS=-lrt when configuring. Fixes: http://autobuild.buildroot.net/results/a3d/a3dfdebd76d47df11a8e26a215bb88fbce8dc6f7 http://autobuild.buildroot.net/results/7d2/7d26e8efe67bf958162a309acb20800e669543e4 http://autobuild.buildroot.net/results/7b5/7b5370d12a2ff8937cba3a201d4edce3dcd12a6e http://autobuild.buildroot.net/results/bab/babbb089ce1a7750495323248f21402960fb6c80 Helped-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Chris Packham <judge.packham@gmail.com> --- package/syslog-ng/syslog-ng.mk | 2 ++ 1 file changed, 2 insertions(+)