5. abcsh

abcsh是一個使用字母標註音符的軟件,軟件的功能如下所示:

假如一個樂譜字符版是這樣的,

X:1
T:Speed the Plough
M:4/4
C:Trad.
K:G
|:GABc dedB|dedB dedB|c2ec B2dB|c2A2 A2BA|
  GABc dedB|dedB dedB|c2ec B2dB|A2F2 G4:|
|:g2gf gdBd|g2f2 e2d2|c2ec B2dB|c2A2 A2df|
  g2gf g2Bd|g2f2 e2d2|c2ec B2dB|A2F2 G4:|

abcsh處理之後就變成了這樣,

staff notation for Speed the Plough

好!開始編譯abcsh的源碼(祈禱能順利完成~_~!)

系統環境是剛剛安裝完的Ubuntu14.04-i386版本,還沒有裝其他軟件。

首先安裝cvs軟件來獲取abcsh的源碼:sudo apt-get install cvs

接着獲取abcsh的源碼:cvs -d:pserver:[email protected]:/sources/abcsh co abcsh

進入abcsh目錄:cd abcsh,直接運行configure文件:./configure,但是遇到了下面的輸出:
hjq@hjq-tmp-ubuntu32:~/abcsh$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
configure: error: cannot run /bin/bash ./config.sub

查了一下資料,發現需要先運行:autoreconf --install
hjq@hjq-tmp-ubuntu32:~/abcsh$ autoreconf --install 
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
acinclude.m4:9: warning: underquoted definition of jm_CHECK_TYPE_STRUCT_UTIMBUF
acinclude.m4:9:   run info Automake 'Extending aclocal'
acinclude.m4:9:   or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:5: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.in:5: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.in:19: installing './compile'
configure.in:15: installing './config.guess'
configure.in:15: installing './config.sub'
Makefile.am: installing './depcomp'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
Makefile.am:14: warning: suffix '.texinfo' for Texinfo files is discouraged; use '.texi' instead

再重新執行./configure,最後幾行的輸出,代表成功生成了Makefile文件:
configure: creating ./config.status
config.status: creating Makefile
config.status: creating abcsh.lsm
config.status: creating abcsh.spec
config.status: creating config.h
config.status: executing depfiles commands

緊接着make一下:
hjq@hjq-tmp-ubuntu32:~/abcsh$ make
make  all-am
make[1]: Entering directory `/home/hjq/abcsh'
restore=: && backupdir=".am$$" && \
	am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
	rm -rf $backupdir && mkdir $backupdir && \
	if (makeinfo --version) >/dev/null 2>&1; then \
	  for f in abcsh.info abcsh.info-[0-9] abcsh.info-[0-9][0-9] abcsh.i[0-9] abcsh.i[0-9][0-9]; do \
	    if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
	  done; \
	else :; fi && \
	cd "$am__cwd"; \
	if makeinfo   -I . \
	 -o abcsh.info abcsh.texinfo; \
	then \
	  rc=0; \
	  CDPATH="${ZSH_VERSION+.}:" && cd .; \
	else \
	  rc=$?; \
	  CDPATH="${ZSH_VERSION+.}:" && cd . && \
	  $restore $backupdir/* `echo "./abcsh.info" | sed 's|[^/]*$||'`; \
	fi; \
	rm -rf $backupdir; exit $rc
/bin/bash: line 9: makeinfo: command not found
make[1]: *** [abcsh.info] Error 127
make[1]: Leaving directory `/home/hjq/abcsh'
make: *** [all] Error 2

沒有makeinfo,安裝texinfo,安裝完之後,發現另一個錯誤,需要將abcsh源碼中的abcsh.texinfo文件裏的"@Subtitle A shell for processing ABC music notation content" 修改爲"@subtitle A shell for processing ABC music notation content",大小寫問題!!!!!

接下來遇到了更多問題:abcsh.c文件內實現的getline和stdio.h裏的聲明衝突、guile庫文件依賴、又從源碼安裝了libgraph1.0.2、源碼安裝guile1.6,最後,陷在"ERROR: unknown doc attribute: (location (string . alist.c) (int . 58) (hash . hash) (int . 53) (string . alist.c))"這個錯誤裏面~~~~

又失敗了一個~_~!



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章