Compile git for 32-bit linux on shared hosting

前端 未结 3 437
梦谈多话
梦谈多话 2021-01-18 03:25

I need to set up the Git client on a cheap shared hosting, with a no-name 32-bit Linux distribution. GCC isn\'t available so I can\'t compile it on the server. I do have at

相关标签:
3条回答
  • 2021-01-18 03:40

    OS X isn't going to work - its geared to produce Mach-O binaries with the OS X syscall interface, not Linux ELF binaries.

    Using -m32 on the CLFAGS is going to help, but most importantly, use -static as well. Static binaries are much more portable.

    If that fails, please provide exactly how it failed.

    0 讨论(0)
  • 2021-01-18 03:43

    Your best bet is trying to compile git as a static binary. Your binary probably have different shared libraries versions (or even, not all dependencies installed).

    This link:

    How to build git for a host with no compiler

    Provides information on how to build git as a static binary.

    This stackoverflow answer provides information on how to cross compile it from a 64 bit host.

    Hope this helps.

    0 讨论(0)
  • 2021-01-18 03:59

    Honestly, if it were me, I would just fire up 32-bit Linux in a VM and compile there.

    0 讨论(0)
提交回复
热议问题