0

I'm building git from source from a debian 10 vm that has /lib/ld-linux-aarch64.so.1, which ends up linked in the git binary after a basic NO_TCLTK=true make prefix=$(pwd)/2.41.0/arm make all and ~ install from the repository. I intend to run it from the host, but it throws "no such file or directory" error, without telling which file it is referring to exactly, but since ldd $(pwd)/2.41.0/arm/bin/git lists only five dependencies:

~$ ldd shuttle/git/2.41.0/arm32/bin/git linux-vdso.so.1 (0x0000007560d80000) libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007560972000) libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007560941000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x00000075607cd000) /lib/ld-linux-aarch64.so.1 (0x0000007560d50000) 

i can tell that it's probably that "/lib/ld-linux-aarch64.so.1", because the host system has only a "/lib/ld-linux-armhf.so.3" in its place. "linux-vdso.so.1" is also not located with "whereis", but from that output it looks like it's somehow internal, because it's not found from inside the vm either. So by way of elimination it's got to be that file in /lib. For more context, the vm is Crostini and the host system is Chrome OS. Thanks!

19
  • you not only need to link differently, you also need to compile differently – the way these two architectures handle floating point, and ABI, is different. So, you need to do do a full cross-compilation. Commented Aug 7, 2023 at 11:38
  • @MarcusMüller i mean i'm not linking explicitly, it's these 2 make commands that git's INSTALL file instructs. So i'm looking for pointers on how to adjust the compilation or "configure" it in advance. Commented Aug 7, 2023 at 12:08
  • okay after copying the ld-linux-aarch64.so.1 over to the host system for test, the next error i get is "error while loading shared libraries: libz.so.1: wrong ELF class: ELFCLASS32" - so it's indeed not just a matter of linking that /lib file, but compiling with "elf32hf" somehow. is that more than just a set of compilation flags? Commented Aug 7, 2023 at 13:25
  • 1
    Well, it seems you did not understand what I commented. You need to cross-compile, i.e. you need to use a compiler that targets the armhf platform. So, you need to figure out how to tell the build system of what you're building (git here) to use a different compiler, and of course you need to start with having that compiler. Yes, that's simply a different compiler, and not just some flags. The fact that both platforms have something to do with "arm" doesn't mean they are the same. Commented Aug 7, 2023 at 13:26
  • 1
    not flags to make, as said, you need to convince your build system to use a different compiler, so that's flags to ./configure :) The make call doesn't usually take any flags. Commented Aug 7, 2023 at 13:38

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.