-2

我在 Fedora 上编译开源 C++ 项目时遇到问题。当我下载并运行 ./configure 时,我最终得到了....

.
.
.
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
./configure: line 15513: AX_CFLAGS_WARN_ALL: command not found
./configure: line 15514: AX_CXXFLAGS_WARN_ALL: command not found
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison
./configure: line 15784: AX_PROG_GPERF: command not found
checking trace option enabled... no
checking for getrusage... yes
checking time profiling enabled... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking forcing use of select... no
checking use pipes to communication between scheduler and dispatcher... no
./configure: line 16280: syntax error near unexpected token `1.39.0'
./configure: line 16280: `AX_BOOST_BASE(1.39.0)'

当我在 Windows 中编译等效项目时,我确实需要安装和更新对 Boost 的项目引用。我可以看到这与 boost 有关,但不确定为什么会出现语法错误。

还有一些需要注意的事情,configure 和 configure.ac 中的原始源代码引用了具有相同编译错误的 boost 1.3.5(显然错误消息中包含 1.3.5)。

我最近安装了 boost 1.3.9 并更新了源代码。另请注意,当我尝试

 yum install boost

它报告我安装了 1.3.7,这是最新版本。我也在源代码中尝试了 1.3.7,但我遇到了同样的问题。我只是不明白为什么会出现语法错误!

这是 configure 和 configre.ac 中引发错误的代码

#BOOST
AX_BOOST_BASE(1.39.0)
AX_BOOST_THREAD

关于下一步去哪里的任何想法都会很棒。

TIA

G

4

2 回答 2

0

我认为您的“开源项目”需要比安装版本更高的 autoconf/aclocal 版本。

'AX_CFLAGS _WARN _ALL', ..., 'AX _BOOST _BASE' 都是 autoconf 宏,如果您有更新版本的 autoconf,它们将被正确扩展。

于 2009-07-01T02:30:20.153 回答
-1

我可以想到发生这种情况的几个原因。首先,“Boost”是一个非常流行的 C++ 编程框架。

  1. 该项目有一个错误(编译错误)
  2. 您没有正确安装依赖项
  3. 该项目与您的发行版不兼容。存储库上的包可能已经过时,所以它是Fedora 最新的,但不是真正最新的 Boost 包。如果是这种情况,Fedora 用户会更适合说。
  4. 您的一些依赖项已损坏
  5. 您没有正确按照说明进行操作
于 2009-06-29T23:06:23.190 回答