顯示具有 GNU 標籤的文章。 顯示所有文章
顯示具有 GNU 標籤的文章。 顯示所有文章

2020年9月9日 星期三

[Tool] using gnu-sed on Mac OSX

  • 問題: 
    • Mac OS 上的 sed 為 BSD sed, 與 Linux上的 gnu sed 差異非常大, 像是不支援 -i, -e 等, 相當煩人
  • 解決方法:
    • 方法一: 用 brew 安裝 gnu-sed, 並將 PATH 環境變數優先指到 gnu-sed$ brew install gnu-sed
    • $ vim ~/.bash_profile
        PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
      $ source ~/.bash_profile
    • 方法二: build from source, 並將 PATH 環境變數優先指到 gnu-sed

2017年11月29日 星期三

[Development] using GNU development tools

  • SOP
    • configure
    • make
    • make install

Configure

Build

  • universal binary: 
    • build flag: e.g.
      --arch ppc --arch i386

Install




  • Reference:

  • 2017年6月16日 星期五

    [License] GPL v.s. LGPL & GPL in Linux


    • 簡單比較
      • GPL:
        • 保護 application
        • 較嚴苛
        • release binary時, 需要 release source code
        • 僅為執行(非修改)此 binary使用, 不用 release source code
      • LGPL:
        • 保護 library
        • 較寬鬆
        • dynamically or statically link則無限制
    • 在 kernel 上所執行的使用者應用程式都不受 GPL制約