mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Christian Melki <christian.melki@t2data.com>
Cc: ruggero <rrossi@atb-biomag.de>, ptxdist@pengutronix.de
Subject: Re: [ptxdist] Difficulties to compile package utils-linux while upgrading from PTXDIST-2023.09.0 to PTXDIST-2023.19.0.
Date: Wed, 10 Jan 2024 08:51:49 +0100	[thread overview]
Message-ID: <ZZ5MlRNNin54ysV5@pengutronix.de> (raw)
In-Reply-To: <76c12c66-efa8-4f02-a6d6-5204271806a3@t2data.com>

Hi,

On Mon, Jan 08, 2024 at 01:47:57PM +0100, Christian Melki wrote:
> On 1/8/24 1:14 PM, ruggero wrote:
> > [Du f?r inte e-post ofta fr?n rrossi@atb-biomag.de. L?s om varf?r det h?r ?r viktigt p? https://aka.ms/LearnAboutSenderIdentification ]
> > 
> > Hello everybody,
> > 
> > 
> > my BSP still uses an old version of linux / libC, that does not provide
> > all modern features.
> > 
> > Compiling utils-linux with PTXDIST-2023.09.0 was painless.
> > Upgrading to PTXDIST-2023.11.0 caused several compilation errors.
> > 
> > Both PTXDIST release uses the same version of utils-linux (2.39.2) the
> > only difference being the build system. PTXDIST-2023.09.0 uses autotools,
> > while PTXDIST-2023.11.0 uses meson.
> > 
> > Here a list of the problems:
> > 
> > My linux do not provide <linux/blkzoned.h>. This causes an error while
> > compiling blkzone.
> > 
> > My linux do not provide <linux/pr.h>. This causes an error compiling blkpr.
> > 
> > My linux do not provide <linux/kcmp.h>. This causes an error compiling
> > lsfd.
> > 
> > My linux do not provide the symbol SIOCGSKNS in linux/sockios.h. This
> > causes an error while compiling test_mkfds.
> > 
> > In the autotool version, all these programs were disabled. This seems to
> > be not possible with meson.
> > 
> > My libC provides the symbol openpty in the libutils module. The
> > PTXDIST-2023.09.0 makefile util-linux.make explicitly enables libutils,
> > the  PTXDIST-2023.11.0 explicitly disables them.
> > 
> > I was able to find a solution to all the problems. Attached are my patches.
> > 
> > In meson.build I disabled build of blkzone if linux/blkzoned.h does not
> > exists, lsfd if linux/pr.h is missing, etc.
> > 
> > In the makefile util-linux.make I just changed libutils form disabled to
> > enabled. Maybe one can consider to use a parameter instead.
> > 
> > I'm not sure if this is the best way to do, since it is my first
> > experience with meson. It would be nice if somebody can check them, and
> > maybe include them in the future versions of ptxdist.
> > 
> 
> Thanks for reporting and working with these issues.
> I suggest also reporting them upstream to the util-linux project itself.
> There are going to be a lot of these types of issues.
> Ie when converting build systems, be it autotools or anything else.

Reporting to upstream is definitely good idea. But I'm not sure if will
accept patches for kernel / libc versions that are this old.

You could also try to use newer kernel headers instead. That way util-linux
should compile, even if some tools may fail at runtime. To do that enable
the package KERNEL_HEADERS and make sure the new headers are used in
util-linux.make. See e.g. systemd.make on how to do that. It's the
"ifdef PTXCONF_KERNEL_HEADER" block that you'll need to copy and adapt.

I would accept a patch for this, but please read our contributing guide
lines[1] on how to do that.

Regards,
Michael

[1] https://www.ptxdist.org/doc/contributing.html

> Regards,
> Christian
> 
> > 
> > 
> > Ruggero
> > 
> > 
> > 
> > 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2024-01-10  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 12:14 ruggero
2024-01-08 12:47 ` Christian Melki
2024-01-10  7:51   ` Michael Olbrich [this message]
2024-01-23 11:57     ` ruggero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZZ5MlRNNin54ysV5@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    --cc=rrossi@atb-biomag.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox