从源代码编译

从源代码编译

我正在尝试遵循下面提到的两个步骤:

1)下载源代码

https://sourceforge.net/projects/hunspell/files/Hyphen/2.8/hyphen-2.8.8.tar.gz/download

2)编译它,您将获得名为示例的二进制文件:

hyphen-2.8.8$ ./example ~/dev/smc/hyphenation/hi_IN/hyph_hi_IN.dic ~/hi_sample.text

我已经下载并解压了 tar 文件。我的问题是如何编译它?

我收到此错误:

[root@ip-172-31-12-85 hyphen-2.8.8]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/santosh/hyphen-2.8.8':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

我能够解决上述错误。但在下一步中我又遇到了另一个错误:

# make

mv -f .deps/example.Tpo .deps/example.Po
/bin/bash ./libtool --tag=CC   --mode=link gcc  -g -O2   -o example example.o libhyphen.la
libtool: link: gcc -g -O2 -o .libs/example example.o  ./.libs/libhyphen.so
cp -f ./hyphen.tex hyphen.us
patch < ./hyphen.patch
patching file hyphen.us
./tbhyphext.sh <./tbhyphext.tex >hyphen.us2
cat hyphen.us hyphen.us2 | mawk -f ./lig.awk >hyphen.us3
mawk: ./lig.awk: line 44: function gensub never defined
mawk: ./lig.awk: line 44: function gensub never defined
mawk: ./lig.awk: line 44: function gensub never defined
mawk: ./lig.awk: line 44: function gensub never defined
mawk: ./lig.awk: line 44: function gensub never defined
Makefile:968: recipe for target 'hyphen.us3' failed
make[1]: *** [hyphen.us3] Error 2
make[1]: Leaving directory '/tmp/santosh/hyphen-2.8.8'
Makefile:510: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

答案1

“make all-recursive”然后“make install”应该可以解决问题。

相关内容