Skip to content

Conversation

sebroy
Copy link

@sebroy sebroy commented Aug 27, 2025

The latest upstream merge doesn't build due to a missing build dependency on binutils-dev. The package build fails in the configure step like this:

00:03:15.275    $ ./configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --with-python=/usr/bin/python3
... lots of other errors elided
00:03:15.294  configure:16612: result: no
00:03:15.294  configure:16618: error: Disassembler headers not found
... lots of other errors

The only change I made to get a successful build was the following:

diff --git a/debian/control b/debian/control
index 538846f..7b6b8d7 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Delphix Engineering <[email protected]>
 Standards-Version: 4.1.2
 Build-Depends: autoconf,
                automake,
+               binutils-dev,
                dh-python,
                liblzo2-dev,
                libsnappy1v5,

This merge brings us to version 0.5.5.

ab-pre-push: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/12036/console

ptesarik and others added 20 commits December 19, 2024 16:06
Add the sources of kdumpid v1.6 (commit cb3d9452e2f6) and adapt them so
they can be built from libkdumpfile using GNU autotools.

The sources are identical, except these changes:
- include "config.h" from kdumpid.h
- remove some superfluous whitespace

The versioning scheme of kdumpid is retained for now to ensure that the
versions form a monotonically increasing sequence.

The original kdumpid repository will be set to read-only to avoid
potential divergence.

Signed-off-by: Petr Tesarik <[email protected]>
Autoconf 2.69 cannot handle complex conditional expansions well. To improve
compatibility, expand the KDUMP_DIS_ASM macro on its own and then check the
kdump_res variable.

Fixes: ptesarik#83
Signed-off-by: Petr Tesarik <[email protected]>
The attribute value as a number is a kdump_num_t, which should be formatted
using the corresponding PRI_xxx macros.

Signed-off-by: Petr Tesarik <[email protected]>
The maximum PFN is obtained with a call to kdump_get_number_attr(), which
takes a pointer to a kdump_num_t as its parameter.

Signed-off-by: Petr Tesarik <[email protected]>
This include file may conflict with the system <endian.h> (courtesy of
Automake adding -I. to compiler flags).

Move the content of endian.h to kdumpid.h, because it is included only from
that one place anyway.

Signed-off-by: Petr Tesarik <[email protected]>
Bump version to 0.5.5.

Libtool versioning:
- libkdumpfile bumped by commit e182aea
- libaddrxlat bumped by this commit

kdumpid version:
- start with 1.7 (last separate release was 1.6)

Signed-off-by: Petr Tesarik <[email protected]>
Before including bfd.h (or any of the headers installed by binutils),
one has to define PACKAGE_NAME and PACKAGE_VERSION for kind of painful
reasons described in binutils bug PR14243.

This doesn't show up on some distros as they patch out the #ifdef check
in the headers, but it does on Gentoo where we don't, at least.

Moreover, we want to include config.h before *any* headers anyway, so
that e.g. AC_SYSTEM_EXTENSIONS and various other autoconf macros work
correctly if used.

Bug: https://sourceware.org/PR14243
Signed-off-by: Sam James <[email protected]>
addrxlat-priv.h includes config.h for us, but we should include it first
to ensure it affects standard headers too given config.h may set feature
test macros and so on.

Where addrxlat-priv.h is not already used, add config.h instead.

Signed-off-by: Sam James <[email protected]>
testutil.h includes config.h for us, but we should include it first
to ensure it affects standard headers too given config.h may set feature
test macros and so on.

Where testutil.h is not already used, add config.h instead.

(Same as done earlier for addrxlat-priv.h.)

Signed-off-by: Sam James <[email protected]>
tools: kdumpid: include config.h before <dis-asm.h>
Signed-off-by: Petr Tesarik <[email protected]>
The xlat-linux-x86_64-6.11-pti-user and xlat-linux-x86_64-6.11-pti-user-ver
test cases use the same input files, but the logic is flawed, because they
also use the same output file names. That fails if both run in parallel.

Fixes: ptesarik#85
Signed-off-by: Petr Tesarik <[email protected]>
Since util.c calls some functions from libaddrxlat, let's link against that
library explicitly instead of relying on its being added as a dependency of
libkdumpfile.

Fixes: ptesarik#87
Signed-off-by: Petr Tesarik <[email protected]>
Since uncompress_config() uses functions from zlib, kdumpid must link with
ZLIB. It may work without it, because ZLIB is often added as a dependency
for libbfd, but we should not rely on it.

Signed-off-by: Petr Tesarik <[email protected]>
Run "doxygen -u" to refresh the configuration.

Signed-off-by: Petr Tesarik <[email protected]>
To close a group, the @} string must appear in a comment that is parsed by
Doxygen, i.e. inside a comment that starts with a "/**".

Signed-off-by: Petr Tesarik <[email protected]>
@sebroy sebroy force-pushed the dlpx/pr/sebroy/fa5bb09c-857c-405b-a02f-0d20500c7cc6 branch from 09dcaec to 400f3ee Compare August 27, 2025 18:54
@sebroy sebroy marked this pull request as ready for review August 27, 2025 18:55
@sebroy sebroy requested review from prakashsurya and mmaybee August 27, 2025 18:55
Copy link

@prakashsurya prakashsurya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@sebroy sebroy merged commit 0da5b3b into develop Aug 27, 2025
4 of 14 checks passed
@sebroy sebroy deleted the dlpx/pr/sebroy/fa5bb09c-857c-405b-a02f-0d20500c7cc6 branch August 27, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants