weixin_39973416
weixin_39973416
2021-01-08 06:39

Static compilation

It would be nice to have a static compilation under linux without cross compiling..

该提问来源于开源项目:tsl0922/ttyd

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39895995 weixin_39895995 4月前

    Take a look at scripts/cross-build.sh, and search for the static keyword.

    You won't want to build the static version with usual gcc, the static binary linked with glibc is huge.

    点赞 评论 复制链接分享
  • weixin_39895995 weixin_39895995 4月前

    BTW: you can get the static version of ttyd for every commit from the ci artifacts, for example:

    https://github.com/tsl0922/ttyd/actions/runs/54403251

    点赞 评论 复制链接分享
  • weixin_39895995 weixin_39895995 4月前

    https://github.com/tsl0922/ttyd/blob/master/.github/workflows/release.yml

    点赞 评论 复制链接分享
  • weixin_39973416 weixin_39973416 4月前

    yes.. I saw that already.. but it uses a huge script and docker image.. I just wish to know how to compile it statically from a normal x86 linux machine (ubuntu) with the usual gcc/make/configure etc

    点赞 评论 复制链接分享

相关推荐