* con3270.o is built twice, leading to errors
@ 2023-07-14 6:33 Jiri Slaby
2023-07-14 20:01 ` Nicolas Schier
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jiri Slaby @ 2023-07-14 6:33 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nick Desaulniers,
Nicolas Schier, Linux Kbuild mailing list
Hi,
if I create an s390 defconfig:
mkdir /tmp/s390/
make O=/tmp/s390/ ARCH=s390 CROSS_COMPILE=s390x-suse-linux- defconfig
And then if I try for a couple times:
make O=/tmp/s390/ -j17 ARCH=s390 CROSS_COMPILE=s390x-suse-linux-
drivers/s390/char/con3270.o
Most of the time, I get:
make[1]: Entering directory '/tmp/s390'
GEN Makefile
CALL /home/latest/linux/scripts/checksyscalls.sh
CC drivers/s390/char/con3270.o
CC drivers/s390/char/con3270.o
I.e. it is built twice.
Sometimes, I also get an error:
fixdep: error opening file: drivers/s390/char/.con3270.o.d: No such file
or directory
make[4]: *** [/home/latest/linux/scripts/Makefile.build:243:
drivers/s390/char/con3270.o] Error 2
make[4]: *** Deleting file 'drivers/s390/char/con3270.o'
make[3]: *** [/home/latest/linux/scripts/Makefile.build:477: drivers]
Obviously due to some race.
Any ideas what is going on?
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: con3270.o is built twice, leading to errors
2023-07-14 6:33 con3270.o is built twice, leading to errors Jiri Slaby
@ 2023-07-14 20:01 ` Nicolas Schier
2023-07-15 5:04 ` Masahiro Yamada
2023-07-19 8:30 ` arch/um's ssl.o [was: con3270.o] " Jiri Slaby
2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Schier @ 2023-07-14 20:01 UTC (permalink / raw)
To: Jiri Slaby
Cc: Masahiro Yamada, Nathan Chancellor, Nick Desaulniers,
Linux Kbuild mailing list
On Fri, Jul 14, 2023 at 08:33:46AM +0200 Jiri Slaby wrote:
> Hi,
>
> if I create an s390 defconfig:
> mkdir /tmp/s390/
> make O=/tmp/s390/ ARCH=s390 CROSS_COMPILE=s390x-suse-linux- defconfig
>
> And then if I try for a couple times:
> make O=/tmp/s390/ -j17 ARCH=s390 CROSS_COMPILE=s390x-suse-linux-
> drivers/s390/char/con3270.o
>
> Most of the time, I get:
> make[1]: Entering directory '/tmp/s390'
> GEN Makefile
> CALL /home/latest/linux/scripts/checksyscalls.sh
> CC drivers/s390/char/con3270.o
> CC drivers/s390/char/con3270.o
>
> I.e. it is built twice.
>
> Sometimes, I also get an error:
> fixdep: error opening file: drivers/s390/char/.con3270.o.d: No such file or
> directory
> make[4]: *** [/home/latest/linux/scripts/Makefile.build:243:
> drivers/s390/char/con3270.o] Error 2
> make[4]: *** Deleting file 'drivers/s390/char/con3270.o'
> make[3]: *** [/home/latest/linux/scripts/Makefile.build:477: drivers]
>
> Obviously due to some race.
>
> Any ideas what is going on?
Which reason does compiling with V=2 reveal?
Kind regards,
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: con3270.o is built twice, leading to errors
2023-07-14 6:33 con3270.o is built twice, leading to errors Jiri Slaby
2023-07-14 20:01 ` Nicolas Schier
@ 2023-07-15 5:04 ` Masahiro Yamada
2023-07-17 8:30 ` Jiri Slaby
2023-07-19 8:30 ` arch/um's ssl.o [was: con3270.o] " Jiri Slaby
2 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2023-07-15 5:04 UTC (permalink / raw)
To: Jiri Slaby
Cc: Nathan Chancellor, Nick Desaulniers, Nicolas Schier,
Linux Kbuild mailing list
On Fri, Jul 14, 2023 at 3:33 PM Jiri Slaby <jirislaby@kernel.org> wrote:
>
> Hi,
>
> if I create an s390 defconfig:
> mkdir /tmp/s390/
> make O=/tmp/s390/ ARCH=s390 CROSS_COMPILE=s390x-suse-linux- defconfig
>
> And then if I try for a couple times:
> make O=/tmp/s390/ -j17 ARCH=s390 CROSS_COMPILE=s390x-suse-linux-
> drivers/s390/char/con3270.o
>
> Most of the time, I get:
> make[1]: Entering directory '/tmp/s390'
> GEN Makefile
> CALL /home/latest/linux/scripts/checksyscalls.sh
> CC drivers/s390/char/con3270.o
> CC drivers/s390/char/con3270.o
>
> I.e. it is built twice.
>
> Sometimes, I also get an error:
> fixdep: error opening file: drivers/s390/char/.con3270.o.d: No such file
> or directory
> make[4]: *** [/home/latest/linux/scripts/Makefile.build:243:
> drivers/s390/char/con3270.o] Error 2
> make[4]: *** Deleting file 'drivers/s390/char/con3270.o'
> make[3]: *** [/home/latest/linux/scripts/Makefile.build:477: drivers]
>
> Obviously due to some race.
>
> Any ideas what is going on?
The reason is because ARCH=s390 descends into
drivers/s390/ in a non-standard way.
See arch/s390/Makefile line 122.
This is a corner case in single builds, and I
do not know how to make it work.
I really hope arch maintainers will follow the standard
obj-y syntax unless there is a strong reason to opt out.
The following patch will fix the issue.
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 5ed242897b0d..a53a36ee0731 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -119,7 +119,6 @@ export KBUILD_CFLAGS_DECOMPRESSOR
OBJCOPYFLAGS := -O binary
libs-y += arch/s390/lib/
-drivers-y += drivers/s390/
boot := arch/s390/boot
syscalls := arch/s390/kernel/syscalls
diff --git a/drivers/Makefile b/drivers/Makefile
index 7241d80a7b29..a7459e77df37 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -195,3 +195,5 @@ obj-$(CONFIG_PECI) += peci/
obj-$(CONFIG_HTE) += hte/
obj-$(CONFIG_DRM_ACCEL) += accel/
obj-$(CONFIG_CDX_BUS) += cdx/
+
+obj-$(CONFIG_S390) += s390/
--
Best Regards
Masahiro Yamada
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: con3270.o is built twice, leading to errors
2023-07-15 5:04 ` Masahiro Yamada
@ 2023-07-17 8:30 ` Jiri Slaby
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2023-07-17 8:30 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Nathan Chancellor, Nick Desaulniers, Nicolas Schier,
Linux Kbuild mailing list
On 15. 07. 23, 7:04, Masahiro Yamada wrote:
> On Fri, Jul 14, 2023 at 3:33 PM Jiri Slaby <jirislaby@kernel.org> wrote:
>>
>> Hi,
>>
>> if I create an s390 defconfig:
>> mkdir /tmp/s390/
>> make O=/tmp/s390/ ARCH=s390 CROSS_COMPILE=s390x-suse-linux- defconfig
>>
>> And then if I try for a couple times:
>> make O=/tmp/s390/ -j17 ARCH=s390 CROSS_COMPILE=s390x-suse-linux-
>> drivers/s390/char/con3270.o
>>
>> Most of the time, I get:
>> make[1]: Entering directory '/tmp/s390'
>> GEN Makefile
>> CALL /home/latest/linux/scripts/checksyscalls.sh
>> CC drivers/s390/char/con3270.o
>> CC drivers/s390/char/con3270.o
>>
>> I.e. it is built twice.
>>
>> Sometimes, I also get an error:
>> fixdep: error opening file: drivers/s390/char/.con3270.o.d: No such file
>> or directory
>> make[4]: *** [/home/latest/linux/scripts/Makefile.build:243:
>> drivers/s390/char/con3270.o] Error 2
>> make[4]: *** Deleting file 'drivers/s390/char/con3270.o'
>> make[3]: *** [/home/latest/linux/scripts/Makefile.build:477: drivers]
>>
>> Obviously due to some race.
>>
>> Any ideas what is going on?
>
>
>
> The reason is because ARCH=s390 descends into
> drivers/s390/ in a non-standard way.
>
> See arch/s390/Makefile line 122.
>
>
>
> This is a corner case in single builds, and I
> do not know how to make it work.
>
>
>
> I really hope arch maintainers will follow the standard
> obj-y syntax unless there is a strong reason to opt out.
>
>
> The following patch will fix the issue.
Tested-by: Jiri Slaby <jirislaby@kernel.org>
Will you send it as a patch?
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index 5ed242897b0d..a53a36ee0731 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -119,7 +119,6 @@ export KBUILD_CFLAGS_DECOMPRESSOR
> OBJCOPYFLAGS := -O binary
>
> libs-y += arch/s390/lib/
> -drivers-y += drivers/s390/
>
> boot := arch/s390/boot
> syscalls := arch/s390/kernel/syscalls
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 7241d80a7b29..a7459e77df37 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -195,3 +195,5 @@ obj-$(CONFIG_PECI) += peci/
> obj-$(CONFIG_HTE) += hte/
> obj-$(CONFIG_DRM_ACCEL) += accel/
> obj-$(CONFIG_CDX_BUS) += cdx/
> +
> +obj-$(CONFIG_S390) += s390/
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* arch/um's ssl.o [was: con3270.o] is built twice, leading to errors
2023-07-14 6:33 con3270.o is built twice, leading to errors Jiri Slaby
2023-07-14 20:01 ` Nicolas Schier
2023-07-15 5:04 ` Masahiro Yamada
@ 2023-07-19 8:30 ` Jiri Slaby
2023-07-21 13:37 ` Masahiro Yamada
2 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2023-07-19 8:30 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nick Desaulniers,
Nicolas Schier, Linux Kbuild mailing list
On 14. 07. 23, 8:33, Jiri Slaby wrote:
> Hi,
>
> if I create an s390 defconfig:
> mkdir /tmp/s390/
> make O=/tmp/s390/ ARCH=s390 CROSS_COMPILE=s390x-suse-linux- defconfig
>
> And then if I try for a couple times:
> make O=/tmp/s390/ -j17 ARCH=s390 CROSS_COMPILE=s390x-suse-linux-
> drivers/s390/char/con3270.o
>
> Most of the time, I get:
> make[1]: Entering directory '/tmp/s390'
> GEN Makefile
> CALL /home/latest/linux/scripts/checksyscalls.sh
> CC drivers/s390/char/con3270.o
> CC drivers/s390/char/con3270.o
>
> I.e. it is built twice.
Similarly, another tty driver, another arch (um):
$ make O=../a/arch/um/ -j17 ARCH=um arch/um/drivers/ssl.o V=2
GEN Makefile - due to target is PHONY
CALL scripts/checksyscalls.sh - due to target is PHONY
CC arch/um/drivers/ssl.o - due to: arch/um/drivers/ssl.c
CC arch/um/drivers/ssl.o - due to: arch/um/drivers/ssl.c
This leads often to corrupted arch/um/arch/um/drivers/.ssl.o.cmd.
But in this case, I see:
obj-$(CONFIG_SSL) += ssl.o
So is this has this a different root cause?
> Sometimes, I also get an error:
> fixdep: error opening file: drivers/s390/char/.con3270.o.d: No such file
> or directory
> make[4]: *** [/home/latest/linux/scripts/Makefile.build:243:
> drivers/s390/char/con3270.o] Error 2
> make[4]: *** Deleting file 'drivers/s390/char/con3270.o'
> make[3]: *** [/home/latest/linux/scripts/Makefile.build:477: drivers]
>
> Obviously due to some race.
>
> Any ideas what is going on?
>
> thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: arch/um's ssl.o [was: con3270.o] is built twice, leading to errors
2023-07-19 8:30 ` arch/um's ssl.o [was: con3270.o] " Jiri Slaby
@ 2023-07-21 13:37 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2023-07-21 13:37 UTC (permalink / raw)
To: Jiri Slaby
Cc: Nathan Chancellor, Nick Desaulniers, Nicolas Schier,
Linux Kbuild mailing list
On Wed, Jul 19, 2023 at 5:30 PM Jiri Slaby <jirislaby@kernel.org> wrote:
>
> On 14. 07. 23, 8:33, Jiri Slaby wrote:
> > Hi,
> >
> > if I create an s390 defconfig:
> > mkdir /tmp/s390/
> > make O=/tmp/s390/ ARCH=s390 CROSS_COMPILE=s390x-suse-linux- defconfig
> >
> > And then if I try for a couple times:
> > make O=/tmp/s390/ -j17 ARCH=s390 CROSS_COMPILE=s390x-suse-linux-
> > drivers/s390/char/con3270.o
> >
> > Most of the time, I get:
> > make[1]: Entering directory '/tmp/s390'
> > GEN Makefile
> > CALL /home/latest/linux/scripts/checksyscalls.sh
> > CC drivers/s390/char/con3270.o
> > CC drivers/s390/char/con3270.o
> >
> > I.e. it is built twice.
>
> Similarly, another tty driver, another arch (um):
>
> $ make O=../a/arch/um/ -j17 ARCH=um arch/um/drivers/ssl.o V=2
> GEN Makefile - due to target is PHONY
> CALL scripts/checksyscalls.sh - due to target is PHONY
> CC arch/um/drivers/ssl.o - due to: arch/um/drivers/ssl.c
> CC arch/um/drivers/ssl.o - due to: arch/um/drivers/ssl.c
>
> This leads often to corrupted arch/um/arch/um/drivers/.ssl.o.cmd.
>
> But in this case, I see:
> obj-$(CONFIG_SSL) += ssl.o
>
> So is this has this a different root cause?
It is a similar symptom.
See arch/um/Makefile line 26
core-y += $(ARCH_DIR)/kernel/ \
$(ARCH_DIR)/drivers/ \
$(ARCH_DIR)/os-$(OS)/
I will send a patch.
>
> > Sometimes, I also get an error:
> > fixdep: error opening file: drivers/s390/char/.con3270.o.d: No such file
> > or directory
> > make[4]: *** [/home/latest/linux/scripts/Makefile.build:243:
> > drivers/s390/char/con3270.o] Error 2
> > make[4]: *** Deleting file 'drivers/s390/char/con3270.o'
> > make[3]: *** [/home/latest/linux/scripts/Makefile.build:477: drivers]
> >
> > Obviously due to some race.
> >
> > Any ideas what is going on?
> >
> > thanks,
>
> --
> js
> suse labs
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-21 13:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14 6:33 con3270.o is built twice, leading to errors Jiri Slaby
2023-07-14 20:01 ` Nicolas Schier
2023-07-15 5:04 ` Masahiro Yamada
2023-07-17 8:30 ` Jiri Slaby
2023-07-19 8:30 ` arch/um's ssl.o [was: con3270.o] " Jiri Slaby
2023-07-21 13:37 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).