Cannot build SDL2 for aarch64

Hello,

I have a project in C language which uses SDL2 as a shared library. The thing is that my project involves compiling my program in a remote GPU (using the ssh command). While my program compiles well in my system, it does not in the remote GPU since it does not find the .so compatible. This is because the SDL2 was built in my system, which has a x86_64 architecture, while the GPU has a aarch64 system.

I have tried the following, but none of them have worked:

  • I tried to build the SDL2 library in the GPU to generate a .so made for aarch64, but it failed due to missing libraries (libxext-dev specifically). The issue is that I cannot install anything to that system since I do not have the credentials (the GPU pertains to an external organization)

  • I built the library in my system with gcc-aarch64-linux-gnu cross-compilation and added the flag --host=aarch64-linux-gnu in the configure command, but the following errors appeared (these libraries are missing only in the gcc-cross directories):

/usr/lib/gcc-cross/aarch64-linux-gnu/11/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lpulse: No such file or directory
/usr/lib/gcc-cross/aarch64-linux-gnu/11/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lsndio: No such file or directory
/usr/lib/gcc-cross/aarch64-linux-gnu/11/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -ldrm: No such file or directory

I have ran out of ideas. Any suggestions? (Sorry for my english)