* [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 @ 2016-01-15 0:17 Ricardo Martincoski 2016-01-15 15:31 ` rdkehn at yahoo.com 0 siblings, 1 reply; 5+ messages in thread From: Ricardo Martincoski @ 2016-01-15 0:17 UTC (permalink / raw) To: buildroot Hi Doug and Arnout, On Sun, 10 Jan 2016 15:25:06 -0600, Doug Kehn wrote: > The embedded bind configure is called as part of dhcp make instead of > dhcp configure. dhcp make environment is expanded to ensure bind > configure has the proper information. Maybe the bind configure could be called in a post configure hook. This way, bind would be configured in the configure step too. [snip] > +DHCP_MAKE=$(MAKE1) > + > +DHCP_MAKE_ENV = \ > + GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ For at least one external toolchain, the bind configure can't find the target compiler because it is expecting arm-buildroot-linux-gnueabi-gcc while the binary name is arm-none-linux-gnueabi-gcc. Maybe setting CC here would fix this. > + GNU_HOST_NAME=$(GNU_HOST_NAME) \ > + AR="$(TARGET_AR)" \ > + BUILD_CC="$(HOSTCC)" If a hook is used, TARGET_CONFIGURE_OPTS can provide most of variables needed, fixing the issue with some external toolchains. Something like this: DHCP_BIND_CONF_ENV = \ $(TARGET_CONFIGURE_OPTS) \ GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ GNU_HOST_NAME=$(GNU_HOST_NAME) \ BUILD_CC="$(HOSTCC)" define DHCP_CONFIGURE_BIND $(DHCP_BIND_CONF_ENV) $(DHCP_MAKE) -C $(@D)/bind bind1 endef DHCP_POST_CONFIGURE_HOOKS += DHCP_CONFIGURE_BIND > + > +define DHCP_EXTRACT_BIND > + cd $(@D)/bind; tar -xvf bind.tar.gz > +endef > +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND What do you think about this? Regards, Ricardo ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 2016-01-15 0:17 [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 Ricardo Martincoski @ 2016-01-15 15:31 ` rdkehn at yahoo.com 2016-01-16 1:32 ` Ricardo Martincoski 0 siblings, 1 reply; 5+ messages in thread From: rdkehn at yahoo.com @ 2016-01-15 15:31 UTC (permalink / raw) To: buildroot Hi Richardo, Arnout, All, On Thu, Jan 14, 2016 at 10:17:28PM -0200, Ricardo Martincoski wrote: > Hi Doug and Arnout, > > On Sun, 10 Jan 2016 15:25:06 -0600, Doug Kehn wrote: > > The embedded bind configure is called as part of dhcp make instead of > > dhcp configure. dhcp make environment is expanded to ensure bind > > configure has the proper information. > Maybe the bind configure could be called in a post configure hook. > This way, bind would be configured in the configure step too. > > [snip] > > +DHCP_MAKE=$(MAKE1) > > + > > +DHCP_MAKE_ENV = \ > > + GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ > For at least one external toolchain, the bind configure can't find the > target compiler because it is expecting arm-buildroot-linux-gnueabi-gcc > while the binary name is arm-none-linux-gnueabi-gcc. > Maybe setting CC here would fix this. > > + GNU_HOST_NAME=$(GNU_HOST_NAME) \ > > + AR="$(TARGET_AR)" \ > > + BUILD_CC="$(HOSTCC)" Did you try adding CC to see if it fixed the external toolchain issue? I also wonder if adding $(TARGET_CONFIGURE_OPTS) to MAKE_ENV is warranted? > > If a hook is used, TARGET_CONFIGURE_OPTS can provide most of variables needed, > fixing the issue with some external toolchains. > Something like this: > DHCP_BIND_CONF_ENV = \ > $(TARGET_CONFIGURE_OPTS) \ > GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ > GNU_HOST_NAME=$(GNU_HOST_NAME) \ > BUILD_CC="$(HOSTCC)" > > define DHCP_CONFIGURE_BIND > $(DHCP_BIND_CONF_ENV) $(DHCP_MAKE) -C $(@D)/bind bind1 > endef > DHCP_POST_CONFIGURE_HOOKS += DHCP_CONFIGURE_BIND > > + > > +define DHCP_EXTRACT_BIND > > + cd $(@D)/bind; tar -xvf bind.tar.gz > > +endef > > +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND > > What do you think about this? Did the configure hook work for you? At the end of the day, configure hook vs make env is a matter preference for the Buildroot maintainers; as long as it works... I have not yet tried the configure hook; but, I will. My only reservation with the configure hook is that it must know the exact target to make to configure bind as apposed to just ensuring the environment has the proper values for cross compiling and letting the Buildroot infra take care of the rest. Regards, ...doug ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 2016-01-15 15:31 ` rdkehn at yahoo.com @ 2016-01-16 1:32 ` Ricardo Martincoski 2016-01-16 22:08 ` rdkehn at yahoo.com 0 siblings, 1 reply; 5+ messages in thread From: Ricardo Martincoski @ 2016-01-16 1:32 UTC (permalink / raw) To: buildroot Hi Doug, On Fri, Jan 15, 2016 at 01:31 PM, rdkehn at yahoo.com wrote: > Hi Richardo, Arnout, All, > > On Thu, Jan 14, 2016 at 10:17:28PM -0200, Ricardo Martincoski wrote: >> Hi Doug and Arnout, >> >> On Sun, 10 Jan 2016 15:25:06 -0600, Doug Kehn wrote: >> > The embedded bind configure is called as part of dhcp make instead of >> > dhcp configure. dhcp make environment is expanded to ensure bind >> > configure has the proper information. >> Maybe the bind configure could be called in a post configure hook. >> This way, bind would be configured in the configure step too. >> >> [snip] >> > +DHCP_MAKE=$(MAKE1) >> > + >> > +DHCP_MAKE_ENV = \ >> > + GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ >> For at least one external toolchain, the bind configure can't find the >> target compiler because it is expecting arm-buildroot-linux-gnueabi-gcc >> while the binary name is arm-none-linux-gnueabi-gcc. >> Maybe setting CC here would fix this. >> > + GNU_HOST_NAME=$(GNU_HOST_NAME) \ >> > + AR="$(TARGET_AR)" \ >> > + BUILD_CC="$(HOSTCC)" > > Did you try adding CC to see if it fixed the external toolchain > issue? I also wonder if adding $(TARGET_CONFIGURE_OPTS) to MAKE_ENV > is warranted? > I just tested adding only CC="$(TARGET_CC)" copied from TARGET_CONFIGURE_OPTS and it solves the external toolchain issue. Only a few autotools-packages (smcroute, fcgiwrap, libpam-radius-auth) add $(TARGET_CONFIGURE_OPTS) to MAKE_ENV. All three have comments to justify the use, so I suppose it is not the best practice. >> >> If a hook is used, TARGET_CONFIGURE_OPTS can provide most of variables needed, >> fixing the issue with some external toolchains. >> Something like this: >> DHCP_BIND_CONF_ENV = \ >> $(TARGET_CONFIGURE_OPTS) \ >> GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ >> GNU_HOST_NAME=$(GNU_HOST_NAME) \ >> BUILD_CC="$(HOSTCC)" >> >> define DHCP_CONFIGURE_BIND >> $(DHCP_BIND_CONF_ENV) $(DHCP_MAKE) -C $(@D)/bind bind1 >> endef >> DHCP_POST_CONFIGURE_HOOKS += DHCP_CONFIGURE_BIND >> > + >> > +define DHCP_EXTRACT_BIND >> > + cd $(@D)/bind; tar -xvf bind.tar.gz >> > +endef >> > +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND >> >> What do you think about this? > > Did the configure hook work for you? > Yes. Also, in a rapid test, the hook seems to work fine after removing TARGET_CONFIGURE_OPTS and adding back AR and CC. > At the end of the day, configure hook vs make env is a matter > preference for the Buildroot maintainers; as long as it works... I > have not yet tried the configure hook; but, I will. My only > reservation with the configure hook is that it must know the exact > target to make to configure bind as apposed to just ensuring the > environment has the proper values for cross compiling and letting > the Buildroot infra take care of the rest. > Taking your reservation into account, I agree make env seems a better choice. Thank you for your explanation. Regards, Ricardo ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 2016-01-16 1:32 ` Ricardo Martincoski @ 2016-01-16 22:08 ` rdkehn at yahoo.com 0 siblings, 0 replies; 5+ messages in thread From: rdkehn at yahoo.com @ 2016-01-16 22:08 UTC (permalink / raw) To: buildroot Hi Ricardo, All, On Fri, Jan 15, 2016 at 11:32:29PM -0200, Ricardo Martincoski wrote: > Hi Doug, > > On Fri, Jan 15, 2016 at 01:31 PM, rdkehn at yahoo.com wrote: > > Hi Richardo, Arnout, All, > > > > On Thu, Jan 14, 2016 at 10:17:28PM -0200, Ricardo Martincoski wrote: > >> Hi Doug and Arnout, > >> > >> On Sun, 10 Jan 2016 15:25:06 -0600, Doug Kehn wrote: > >> > The embedded bind configure is called as part of dhcp make instead of > >> > dhcp configure. dhcp make environment is expanded to ensure bind > >> > configure has the proper information. > >> Maybe the bind configure could be called in a post configure hook. > >> This way, bind would be configured in the configure step too. > >> > >> [snip] > >> > +DHCP_MAKE=$(MAKE1) > >> > + > >> > +DHCP_MAKE_ENV = \ > >> > + GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ > >> For at least one external toolchain, the bind configure can't find the > >> target compiler because it is expecting arm-buildroot-linux-gnueabi-gcc > >> while the binary name is arm-none-linux-gnueabi-gcc. > >> Maybe setting CC here would fix this. > >> > + GNU_HOST_NAME=$(GNU_HOST_NAME) \ > >> > + AR="$(TARGET_AR)" \ > >> > + BUILD_CC="$(HOSTCC)" > > > > Did you try adding CC to see if it fixed the external toolchain > > issue? I also wonder if adding $(TARGET_CONFIGURE_OPTS) to MAKE_ENV > > is warranted? > > > I just tested adding only CC="$(TARGET_CC)" copied from TARGET_CONFIGURE_OPTS > and it solves the external toolchain issue. > Only a few autotools-packages (smcroute, fcgiwrap, libpam-radius-auth) add > $(TARGET_CONFIGURE_OPTS) to MAKE_ENV. All three have comments to justify the > use, so I suppose it is not the best practice. Thanks for the feedback. > > >> > >> If a hook is used, TARGET_CONFIGURE_OPTS can provide most of variables needed, > >> fixing the issue with some external toolchains. > >> Something like this: > >> DHCP_BIND_CONF_ENV = \ > >> $(TARGET_CONFIGURE_OPTS) \ > >> GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ > >> GNU_HOST_NAME=$(GNU_HOST_NAME) \ > >> BUILD_CC="$(HOSTCC)" > >> > >> define DHCP_CONFIGURE_BIND > >> $(DHCP_BIND_CONF_ENV) $(DHCP_MAKE) -C $(@D)/bind bind1 > >> endef > >> DHCP_POST_CONFIGURE_HOOKS += DHCP_CONFIGURE_BIND > >> > + > >> > +define DHCP_EXTRACT_BIND > >> > + cd $(@D)/bind; tar -xvf bind.tar.gz > >> > +endef > >> > +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND > >> > >> What do you think about this? > > > > Did the configure hook work for you? > > > Yes. > Also, in a rapid test, the hook seems to work fine after removing > TARGET_CONFIGURE_OPTS and adding back AR and CC. > I also tested the configure hook scenario. It worked for my use case as well. > > At the end of the day, configure hook vs make env is a matter > > preference for the Buildroot maintainers; as long as it works... I > > have not yet tried the configure hook; but, I will. My only > > reservation with the configure hook is that it must know the exact > > target to make to configure bind as apposed to just ensuring the > > environment has the proper values for cross compiling and letting > > the Buildroot infra take care of the rest. > > > Taking your reservation into account, I agree make env seems a better choice. > Thank you for your explanation. > Peter, Thomas, there are two solutions to this problem. I would appreciate your input on your preference before I submit a patch. Thanks and Regards, ...doug ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [RFC PATCH v2 0/4] package/dhcp @ 2016-01-10 21:25 Doug Kehn 2016-01-10 21:25 ` [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 Doug Kehn 0 siblings, 1 reply; 5+ messages in thread From: Doug Kehn @ 2016-01-10 21:25 UTC (permalink / raw) To: buildroot This patch series bumps dhcp package to 4.3.3. I'm doing this as an RFC to get feed back on the handling of the embedded bind tar-ball that now exists within the dhcp package. It looks to me that the embedded bind source is only used to build static libraries for use by the dhcp source. I don't think these libraries are indented to be used outside the dhcp package. I built with an arm-buildroot-linux-gnueabihf toolchain and tested dhclient on a custom TI-AM3352 based board. Buildroot thread http://lists.busybox.net/pipermail/buildroot/2016-January/149079.html for related information. I have not yet pushed any patches upstream. I beleive patches 0002-dhcp-bind-host-gen.patch 0003-toolchain-ar.patch are candidates for upstream, agree? Regards, ...doug --- Changes v1 -> v2 - removed DHCP_PRE_BUILD_HOOKS in favor of patch (suggested by Arnout) --- Doug Kehn (4): package/dhcp: bump version to 4.3.3 package/dhcp: add bind configure options for cross compiling package/dhcp: ensure host cc is used for compiling gen package/dhcp: remove hard coded ar reference package/dhcp/0001-bind-configure.patch | 19 ++++++++++ package/dhcp/0002-dhcp-bind-host-gen.patch | 22 ++++++++++++ package/dhcp/0003-toolchain-ar.patch | 58 ++++++++++++++++++++++++++++++ package/dhcp/dhcp.hash | 4 +-- package/dhcp/dhcp.mk | 15 +++++++- 5 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 package/dhcp/0001-bind-configure.patch create mode 100644 package/dhcp/0002-dhcp-bind-host-gen.patch create mode 100644 package/dhcp/0003-toolchain-ar.patch -- 2.6.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 2016-01-10 21:25 [Buildroot] [RFC PATCH v2 0/4] package/dhcp Doug Kehn @ 2016-01-10 21:25 ` Doug Kehn 0 siblings, 0 replies; 5+ messages in thread From: Doug Kehn @ 2016-01-10 21:25 UTC (permalink / raw) To: buildroot Parallel builds are not supported because the bind libraries must be built first. The embedded bind configure is called as part of dhcp make instead of dhcp configure. dhcp make environment is expanded to ensure bind configure has the proper information. The embedded bind tar-ball is extracted after the source so patches can be applied to dhcp and bind before the package is built. Signed-off-by: Doug Kehn <rdkehn@yahoo.com> Cc: Arnout Vandecappelle <arnout@mind.be> --- Changes v1 -> v2 - removed DHCP_PRE_BUILD_HOOKS in favor of patch (suggested by Arnout) --- package/dhcp/dhcp.hash | 4 ++-- package/dhcp/dhcp.mk | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/package/dhcp/dhcp.hash b/package/dhcp/dhcp.hash index 84e3c63..ae770ce 100644 --- a/package/dhcp/dhcp.hash +++ b/package/dhcp/dhcp.hash @@ -1,2 +1,2 @@ -# Verified from ftp://ftp.isc.org/isc/dhcp/4.1-ESV-R12/dhcp-4.1-ESV-R12.tar.gz.sha256.asc -sha256 53265d1bf5e2073379df03c73a1a34d38a904307609c0f9cb77223912e753e5f dhcp-4.1-ESV-R12.tar.gz +# Verified from ftp://ftp.isc.org/isc/dhcp/4.3-3/dhcp-4.3.3.tar.gz.sha256.asc +sha256 553c4945b09b1c1b904c4780f34f72aaefa2fc8c6556715de0bc9d4e3d255ede dhcp-4.3.3.tar.gz diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk index c05e694..1e09e12 100644 --- a/package/dhcp/dhcp.mk +++ b/package/dhcp/dhcp.mk @@ -4,7 +4,7 @@ # ################################################################################ -DHCP_VERSION = 4.1-ESV-R12 +DHCP_VERSION = 4.3.3 DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION) DHCP_INSTALL_STAGING = YES DHCP_LICENSE = ISC @@ -25,6 +25,19 @@ DHCP_CONF_OPTS = \ --with-relay-pid-file=/var/run/dhcrelay.pid \ --with-relay6-pid-file=/var/run/dhcrelay6.pid +DHCP_MAKE=$(MAKE1) + +DHCP_MAKE_ENV = \ + GNU_TARGET_NAME=$(GNU_TARGET_NAME) \ + GNU_HOST_NAME=$(GNU_HOST_NAME) \ + AR="$(TARGET_AR)" \ + BUILD_CC="$(HOSTCC)" + +define DHCP_EXTRACT_BIND + cd $(@D)/bind; tar -xvf bind.tar.gz +endef +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND + ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y) DHCP_CONF_OPTS += --enable-delayed-ack endif -- 2.6.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-16 22:08 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-15 0:17 [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 Ricardo Martincoski 2016-01-15 15:31 ` rdkehn at yahoo.com 2016-01-16 1:32 ` Ricardo Martincoski 2016-01-16 22:08 ` rdkehn at yahoo.com -- strict thread matches above, loose matches on Subject: below -- 2016-01-10 21:25 [Buildroot] [RFC PATCH v2 0/4] package/dhcp Doug Kehn 2016-01-10 21:25 ` [Buildroot] [RFC PATCH v2 1/4] package/dhcp: bump version to 4.3.3 Doug Kehn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox