I figured it out.
flag LD_DEBUG appeared to be very useful
LD_DEBUG=libs ./AntiMicroX-x86_64_8.AppImage
According to logs:
43623: find library=libSDL2-2.0.so.0 [0]; searching
43623: search path=/opt/ros/noetic/lib:/opt/ros/noetic/lib/x86_64-linux-gnu (LD_LIBRARY_PATH)
43623: trying file=/opt/ros/noetic/lib/libSDL2-2.0.so.0
43623: trying file=/opt/ros/noetic/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
43623: search path=/tmp/.mount_AntiMiUylmvM/usr/bin/../lib (RUNPATH from file /tmp/.mount_AntiMiUylmvM/AppRun.wrapped)
43623: trying file=/tmp/.mount_AntiMiUylmvM/usr/bin/../lib/libSDL2-2.0.so.0
It appeared that I marked wrong library, but even packing it with
--library=/usr/local/lib/libSDL2-2.0.so.0
did not help, because AppImage creator also packaged old library from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
and used it.
I had to just manually replace old lib in system
sudo cp /usr/local/lib/libSDL2-2.0.so.0 /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
Now everything is packed properly, but I don’t like this solution.
I think --library
should somehow manage this.