2017-07-28 138 views
1

我試圖在沒有root訪問權限的CentOS 7系統上安裝Perl 5.26.0。我在另一個CentOS 6系統上安裝了該版本的Perl,沒有任何問題。下面是我執行configure命令:安裝Perl 5.26.0期間的錯誤(generate_uudmap.o)

./Configure -des -Dusethreads -Dprefix=$INSTALL_PATH/$SOFTWARE-$VERSION 

這裏是我得到的錯誤:

gcc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings generate_uudmap.c 
In file included from /path/to/include/string.h:635:0, 
       from generate_uudmap.c:10: 
/path/to/include/bits/string3.h:129:1: error: C++ style comments are not allowed in ISO C90 
// XXX We have no corresponding builtin yet. 
^ 
/path/to/include/bits/string3.h:129:1: error: (this will be reported only once per input file) 
make: *** [Makefile:250: generate_uudmap.o] Error 1 
+0

*「的錯誤:C++風格的註釋並不在ISO C90允許」 *:嘗試刪除' -std = c89'選項(或使用'-std = c99'代替)。見[控制C語言的gcc選項](https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html)和[爲什麼我不能在我的C代碼中使用// - 樣式的註釋?] (https://stackoverflow.com/q/2223541/2173773) –

+1

您可以通過將'-A'開關傳遞給'Configure'來嘗試更改C編譯器開關。例如:'的./configure -des -Accflags = -std = C99 [...]' –

+0

然而,當我添加'-Accflags = -std = c99',它生成以下命令:'的GCC -c - DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS = 64 -D_FORTIFY_SOURCE = 2 -std = c99 -std = c89 -O2 -Wall -Werror = declaration-after-語句-Wextra -WC++ - compat -Wwrite-strings generate_uudmap.c' 所以基本上'-std = c99'和'-std = c89'並生成相同的錯誤消息。 –

回答

0

好現在的工作! :d。通過配置拋出的錯誤後,我走進了sflags文件和註釋行#13:stdflags=" -std=c89"我又跑make然後make install