Opened 7 weeks ago

Closed 7 weeks ago

#21043 closed defect (fixed)

kea-dhcp FTBFS with boost1.87

Reported by: thomas Owned by: blfs-book
Priority: normal Milestone: 12.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

When compiling kea-dhcp on a system with boost-1.87, it breaks with

  ...
  CXX      libkea_asiolink_la-common_tls.lo
  CXX      libkea_asiolink_la-interval_timer.lo
  CXX      libkea_asiolink_la-io_address.lo
io_address.cc: In constructor 'isc::asiolink::IOAddress::IOAddress(const std::string&)':
io_address.cc:40:34: error: 'from_string' is not a member of 'boost::asio::ip::address'
   40 |     asio_address_ = ip::address::from_string(address_str, err);
      |                                  ^~~~~~~~~~~
io_address.cc: In member function 'uint32_t isc::asiolink::IOAddress::toUint32() const':
io_address.cc:119:39: error: 'class boost::asio::ip::address_v4' has no member named 'to_ulong'
  119 |         return (asio_address_.to_v4().to_ulong());
      |                                       ^~~~~~~~
  CXX      libkea_asiolink_la-io_endpoint.lo
make[5]: *** [Makefile:766: libkea_asiolink_la-io_address.lo] Fehler 1
make[5]: *** Es wird auf noch nicht beendete Prozesse gewartet …
In file included from io_endpoint.cc:12:
../../../src/lib/asiolink/tcp_endpoint.h: In constructor 'isc::asiolink::TCPEndpoint::TCPEndpoint(const isc::asiolink::IOAddress&, short unsigned int)':
../../../src/lib/asiolink/tcp_endpoint.h:45:74: error: 'from_string' is not a member of 'boost::asio::ip::address'
   45 |             new boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address.toText()),
      |                                                                          ^~~~~~~~~~~
In file included from io_endpoint.cc:13:
../../../src/lib/asiolink/udp_endpoint.h: In constructor 'isc::asiolink::UDPEndpoint::UDPEndpoint(const isc::asiolink::IOAddress&, short unsigned int)':
../../../src/lib/asiolink/udp_endpoint.h:45:74: error: 'from_string' is not a member of 'boost::asio::ip::address'
   45 |             new boost::asio::ip::udp::endpoint(boost::asio::ip::address::from_string(address.toText()),
      |                                                                          ^~~~~~~~~~~
make[5]: *** [Makefile:773: libkea_asiolink_la-io_endpoint.lo] Fehler 1
make[5]: Verzeichnis „/mnt/tmp/kea/source/kea-2.6.1/src/lib/asiolink“ wird verlassen
make[4]: *** [Makefile:883: all-recursive] Fehler 1
make[4]: Verzeichnis „/mnt/tmp/kea/source/kea-2.6.1/src/lib/asiolink“ wird verlassen
make[3]: *** [Makefile:475: all-recursive] Fehler 1
make[3]: Verzeichnis „/mnt/tmp/kea/source/kea-2.6.1/src/lib“ wird verlassen
make[2]: *** [Makefile:468: all-recursive] Fehler 1
make[2]: Verzeichnis „/mnt/tmp/kea/source/kea-2.6.1/src“ wird verlassen
make[1]: *** [Makefile:655: all-recursive] Fehler 1
make[1]: Verzeichnis „/mnt/tmp/kea/source/kea-2.6.1“ wird verlassen
make: *** [Makefile:543: all] Fehler 2

Running same instructions on a system with boost-1.85 has shown no issues. (not tested with boost-1.86)

There is a patch at Gentoo (https://bugs.gentoo.org/946488) available as https://946488.bugs.gentoo.org/attachment.cgi?id=914160. This patch applies against kea-2.4.1 as Gentoo has not upgraded to kea-2.6.1 for whatever reason. Unfortunately, the patch does not fully apply to 2.6.1.

Change History (10)

by thomas, 7 weeks ago

I've adopted the Gentoo patch to apply on kea-2.6.1. Hopefully it fixes stuff and does not damage something else...

comment:1 by Xi Ruoyao, 7 weeks ago

Is the patch reviewed by the upstream? We generally don't take a patch not reviewed by the upstream at all (unless the upstream is dead, or the patch just alters some install paths for LFS configuration, or some other strange circumstances).

comment:2 by thomas, 7 weeks ago

Which guideline is this? I'm pretty sure we have a lot patches which are not reviewed by upstream or not even submitted to. They all would be invalid.

Anyway - strange thing is, that Arch does have boost-1.87 now and kea-2.6.1 but either no issues or they have not yet recognized them and produced a patch.

There is(was) a ticket at ISC (https://gitlab.isc.org/isc-projects/kea/-/issues/3696) which is closed, but it leads to https://github.com/isc-projects/kea/pull/143/commits/6300b3c937f91042594cf0944a8ec358d5bed809 which is somehow comparable to the Gentoo stuff.

I'll follow that path for now, maybe there is a solution...

in reply to:  2 ; comment:3 by Xi Ruoyao, 7 weeks ago

Replying to thomas:

Which guideline is this? I'm pretty sure we have a lot patches which are not reviewed by upstream or not even submitted to. They all would be invalid.

But we should make our practice better. I remember I fixed a bug in an unreviewed BLFS patch several years ago and it'd be considered a security vulnerability if we'd classified security issues that year.

Anyway - strange thing is, that Arch does have boost-1.87 now and kea-2.6.1 but either no issues or they have not yet recognized them and produced a patch.

There is(was) a ticket at ISC (https://gitlab.isc.org/isc-projects/kea/-/issues/3696) which is closed, but it leads to https://github.com/isc-projects/kea/pull/143/commits/6300b3c937f91042594cf0944a8ec358d5bed809 which is somehow comparable to the Gentoo stuff.

Then it's better to directly take the upstream patch. I.e. https://github.com/isc-projects/kea/pull/143.patch.

It's already merged so it's just the upstream content.

For Arch the reason is simply they have not rebuilt kea after upgrading boost. Kea was last rebuilt on Dec 22 2024 but boost was updated on Feb 07 2025.

in reply to:  3 comment:4 by Xi Ruoyao, 7 weeks ago

Replying to Xi Ruoyao:

For Arch the reason is simply they have not rebuilt kea after upgrading boost. Kea was last rebuilt on Dec 22 2024 but boost was updated on Feb 07 2025.

(It's similar to how we miss a package broken by a dependency update when we develop BLFS... And AFAIK they even don't have a "tagging" cycle like us.)

comment:5 by Xi Ruoyao, 7 weeks ago

And I just mean "we should at least make the upstream take a look." If the upstream insists to reject a good (reviewed & tested by us, and also used by other distros) patch for some stupid reason or it's inactive at all we can just apply the patch.

comment:6 by thomas, 7 weeks ago

At the end of the day, i agree we should be quite careful with doing patches on our own. I also didn't felt very good to modify something i do not understand.

I found the 143 patch, too. That patch seems to do the thing, rebuilt Kea with this patch successfully.

(Edit: I've attached that patch. I'll add that patch, which is named kea-2.6.1-fix_boost_1_87-2.patch here in the attachments, as kea-2.6.1-fix_boost_1_87-1.patch to the book)

Last edited 7 weeks ago by thomas (previous) (diff)

comment:7 by Douglas R. Reno, 7 weeks ago

I can confirm that the build is broken and that this patch fixes the issue!

comment:8 by thomas, 7 weeks ago

Resolution: fixed
Status: newclosed

Fixed at BLFS [85d0632167]

Note: See TracTickets for help on using tickets.