Skip to content

Conversation

@MarkMankins
Copy link
Collaborator

I managed to get PANDA built under Ubuntu 24, including an update to LLVM 14.
This isn't production ready quite yet, but it's a start.
I don't have the bandwidth to get this all the way to Ubuntu 24, but hoping with this initial work others can chip away at the problems that are left.
There are a lot of little issues that are nicely segregated, that would take me a while to research and fix all of them. I suspect many of these have an easy solution, so I'm looking for help to move this along.

I'm not convinced yet the update to LLVM 14 is 100% correct - but I have a lots of test cases and most agree with the output from LLVM 11. I have a few tests that are tightly coupled to the IR that gets generated, these will require some time to investigate whether or not the output I'm seeing in LLVM 14 is correct. Luckily I know where the author of these tests works (@LauraLMann) so I know where to look for help.

I didn't even try to fire up PyPANDA - so I'm not sure what state it is in.

Known issues:

  • When LLVM is enabled many warnings about unsupported intrinsics appear on the console.
  • The libosi build takes a long time.
  • LLVM 14 uses significantly more memory mapped regions than LLVM 11.
    -- "wc -l /proc/<panda pid>/maps" to see what I mean.
    -- Long running recordings with LLVM enabled may fail with out of memory errors.
    -- You can increase the number of permitted memory mapped regions for a process by writing to /proc/sys/vm/max_map_count. Doing this resolves the issue.
  • configure must be run with --disable-werror.
  • When installing required Ubuntu packages:
    -- The Ubuntu 20 qemu package was renamed to qemu-system in Ubuntu 24.
    -- I also installed llvm-14, llvm-14-doc, clang-14 & clang-tools-14. (Not sure the clang packages are necessary - things might be building with clang-18 which was already installed in my Ubuntu 24 environment.)
  • cmake is complaining loudly - but no fatal issues.
  • There are warnings when compiling PANDA.
    -- Many of these are about invalid escape sequences - at first glance it looks like these might be coming from python.
  • Network plugin won't build.
    -- Wireshark api changed, again.

@be32826 be32826 marked this pull request as draft October 3, 2024 19:23
@AndrewQuijano
Copy link
Collaborator

Hello @MarkMankins, I wanted to ask how are things going with the LLVM-14 upgrade? I can try to help on my end trying to figure out how to enable testing from external PRs

@MarkMankins
Copy link
Collaborator Author

Unfortunately I've had to set aside my panda work for the short term so I haven't been able to make any progress here. Not sure when I'll be able to get back to it.

@AndrewQuijano
Copy link
Collaborator

I see, @LauraLMann, would you have any time to help with the upgrade?

With regard to libosi, I made a Ubuntu 24 Debian image, pending PR, hopefully this saves 40 minutes, really surprised it is this slow to compile...
panda-re/libosi#17

Also about wireshark, seems like someone else got the fix
#1569

@LauraLMann
Copy link
Collaborator

I see, @LauraLMann, would you have any time to help with the upgrade?

With regard to libosi, I made a Ubuntu 24 Debian image, pending PR, hopefully this saves 40 minutes, really surprised it is this slow to compile... panda-re/libosi#17

Also about wireshark, seems like someone else got the fix #1569

Nope, I'm in the same boat as my coworker Mark Mankins. Hopefully this summer we can return.

@LauraLMann
Copy link
Collaborator

So the problem with "When LLVM is enabled many warnings about unsupported intrinsics appear on the console." is that the taint2 plugin does not have propagation rules for certain LLVM intrinsic functions, and so it spits out this warning to the console when it encounters one to say "we aren't even going to try to propagate taint for that function".
So far I've run into 11 such functions, 3 of which it appears to me existed back in LLVM 11 days - apparently the translation has changed since then so now they show up in one of our tests where they didn't show up before. The other intrinsics it's complaining about are new. Some of them (like llvm.abs.*) it should be easy to write propagation rules for. The others will require more effort.
Regardless, this won't cause PANDA to roll over and die, or even do crazy things. It's just another taint deficiency. Hopefully I will have time to take care of these after more important issues are dealt with.

@LauraLMann
Copy link
Collaborator

The reason why "configure must be run with --disable-werror" is that two functions the configure script is checking out, clock_adjtime and clock_gettime, have different definitions now. Each has an annotation stating that the second argument must not be null, so the compiler will issue a warning if it is. The little test programs the configure script uses to see if these functions are available was using 0 for the second argument. That's easy enough to adjust, and I'll include it in an update to this pull request.

@LauraLMann
Copy link
Collaborator

The libosi build goes a lot faster in the Ubuntu 24 container I am using if I tell it to build with g/g++-9 instead of the newer compiler that is the default in the container. It only takes about 2 or 3 minutes as opposed to the 40-45 it takes with the default compiler.

@LauraLMann
Copy link
Collaborator

Per coordination with @MarkMankins , this pull request is being closed in favor of #1584.

@LauraLMann LauraLMann closed this Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants