atos-tools / qemu

QEMU with instrumentation support, ref to tcg/plugins/README
https://guillon.github.io/qemu-plugins
Other
5 stars 8 forks source link

Stable 7.2.plugins fix build for arch linux #21

Closed ValouBambou closed 5 months ago

ValouBambou commented 5 months ago

I ran into some issues while trying to build in the context of another application.

  1. One C++ compile error in the submodule libelfin/libelfin with one read only object that where assigned in a const context that get fixed by updating the commit of libelfin with the latest commit on their master branch.
  2. One C compile error within qemu and the linux-user/syscall.c file which redefine the file_clone_range because of an incompatibility between glibc and linux, this has been fixed in latter version of the glibc according to this post so we can remove the workaround.
  3. Rename a deprecated keymap to be compatible with newer xkbcommon that now expect only the ara instead of ar arabic keymap.

The compile commands that I used to replicate the build system behavior of the original app I was trying to build initially are :

mkdir build
cd build
../configure --disable-system --disable-tools --disable-plugins --enable-debug-info --enable-debug-tcg --enable-tcg-plugin --enable-tcg-plugin-cpp --target-list=x86_64-linux-user --disable-strip --disable-virglrenderer --disable-docs
ninja

My kernel is 6.9.3 and the distro is arch linux if it can help to replicate the issues.

ValouBambou commented 5 months ago

This should also fix #19 (I missed one modification of the build system to avoid generating the symbol checked in the ifdef, but I can include it to the previous commit).

guillon commented 5 months ago

Thanks for the report.

I cherry-picked the corresponding qemu upstream patches for the problems 2 (glibc) et 3 (keymap).

Can you keep only the libelfin update and try it on to of the new stable-7.2.plugins branch?

If it works for you, update the pull request pleas ans I will merge.

ValouBambou commented 5 months ago

I tested and it works now !