From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Gaël PORTAY" <gael.portay@gmail.com>
Cc: "Samuel Martin" <s.martin49@gmail.com>,
"Gaël PORTAY" <gael.portay@rtone.fr>,
"Mahyar Koshkouei" <mahyar.koshkouei@gmail.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/rpi-utils: new package
Date: Thu, 25 Jul 2024 10:10:27 +0200 [thread overview]
Message-ID: <20240725101027.77f7b4e4@windsurf> (raw)
In-Reply-To: <D2YGQXWLNLWG.2S6K4TCJ7EDN6@gmail.com>
Hello,
On Thu, 25 Jul 2024 10:05:54 +0200
Gaël PORTAY <gael.portay@gmail.com> wrote:
> The CMakeLists.txt of the dtmerge utils creates an internal library by
> doing[1]:
>
> add_library (dtovl ${STATIC} dtoverlay.c)
>
> According to online documentation of cmake[2]:
>
> add_library(<name> [<type>] [EXCLUDE_FROM_ALL] <sources>...)
>
> Add a library target called <name> to be built from the
> source files listed in the command invocation.
>
> The optional <type> specifies the type of library to be
> created:
>
> STATIC An archive of object files for use when
> linking other targets.
>
> SHARED A dynamic library that may be linked by
> other targets and loaded at runtime.
>
> MODULE A plugin that may not be linked by other
> targets, but may be dynamically loaded at
> runtime using dlopen-like functionality.
>
> If no <type> is given the default is STATIC or SHARED
> based on the value of the BUILD_SHARED_LIBS variable.
>
> In rpi-utils, the optional type is controlled thanks to the environment
> variable ${STATIC}; it is unset by default. It is expected cmake builds
> a STATIC library; but...
>
> cmake creates a STATIC library if configuring the project for my host
> system (Arch Linux).
>
> And, cmake creates a SHARED library through buildroot (maybe because of
> BUILD_SHARED_LIBS?).
>
> The file CMakeLists.txt does not install the shared library, and it
> results in a run-time issue saying the library libdtovl.so is not found.
>
> So, I have decided to ensure the library is statically build by setting
> the environment variable STATIC to STATIC.
>
> Do you prefer I install the shared library from an install hook or
> whatsover?
Meh, this is really crappy stuff from rpi-utils's CMakeLists.txt. I'd
say keep the -DSTATIC=STATIC as you had, but with a comment above that
explains what's going on.
> Well, I wanted to give a try before sending the package, but the
> toolchain all skipped.
Well, your patch was not including package/rpi-utils/Config.in, so the
option BR2_PACKAGE_RPI_UTILS does not exist. Perhaps why it gets
skipped?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-07-25 8:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 21:20 [Buildroot] [PATCH 0/2] rpi-utils replaces rpi-userland Gaël PORTAY
2024-07-23 21:20 ` [Buildroot] [PATCH 1/2] package/rpi-utils: new package Gaël PORTAY
2024-07-24 16:21 ` Thomas Petazzoni via buildroot
2024-07-25 8:05 ` Gaël PORTAY
2024-07-25 8:10 ` Thomas Petazzoni via buildroot [this message]
2024-07-25 9:43 ` Gaël PORTAY
2024-07-25 10:05 ` Waldemar Brodkorb
2024-07-25 10:16 ` Thomas Petazzoni via buildroot
2024-07-25 10:21 ` Gaël PORTAY
2024-07-23 21:20 ` [Buildroot] [PATCH 2/2] package/rpi-userland: package is deprecated Gaël PORTAY
2024-07-24 16:21 ` Thomas Petazzoni via buildroot
2024-07-25 9:53 ` Gaël PORTAY
2024-07-25 10:15 ` Thomas Petazzoni via buildroot
2024-07-25 11:05 ` Gaël PORTAY
2024-07-25 14:59 ` Thomas Petazzoni via buildroot
2024-07-31 11:42 ` Gaël PORTAY
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=20240725101027.77f7b4e4@windsurf \
--to=buildroot@buildroot.org \
--cc=gael.portay@gmail.com \
--cc=gael.portay@rtone.fr \
--cc=mahyar.koshkouei@gmail.com \
--cc=s.martin49@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.