Linux系統編譯boa-0.94-13出錯資訊問題

來源:互聯網
上載者:User

編譯一個linux下的c系統,包含詞法和文法分析模組,Linux上用bison和flex。
  yacc是一個文法分析器的產生器,bison即是yacc的GNU版本.Lex和YACC是用於構造詞法分析機和文法解譯器的工具,利用Lex和YACC你可以輕鬆的構造一個文法解譯器。
  一開始make
  錯誤1:
  debian:/home/a/boa-0.94.13/src# make
  yacc -d boa_grammar.y
  make: yacc: Command not found
  make: *** [y.tab.c] Error 127
  解決方案:
  debian:/home/a/boa-0.94.13/src# apt-get install bison
  錯誤2:
  debian:/home/a/boa-0.94.13/src# make
  lex boa_lexer.l
  make: lex: Command not found
  make: *** [lex.yy.c] Error 127
  解決方案:
  debian:/home/a/boa-0.94.13/src# apt-get install flex
  錯誤3:
  debian:/home/a/sss/boa-0.94.13/src# make
  gcc -g -O2 -pipe -Wall -I. -c -o util.o util.c
  util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing token
  make: *** [util.o] Error 1
  解決方案:
  修改 src/compat.h
  找到
  #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff
  修改成
  #define TIMEZONE_OFFSET(foo) (foo)->tm_gmtoff
  然後
  在boa下的src目錄下執行 make clean
  再在該目錄下執行 make
  出現:
  如果 make後
  make: Nothing to be done for `all'.
  說明make沒有檢查到需要編譯的東西,庫或者應用程式已經編譯好了。
  make主要檢查的是時間戳記,只要target比依賴的檔案時間靠後它就認為不需要編譯。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.