我正在尝试在我的cygwin(最后一个可用版本)设置上安装此python package,使用gcc并且根本没有windows / microsoft组件。该软件包有很多依赖项,因此您可能需要一段时间才能尝试安装它。我想错误是通用的,您不需要复制该问题以提供有关如何修复它的见解。
我在包装上找到了几个(所有?)。la库的错误:
Making all in centrality
make[4]: Entering directory '/cygdrive/d/gdrive/Thesis/tech/urv tech/graph-tool-2.2.31/src/graph/centrality'
CXX graph_betweenness.lo
CXX graph_centrality_bind.lo
CXX graph_closeness.lo
CXX graph_eigentrust.lo
CXX graph_eigenvector.lo
CXX graph_hits.lo
CXX graph_katz.lo
CXX graph_pagerank.lo
CXX graph_trust_transitivity.lo
CXXLD libgraph_tool_centrality.la
/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE targets, did you mean --export-all-symbols?
.libs/graph_betweenness.o:graph_betweenness.cc:(.text+0x182b): undefined reference to `graph_tool::GraphInterface::GetNumberOfVertices()'
.libs/graph_betweenness.o:graph_betweenness.cc:(.text+0x19bd): undefined reference to `graph_tool::GraphInterface::GetNumberOfVertices()'
.libs/graph_betweenness.o:graph_betweenness.cc:(.text+0x1a68): undefined reference to `graph_tool::ValueException::ValueException(std::string const&)'
.libs/graph_betweenness.o:graph_betweenness.cc:(.text+0x1a87): undefined reference to `graph_tool::ValueException::~ValueException()'
.libs/graph_betweenness.o:graph_betweenness.cc:(.text+0x1ad1): undefined reference to `graph_tool::ValueException::ValueException(std::string const&)'
/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: .libs/graph_betweenness.o: bad reloc address 0x6 in section `.text$_ZN5boost16exception_detail10clone_baseD1Ev[__ZN5boost16exception_detail10clone_baseD1Ev]'
collect2: error: ld returned 1 exit status
Makefile:474: recipe for target 'libgraph_tool_centrality.la' failed
正如我所看到的.lo文件是构建的,可能不正确,当生成.la文件时,我得到'错误的重定位地址'错误。换句话说,我的假设是因为.lo文件没有正确生成,所以.la构建失败。
进行一些研究我发现这个错误报告并在2009年得到修复:
https://www.mail-archive.com/bug-binutils@gnu.org/msg07150.html
基于它,我理解尝试解决问题的方法是用python库用来安装自身的配置文件中的-export-all-symbols替换-export-dynamic标志。我修改了两个文件:configure
和[configure.ac][2]
配置具有与其他设置相关的这种导出动态提及:
export_dynamic_flag_spec_CXX = '$ {WL} - 出口动态'
Configure.ac只有这个:
[MOD_LDFLAGS =“ - module -avoid-version -export-dynamic -no-undefined -Wl,-E -Wl, - as-needed”]
我认为是关键因素,因为它引用了LD标志。
但是,如果我这样做,该项目似乎打破了我接收消息,说构建中使用的文件具有错误版本的libtool。
make[4]: Entering directory '/cygdrive/d/gdrive/Thesis/tech/urv tech/graph-tool-2.2.31/src/graph/centrality'
CXX graph_betweenness.lo
libtool: Version mismatch error. This is libtool 2.4.2, but the
libtool: definition of this LT_INIT comes from libtool 2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
libtool: and run autoconf again.
Makefile:507: recipe for target 'graph_betweenness.lo' failed
在aclocal.m4中也有提及,如果我尝试更改导致与构建文件版本相关的其他问题。
此外,在ltmain.sh
中,如果已使用标记export-dynamic生成了某些库,则会对其进行验证。
所以,这里有几点:
.la和模块试图生成的.lo库有什么区别?
我认为问题与静态和动态链接的差异有关,但实际上并不知道如何修复它。是否涉及其他设置?
一般情况下,有什么提示要尝试?