Message ID | 1445328991-29416-1-git-send-email-judge.packham@gmail.com |
---|---|
State | Accepted |
Commit | 6e088b101d3981c0b57250a70e45a0fe349172bf |
Headers | show |
>>>>> "Chris" == Chris Packham <judge.packham@gmail.com> writes: > If --with-libesmtp is omitted a host tool is invoked to detect the > location of the library and headers, which is obviously the wrong thing > for a cross-compile environment. Explicitly add --with-libesmtp to > resolve this. > Fixes: > http://git.buildroot.net/buildroot/commit/?id=539acb7500588d0a277357cf831c9f25f770578d > http://git.buildroot.net/buildroot/commit/?id=01f41585a78406f6e830d5eaf4413a983812a299 > Signed-off-by: Chris Packham <judge.packham@gmail.com> Committed, thanks.
Hi Peter, On Tue, Oct 20, 2015 at 10:36 PM, Peter Korsgaard <peter@korsgaard.com> wrote: >>>>>> "Chris" == Chris Packham <judge.packham@gmail.com> writes: > > > If --with-libesmtp is omitted a host tool is invoked to detect the > > location of the library and headers, which is obviously the wrong thing > > for a cross-compile environment. Explicitly add --with-libesmtp to > > resolve this. > > > Fixes: > > http://git.buildroot.net/buildroot/commit/?id=539acb7500588d0a277357cf831c9f25f770578d > > http://git.buildroot.net/buildroot/commit/?id=01f41585a78406f6e830d5eaf4413a983812a299 Oops this is the url of the HEAD commit not the url of the build result. This should have been http://autobuild.buildroot.net/results/b82/b8224ea52d962c62ead367343d68bf98a4b9e883/ http://autobuild.buildroot.net/results/445/445270aed4c79cde75d54d49d13ffad9d684c61b/ Probably doesn't matter but If you want you could revert and fix up the commit message to correct the URL.
>>>>> "Chris" == Chris Packham <judge.packham@gmail.com> writes: Hi, >> >> > Fixes: >> > http://git.buildroot.net/buildroot/commit/?id=539acb7500588d0a277357cf831c9f25f770578d >> > http://git.buildroot.net/buildroot/commit/?id=01f41585a78406f6e830d5eaf4413a983812a299 > Oops this is the url of the HEAD commit not the url of the build > result. This should have been > http://autobuild.buildroot.net/results/b82/b8224ea52d962c62ead367343d68bf98a4b9e883/ > http://autobuild.buildroot.net/results/445/445270aed4c79cde75d54d49d13ffad9d684c61b/ > Probably doesn't matter but If you want you could revert and fix up > the commit message to correct the URL. Gaah, you're right - I can't believe I didn't notice that :/ I'll leave it as it is.
Hello Chris, On Tue, 20 Oct 2015 21:16:31 +1300, Chris Packham <judge.packham@gmail.com> wrote: > If --with-libesmtp is omitted a host tool is invoked to detect the > location of the library and headers, which is obviously the wrong thing > for a cross-compile environment. Explicitly add --with-libesmtp to > resolve this. > > Fixes: > http://git.buildroot.net/buildroot/commit/?id=539acb7500588d0a277357cf831c9f25f770578d > http://git.buildroot.net/buildroot/commit/?id=01f41585a78406f6e830d5eaf4413a983812a299 > > Signed-off-by: Chris Packham <judge.packham@gmail.com> > --- > package/syslog-ng/syslog-ng.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk > index 7371060..2bbace8 100644 > --- a/package/syslog-ng/syslog-ng.mk > +++ b/package/syslog-ng/syslog-ng.mk > @@ -37,6 +37,7 @@ endif > ifeq ($(BR2_PACKAGE_LIBESMTP),y) > SYSLOG_NG_DEPENDENCIES += libesmtp > SYSLOG_NG_CONF_OPTS += --enable-smtp > +SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr" > else > SYSLOG_NG_CONF_OPTS += --disable-smtp > endif The buildroot package libestmp provides a libesmtp-config script, but it is installed into host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/libesmtp-config where it is not found by the syslog-ng configure script... Would a more portable solution be to add this search path (or fix the install location of libestmp-config) for the syslog-ng configure call (libesmtp-config --libs gives '-pthread -L[...]/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib -lesmtp -lssl -lcrypto -ldl')? Regards, Peter
>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes: Hi, >> SYSLOG_NG_CONF_OPTS += --disable-smtp >> endif > The buildroot package libestmp provides a libesmtp-config script, but > it is installed into > host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/libesmtp-config > where it is not found by the syslog-ng configure script... Yes, $(STAGING_DIR)/usr/bin, similar to the other *-config scripts. > Would a more portable solution be to add this search path (or fix the install > location of libestmp-config) for the syslog-ng configure call (libesmtp-config > --libs gives '-pthread -L[...]/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib > -lesmtp -lssl -lcrypto -ldl')? $(STAGING_DIR)/usr/bin contains binaries for the target (and *-config scripts), so it shouldn't be added to the path, but another approach is indeed to fix the configure script to look elsewhere for the script, similar to how a bunch of packages allow the path to sdl-config to be overridden through the SDL_CONFIG environment variable.
On Wed, Oct 21, 2015 at 8:32 AM, Peter Korsgaard <peter@korsgaard.com> wrote: >>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes: > > Hi, > > >> SYSLOG_NG_CONF_OPTS += --disable-smtp > >> endif > > > The buildroot package libestmp provides a libesmtp-config script, but > > it is installed into > > > host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/libesmtp-config > > > where it is not found by the syslog-ng configure script... > > Yes, $(STAGING_DIR)/usr/bin, similar to the other *-config scripts. > > > Would a more portable solution be to add this search path (or fix the install > > location of libestmp-config) for the syslog-ng configure call (libesmtp-config > > --libs gives '-pthread -L[...]/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib > > -lesmtp -lssl -lcrypto -ldl')? > > $(STAGING_DIR)/usr/bin contains binaries for the target (and *-config > scripts), so it shouldn't be added to the path, but another approach is > indeed to fix the configure script to look elsewhere for the script, > similar to how a bunch of packages allow the path to sdl-config to be > overridden through the SDL_CONFIG environment variable. The way the test is implemented in configure.ac libestmp-config is invoked directly so it would need to be on the path. Or I could look at an upstream patch to change this to something that can be overridden. I'd almost prefer if libesmtp had pkg-config support which integrates better with autotools and buildroot has existing support for.
Dear Chris Packham, On Wed, 21 Oct 2015 20:41:54 +1300, Chris Packham wrote: > The way the test is implemented in configure.ac libestmp-config is > invoked directly so it would need to be on the path. Or I could look > at an upstream patch to change this to something that can be > overridden. I'd almost prefer if libesmtp had pkg-config support which > integrates better with autotools and buildroot has existing support > for. As Peter suggested, the way we usually fix that is by replacing the direct invocation of <foo>-config in configure.ac by ${FOO_CONFIG:foo-config}, so that it can be overridden in the environment. However, the current --with-<foo> solution that you have used is fine for me. We do use this solution for numerous packages, so I'm fine with using it as well for syslog-ng. Best regards, Thomas
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Dear Chris Packham, > On Wed, 21 Oct 2015 20:41:54 +1300, Chris Packham wrote: >> The way the test is implemented in configure.ac libestmp-config is >> invoked directly so it would need to be on the path. Or I could look >> at an upstream patch to change this to something that can be >> overridden. I'd almost prefer if libesmtp had pkg-config support which >> integrates better with autotools and buildroot has existing support >> for. > As Peter suggested, the way we usually fix that is by replacing the > direct invocation of <foo>-config in configure.ac by > ${FOO_CONFIG:foo-config}, so that it can be overridden in the > environment. > However, the current --with-<foo> solution that you have used is fine > for me. We do use this solution for numerous packages, so I'm fine with > using it as well for syslog-ng. Agreed. The only potential issue is for static linking as libestmp-config --libs may return more libraries than the hardcoded -lesmtp, but I guess the autobuilders will tell us if that is the case.
diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk index 7371060..2bbace8 100644 --- a/package/syslog-ng/syslog-ng.mk +++ b/package/syslog-ng/syslog-ng.mk @@ -37,6 +37,7 @@ endif ifeq ($(BR2_PACKAGE_LIBESMTP),y) SYSLOG_NG_DEPENDENCIES += libesmtp SYSLOG_NG_CONF_OPTS += --enable-smtp +SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr" else SYSLOG_NG_CONF_OPTS += --disable-smtp endif
If --with-libesmtp is omitted a host tool is invoked to detect the location of the library and headers, which is obviously the wrong thing for a cross-compile environment. Explicitly add --with-libesmtp to resolve this. Fixes: http://git.buildroot.net/buildroot/commit/?id=539acb7500588d0a277357cf831c9f25f770578d http://git.buildroot.net/buildroot/commit/?id=01f41585a78406f6e830d5eaf4413a983812a299 Signed-off-by: Chris Packham <judge.packham@gmail.com> --- package/syslog-ng/syslog-ng.mk | 1 + 1 file changed, 1 insertion(+)