From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [autobuild.buildroot.net] Daily results for 2021-08-17
Date: Wed, 18 Aug 2021 23:04:31 +0200 [thread overview]
Message-ID: <20210818210431.GZ27036@scaer> (raw)
In-Reply-To: <20210818221842.5926641d@windsurf>
Thomas, All,
On 2021-08-18 22:18 +0200, Thomas Petazzoni spake thusly:
> On Wed, 18 Aug 2021 13:05:58 +0200
> "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > Not sure the exact reason, but notice that the failures occur at install
> > time, not build time.
> I did try with "make host-libcap", which includes the installation
> step, and I even tried to do a full build of one of the failing
> defconfigs. The build failed, but much much later, on a completely
> unrelated package. And manually checking the RPATH of the host-libcap
> binaries: they are correct.
Here too.
> > And even then, the Makefile is still trying to
> > compile some stuff.
> >
> > libcap is a generic package, and I noticed that the build and install
> > commands do not use the same environment:
> >
> > define HOST_LIBCAP_BUILD_CMDS
> > $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> > $(HOST_LIBCAP_MAKE_FLAGS)
> > endef
> >
> > define HOST_LIBCAP_INSTALL_CMDS
> > $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) install
> > endef
> >
> > So I wonder if, at least for sanity sake, we should not just add
> > $(HOST_CONFIGURE_OPTS) in the environment for the install commands too.
>
> I'm not sure how that could cause an issue, as I'm building on the same
> machine, same defconfig.
Well, it has an impact: the file sthat are built at build time and
install time have different compile lines:
For example, cap_magic.o at build time, from:
http://autobuild.buildroot.org/results/e0d8cb350072ea90c331824a6790c792d60d885d/build-end.log
gcc -O2
-I/data/buildroot-autobuilder/instance-0/output-1/host/include -Dlinux
-Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wshadow -g -Dlinux -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual
-Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-Winline -Wshadow -g -Dlinux -Wall -Wwrite-strings -Wpointer-arith
-Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes
-Wnested-externs -Winline -Wshadow -g -fPIC
-I/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap/include/uapi
-I/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap/include
-DLIBRARY_VERSION=\"libcap-2.52\"
-DSHARED_LOADER=\"/lib64/ld-linux-x86-64.so.2\" -c execable.c -o
cap_magic.o
Which get linked with:
gcc -Wl,-x -shared -O2
-I/data/buildroot-autobuilder/instance-0/output-1/host/include -Dlinux
-Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wshadow -g -Dlinux -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual
-Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-Winline -Wshadow -g -Dlinux -Wall -Wwrite-strings -Wpointer-arith
-Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes
-Wnested-externs -Winline -Wshadow -g
-L/data/buildroot-autobuilder/instance-0/output-1/host/lib
-Wl,-rpath,/data/buildroot-autobuilder/instance-0/output-1/host/lib
-L/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap
-L/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap
-L/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap
-Wl,-soname,libpsx.so.2 -o libpsx.so.2.52 ../psx/psx.o psx_magic.o
--entry=__so_start -lpthread -Wl,-wrap,pthread_create
And now at install time:
gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dlinux -Wall
-Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wshadow -g -fPIC
-I/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap/include/uapi
-I/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap/include
-DLIBRARY_VERSION=\"libcap-2.52\"
-DSHARED_LOADER=\"/lib64/ld-linux-x86-64.so.2\" -c execable.c -o
cap_magic.o
which is now linked with:
gcc -Wl,-x -shared -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-Dlinux -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wshadow -g
-L/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap/../libcap
-Wl,-soname,libcap.so.2 -o libcap.so.2.52 cap_alloc.o cap_proc.o
cap_extint.o cap_flag.o cap_text.o cap_file.o cap_magic.o
--entry=__so_start
So, the first properly gets our LDFLAGS, the second, not. Pasing
TARGET_CONFIGURE_OPTS at install time would solve^whide the issue,
though.
But OK, what are the dependencies of cap_magic.o?
cap_magic.o: execable.h execable.c loader.txt
execable.h and .c are not generated, so they are terminal dependencies.
loader.txt is generated. And it is generated twice (still form the same
build):
make[3]: Entering directory '/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap'
gcc -o empty empty.c
objcopy --dump-section .interp=/dev/stdout empty > loader.txt
[...]
make[3]: Leaving directory '/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap'
/usr/bin/make libpsx.so
make[3]: Entering directory '/data/buildroot-autobuilder/instance-0/output-1/build/host-libcap-2.52/libcap'
objcopy --dump-section .interp=/dev/stdout empty > loader.txt
[...]
Wha?
So, it believes loader.txt is out of date wrt a file named 'empty'
(which is generated from a trivial C file empty.c)
So, becasue loader.txt is re-generated a second time, some files are
re-built at install time. Which explains why we get an issue.
But then, why is it out of date, at all? I really got stuck there...
Could it be that this is a parallel build issue? I doubt it, though...
I'm out of clues now, so I'll let a godd night's sleep try to solve
this....
Regards,
Yann E. MORIN.
> > Also, notice spurious errors from ldconfig:
> >
> > /sbin/ldconfig
> > /sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
> > make[5]: [Makefile:162: install-shared-psx] Error 1 (ignored)
> >
> > (ldconfig is a wrapper around ldconfig.real, specific to debian and.or
> > ubuntu I guess)
>
> Right, but the absence/presence of the RPATH should normally not be
> affected by this, I believe.
Nope, nope.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-08-18 21:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 6:57 [Buildroot] [autobuild.buildroot.net] Daily results for 2021-08-17 Thomas Petazzoni
2021-08-18 10:25 ` Thomas Petazzoni
2021-08-18 11:05 ` Yann E. MORIN
2021-08-18 20:18 ` Thomas Petazzoni
2021-08-18 21:04 ` Yann E. MORIN [this message]
2021-08-23 20:55 ` Arnout Vandecappelle
2021-08-23 22:06 ` Thomas Petazzoni
2021-08-23 22:16 ` Arnout Vandecappelle
2021-08-18 21:44 ` [Buildroot] Analysis of build " Thomas Petazzoni
2021-08-18 22:24 ` Giulio Benetti
2021-08-18 22:26 ` Giulio Benetti
2021-08-19 0:01 ` Giulio Benetti
2021-08-19 13:28 ` Thomas Petazzoni
2021-08-20 14:26 ` Giulio Benetti
2021-08-20 22:00 ` Giulio Benetti
2021-08-21 23:08 ` Giulio Benetti
2021-08-19 9:27 ` Arnout Vandecappelle
2021-08-19 13:24 ` Thomas Petazzoni
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=20210818210431.GZ27036@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--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