edk2 fails with isar 0.10

25 views
Skip to first unread message

Schultschik, Sven

unread,
Jan 31, 2024, 5:09:27 AM1/31/24
to isar-...@googlegroups.com
Hi everyone,

we updated https://github.com/ilbers/isar
in our setup from

From 0.9
213b8f62fa74e87321f927fb6b4ed9db93e5cb37
to 0.10 dev
51f5b0dbecb4a7271540793e13c54fac69b42da0


With this update edk2 standalonemm rpmb build started to faile because
of

/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-
gnu/bin/ld: cannot find -llto-aarch64

the same error, if we deactivate cross build

if we go back to 0.9 the error does not apear

It doesn't matter if we are using edk2 202302 oder 202311 version of
edk2.

we normaly build with GCC5 toolchain flag (GCC for 202311 an newer)

If we switch to edk2 toolchain GCC49 (GCCNOLTO for 202311 and newer) it
compiles without any further errors.

So something in that update to 0.10 seems to prevent LTO to be not
available anymore.

Did someone see similar already, or already knows the reason?

br Sven

Anton Mikanovich

unread,
Jan 31, 2024, 6:21:28 AM1/31/24
to Schultschik, Sven, isar-...@googlegroups.com, Baurzhan Ismagulov
Hello Sven,

Is there any steps to reproduce this issue? (with recipe or layer to try).
I've tried edk2 with GCC5 option outside Isar and it just worked, so we
need to
check if it's some kind of Isar issue or recipe itself.

The main difference between 0.9 and 0.10rc1 is sbuild integration which
makes
all recipes been built independently. It requires more strict dependencies
handling, because packages will not be shared between recipes.

Schultschik, Sven

unread,
Jan 31, 2024, 8:07:48 AM1/31/24
to ami...@ilbers.de, isar-...@googlegroups.com, i...@ilbers.de
On Wed, 2024-01-31 at 13:21 +0200, Anton Mikanovich wrote:
> 31/01/2024 12:09, 'Schultschik, Sven' via isar-users wrote:
> Hello Sven,
>
> Is there any steps to reproduce this issue? (with recipe or layer to
> try).

I attached the recipe and rules file. Hope that's ok.

> I've tried edk2 with GCC5 option outside Isar and it just worked, so
> we
> need to
> check if it's some kind of Isar issue or recipe itself.

Yes outside of ISAR it just works as expected

>
> The main difference between 0.9 and 0.10rc1 is sbuild integration
> which
> makes
> all recipes been built independently. It requires more strict
> dependencies
> handling, because packages will not be shared between recipes.

That was my first thought, but the LTO lib is no extra package so far.
It comes with the gcc compiler.
When I search for hints I saw that buildroot had changes regarding
support for lto, but I didn't followed the versions and details if it
really matters for this issue yet.


rules.tmpl
edk2-standalonemm-rpmb-upstream.bb

Jan Kiszka

unread,
Jan 31, 2024, 10:50:56 AM1/31/24
to Schultschik, Sven, ami...@ilbers.de, isar-...@googlegroups.com, i...@ilbers.de
We are on sbuild Isar in meta-iot2050 (currently
30471bb3f787fb0aa822d15e141ecce2f3b99860), and there the recipe builds.
Already compared that?

Jan

--
Siemens AG, Technology
Linux Expert Center

Schultschik, Sven

unread,
Feb 1, 2024, 11:35:58 AM2/1/24
to ami...@ilbers.de, isar-...@googlegroups.com, Kiszka, Jan, i...@ilbers.de
On Wed, 2024-01-31 at 16:50 +0100, Jan Kiszka wrote:
>
> We are on sbuild Isar in meta-iot2050 (currently
> 30471bb3f787fb0aa822d15e141ecce2f3b99860), and there the recipe
> builds.
> Already compared that?
>
> Jan
>

Hi Jan,

that's weired. the iot2025 does not have that issue and both recipes
are identical, therefor I wrote both of them ^^

No clue right know where the difference is. Three big ??? right now
over my head

Sven

Schultschik, Sven

unread,
Sep 19, 2024, 12:26:59 PM9/19/24
to ami...@ilbers.de, isar-...@googlegroups.com, Kiszka, Jan, i...@ilbers.de, Noack, Florian
Hi Jan,

we are back on that topic with GCC5 within ISAR instead of GCC49.

We are now at the point that the file

./edk2/BaseTools/Bin/GccLto/liblto-aarch64.a

is available in the repository, but seems to get deleted before going
into dh_auto_build

| find -iname *to-aarch64*
| ./edk2/BaseTools/Bin/GccLto/liblto-aarch64.s

So between prepare build and doing the build the .a files seems to get
deleted. But we couldn't yet find where.

The files is available in the recepie git folder.

Sven

On Thu, 2024-02-01 at 16:35 +0000, 'Schultschik, Sven' via isar-users
wrote:

Baurzhan Ismagulov

unread,
Sep 19, 2024, 2:23:52 PM9/19/24
to isar-...@googlegroups.com, Anton Mikanovich, Kiszka, Jan, Noack, Florian, Uladzimir Bely, Schultschik, Sven
Hello Sven,

On 2024-09-19 16:26, Schultschik, Sven wrote:
> We are now at the point that the file
>
> ./edk2/BaseTools/Bin/GccLto/liblto-aarch64.a
>
> is available in the repository, but seems to get deleted before going
> into dh_auto_build
...
> So between prepare build and doing the build the .a files seems to get
> deleted. But we couldn't yet find where.

Possibly related in any way to 30471bb3 Allow disabling source packages
cleanup?

https://groups.google.com/g/isar-users/c/sbrBaLKTncM/m/VG0xeCvcBQAJ

With kind regards,
Baurzhan

Uladzimir Bely

unread,
Sep 20, 2024, 4:46:08 AM9/20/24
to Schultschik, Sven, isar-...@googlegroups.com
On Thu, 2024-09-19 at 16:26 +0000, 'Schultschik, Sven' via isar-users
wrote:
> Hi Jan,
>
> we are back on that topic with GCC5 within ISAR instead of GCC49.
>
> We are now at the point that the file
>
> ./edk2/BaseTools/Bin/GccLto/liblto-aarch64.a
>
> is available in the repository, but seems to get deleted before going
> into dh_auto_build
>
> > find -iname *to-aarch64*
> > ./edk2/BaseTools/Bin/GccLto/liblto-aarch64.s
>
> So between prepare build and doing the build the .a files seems to
> get
> deleted. But we couldn't yet find where.
>
> The files is available in the recepie git folder.
>
> Sven
>

Hello Sven.

I remember something similar (e.g., removing original binaries) on a
different project. Newer debhelper was removing any binaries in source
code that had different from target's architecture.

AFAIR, overriding dh_strip (or some different step... dh_shlibdeps?
dh_fixperms?) helped.

```
override_dh_strip:
@echo Skipping $@
```

BTW, the recipe you attached few messages above, builds well with
recent isar/next (arm64 cross/compile).


> On Thu, 2024-02-01 at 16:35 +0000, 'Schultschik, Sven' via isar-users
> wrote:
> > On Wed, 2024-01-31 at 16:50 +0100, Jan Kiszka wrote:
> > >
> > > We are on sbuild Isar in meta-iot2050 (currently
> > > 30471bb3f787fb0aa822d15e141ecce2f3b99860), and there the recipe
> > > builds.
> > > Already compared that?
> > >
> > > Jan
> > >
> >
> > Hi Jan,
> >
> > that's weired. the iot2025 does not have that issue and both
> > recipes
> > are identical, therefor I wrote both of them ^^
> >
> > No clue right know where the difference is. Three big ??? right now
> > over my head
> >
> > Sven
> >
>

--
Best regards,
Uladzimir.

Schultschik, Sven

unread,
Sep 20, 2024, 5:23:49 AM9/20/24
to isar-...@googlegroups.com, i...@radix50.net, ami...@ilbers.de, ub...@ilbers.de, Kiszka, Jan, Noack, Florian
Hi Baurzhan,

thank you for the hint, that was the missing piece.

DPKG_SOURCE_EXTRA_ARGS = "-I!*.a"

Now we have edk2-stable202408 with GCC5 in ISAR running :)

br
Sven

On Thu, 2024-09-19 at 20:23 +0200, Baurzhan Ismagulov wrote:
> Hello Sven,
>
> On 2024-09-19 16:26, Schultschik, Sven wrote:
> > We are now at the point that the file
> >
> > ./edk2/BaseTools/Bin/GccLto/liblto-aarch64.a
> >
> > is available in the repository, but seems to get deleted before
> > going
> > into dh_auto_build
> ...
> > So between prepare build and doing the build the .a files seems to
> > get
> > deleted. But we couldn't yet find where.
>
> Possibly related in any way to 30471bb3 Allow disabling source
> packages
> cleanup?
>
> With kind regards,
> Baurzhan
>

Reply all
Reply to author
Forward
0 new messages