public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] CLANGDWARF OVMF hangs on start
@ 2023-12-07  8:40 Mike Beaton
  2023-12-07  9:31 ` Gerd Hoffmann
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Beaton @ 2023-12-07  8:40 UTC (permalink / raw)
  To: devel
  Cc: Gerd Hoffmann, Ard Biesheuvel, Liming Gao, Rebecca Cran,
	Michael D Kinney

From commit https://github.com/tianocore/edk2/commit/140e4422b16482f0bcafdc20d42141434d450450
(and see also the preceding commit, which I believe is related) up to
the current tip of master, CLANGDWARF OVMF is broken. It builds and
starts but hangs early (more info below). I do not currently have a
patch to offer though of course it would be useful if this could be
resolved.

Note: I've cc'd those folks who have more or less recently (this year)
authored or reviewed commits which have modified CLANGDWARF OVMF build
behaviour in various interesting ways, including the above, as
described below.

### More detail:

Using the following commands

```
cd OvmfPkg
./build.sh -a X64 -b NOOPT -t CLANGDWARF -D DEBUG_ON_SERIAL_PORT=1
./build.sh -a X64 -b NOOPT -t CLANGDWARF qemu -serial stdio
```

from the mentioned commit up to the current tip of master CLANGDWARF
OVMF builds, but when started it hangs, repeatedly outputting the line
`SecCoreStartupWithStack(0xFFFCC000, 0x820000)`.

Prior to that commit, CLANGDWARF OVMF builds and starts normally
(though see the following).

As additional possibly helpful information, it may be worth noting
that if we go back further we reach
https://github.com/tianocore/edk2/commit/c6f47e678f994ac86d36955d24baae465330d356
which is the earliest commit with correct behaviour. In the commit
before that CLANGDWARF OVMF builds but when run stops with an ASSERT,
and in the commit before that again, CLANGDWARF OVMF does not build,
giving:

```
In file included from
/home/mjsbeaton/OpenSource/edk2/CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/a_sign.c:22:
...
In file included from /usr/include/stdint.h:34:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: error: typedef
redefinition with different types ('__int64_t' (aka 'long') vs 'INT64'
(aka 'long long'))
typedef __int64_t int64_t;
                  ^
/home/mjsbeaton/OpenSource/edk2/CryptoPkg/Library/OpensslLib/openssl/include/openssl/e_os2.h:238:15:
note: previous definition is here
typedef INT64 int64_t;
              ^
...
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:27:20: error:
typedef redefinition with different types ('__uint64_t' (aka 'unsigned
long') vs 'UINT64' (aka 'unsigned long long'))
typedef __uint64_t uint64_t;
                   ^
/home/mjsbeaton/OpenSource/edk2/CryptoPkg/Library/OpensslLib/openssl/include/openssl/e_os2.h:239:16:
note: previous definition is here
typedef UINT64 uint64_t;
               ^
...
2 errors generated.
```

That failure to build persists back in the commit history for some
time. I didn't find a commit further back than that where CLANGDWARF
OVMF builds and runs correctly with current tools, though the exact
build failure changes at different points in the commit history, and I
haven't bisected everything which happens. (Note: when doing the above
bisects, it seems helpful/necessary to rebuild base tools, plus of
course `git submodule update --init`, at each step to get reliable
results.)

Mike


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112168): https://edk2.groups.io/g/devel/message/112168
Mute This Topic: https://groups.io/mt/103030855/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-09 16:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07  8:40 [edk2-devel] CLANGDWARF OVMF hangs on start Mike Beaton
2023-12-07  9:31 ` Gerd Hoffmann
2023-12-07 11:50   ` Mike Beaton
2023-12-07 12:53     ` Mike Beaton
2023-12-07 13:05       ` Mike Beaton
2023-12-09 15:24         ` Mike Beaton
2023-12-09 16:10           ` Mike Beaton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox