How to static link Linux software that uses ./configure?

后端 未结 2 348
礼貌的吻别
礼貌的吻别 2020-12-28 14:45

I would like to compile NRPE static, so I can copy the compiled binary to an OmniOS server, where I don\'t want gcc to be installed on. I would prefer to install NRPE with S

相关标签:
2条回答
  • 2020-12-28 15:25

    For people coming from google, I found that if you have libtool part of your build, you will need to:

    1. ./configure CFLAGS="-static" ....
    2. make LDFLAGS="-all-static"

    You can see that -all-static with libtool --help --mode=link

    0 讨论(0)
  • 2020-12-28 15:28

    Try this:

    ./configure LDFLAGS="-static"
    
    0 讨论(0)
提交回复
热议问题