From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: MidCheck <mc.xin@foxmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Romain Naour <romain.naour@gmail.com>,
Giulio Benetti <giulio.benetti@benettiengineering.com>,
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] toolchain/helpers.mk: add the processing when LIBPATH is a directory
Date: Sun, 23 Apr 2023 18:40:25 +0200 [thread overview]
Message-ID: <20230423164025.GL2696@scaer> (raw)
In-Reply-To: <tencent_E605AD09EB02769EC2D19F376A1239F80406@qq.com>
MidCheck, All,
On 2023-04-23 23:54 +0800, MidCheck spake thusly:
> When built with the system's toolchain, the output is as follows:
> >>> toolchain-external-custom Installing to target
> >>> toolchain-external-custom Copying external toolchain libraries to target...
> make: *** [package/pkg-generic.mk:384: /root/buildroot-2022.02.11/output/build/toolchain-external-custom/.stamp_target_installed] Error 255
>
> After echo the value of LIBPATH, I found it is a directory:
> /root/buildroot-2022.02.11/output/host/x86_64-buildroot-linux-gnu/sysroot/etc/ld.so.conf.d
This is weird that you get an ld.so.conf.d in your toolchain. Is it a
toolchain we can have access to? How did it get built?
> So it caused the script to execute the "exit -1". When I added the processing of the directory, it was successfully built.
>
> Signed-off-by: MidCheck <mc.xin@foxmail.com>
Please, use your real name, not a nickname. Note that it must also match
the authorship. Non-latin-script characters are perfectly OK.
> ---
> toolchain/helpers.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 24c482923a..e0ab991bec 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -28,6 +28,10 @@ copy_toolchain_lib_root = \
> elif test -f $${LIBPATH}; then \
> $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> break ; \
> + elif test -d $${LIBPATH}; then \
> + mkdir -p $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> + cp -r $${LIBPATH}/* $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
> + break ; \
The proper fix would be to exclude directories in the find on line 13.
Indeed, LIBPATTERN is the argument to copy_toolchain_lib_root, and in
the case of external toolchains, is each item in TOOLCHAIN_EXTERNAL_LIBS,
the first of which is ld*.so.*, which we expect to only match files, but
in your case matches a directory.
As I understand it, ld.so.conf is not used at build time to find
libraries, so having it in the staging is useless.
Also note that having /etc/ld.so.conf.d in the target is not supported,
and that Buildroot will explicitly fail at the end of the build if it
sees such a directory, as it is not possible to have proper ldconfig
setup in cross-compilation; see the top-level Makefile, lines 753-756,
and commit 9c4072348960 (Makefile: drop ldconfig handling). And so it is
even weirder that your change makes the build succeed...
Regards,
Yann E. MORIN.
> else \
> exit -1; \
> fi; \
> --
> 2.40.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-04-23 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 15:54 [Buildroot] [PATCH 1/1] toolchain/helpers.mk: add the processing when LIBPATH is a directory MidCheck
2023-04-23 16:40 ` Yann E. MORIN [this message]
2023-04-24 7:56 ` [Buildroot] =?gb18030?b?u9i4tKO6ICBbUEFUQ0ggMS8xXSB0b29sY2hhaW4v?= =?gb18030?q?helpers=2Emk=3A_add_the_processing_when_LIBPATH_is_a_directory?= =?gb18030?B?SmlhbmdYaW4=?=
2023-04-24 15:48 ` [Buildroot] 回复: [PATCH 1/1] toolchain/helpers.mk: add the processing when LIBPATH is a directory Yann E. MORIN
[not found] ` <tencent_B90EBB4061EF4F1B15813C6A229F3698F505@qq.com>
2023-04-25 20:03 ` [Buildroot] 回复: " Arnout Vandecappelle via buildroot
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=20230423164025.GL2696@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=mc.xin@foxmail.com \
--cc=romain.naour@gmail.com \
--cc=thomas.de_schampheleire@nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox