【发布时间】:2021-08-31 17:31:40
【问题描述】:
我正在尝试升级xml-security-c-2.0.2。我在我的 linux 环境中提取了 tar 文件。我在./configure 命令之前导出了以下xerces 环境变量:
环境变量:
export xerces_LIBS=/opt/shibboleth-sp/lib
export xerces_CFLAGS=/opt/shibboleth-sp/include
configure command:
./configure --without-xalan --disable-static --prefix=/opt/shibboleth-sp
运行 make 后,我收到以下错误:
make[2]: Entering directory `/opt/build/xml-security-c-2.0.2/xsec'
g++ -DHAVE_CONFIG_H -I.. -I.. -DXSEC_BUILDING_TOOLS /opt/shibboleth-sp/include -Wall -O2 -DNDEBUG -pthread -MT tools/xtest/xsec_xtest-xtest.o -MD -MP -MF tools/xtest/.deps/xsec_xtest-xtest.Tpo -c -o tools/xtest/xsec_xtest-xtest.o `test -f 'tools/xtest/xtest.cpp' || echo './'`tools/xtest/xtest.cpp
In file included from tools/xtest/xtest.cpp:32:0:
**../xsec/framework/XSECDefs.hpp:63:39: fatal error: xercesc/util/XercesDefs.hpp: No such file or directory
#include <xercesc/util/XercesDefs.hpp>''**'
无论出于何种原因,它都找不到源文件XercesDefs.hpp。这个问题已经存在了一个月左右,我们无法弄清楚为什么它没有找到那个源文件。当我在这个特定文件上运行查找时,我得到以下路径,表明它确实位于多个位置:
/opt/build/xerces-c-3.2.3/src/xercesc/util/XercesDefs.hpp
/opt/shibboleth-sp/include/xercesc/util/XercesDefs.hpp
在编译过程中是否有什么东西导致它无法工作或无法拾取它?我应该导出其他内容以获取此文件吗?
我们目前在机器上安装了版本xml-security-c-1.7.3。使用这个版本会更容易吗? 2.0.2 是否存在某种错误,或者需要从 1.x 版本到 2.x 版本进行配置?
这一切都是为了升级 shibboleth idp,并在构建 Shibboleth 之前安装所有需要的依赖项。
> current OS version Linux version 4.14.214-118.339.amzn1.x86_64
> (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP
非常感谢任何帮助!
编辑:
我已导出我的 CXXFLAGS 以指向 include,但是当我发出 make 命令时仍然出现以下错误:
make all-recursive
make[1]: Entering directory `/opt/build/xml-security-c-2.0.2'
Making all in xsec
make[2]: Entering directory `/opt/build/xml-security-c-2.0.2/xsec'
/bin/sh ../libtool --tag=CXX --mode=link g++ /opt/shibboleth-sp/include -Wall /opt/shibboleth-sp/include -O2 -DNDEBUG -pthread -o xsec-xtest tools/xtest/xsec_xtest-xtest.o libxml-security-c.la /opt/shibboleth-sp/lib /opt/apache2_4_46/bin
libtool: link: g++ /opt/shibboleth-sp/include -Wall /opt/shibboleth-sp/include -O2 -DNDEBUG -pthread -o .libs/xsec-xtest tools/xtest/xsec_xtest-xtest.o /opt/shibboleth-sp/lib /opt/apache2_4_46/bin ./.libs/libxml-security-c.so -pthread -Wl,-rpath -Wl,/opt/shibboleth-sp/lib
/opt/shibboleth-sp/include: file not recognized: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [xsec-xtest] Error 1
make[2]: Leaving directory `/opt/build/xml-security-c-2.0.2/xsec'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/build/xml-security-c-2.0.2'
make: *** [all] Error 2
这是怎么回事?
【问题讨论】:
-
xml-security-c-2.0.2等:“Scott_Cantor.repo”ftp.gwdg.de/pub/opensuse/repositories/home%3A/Scott_Cantor/… ..... → → ftp.gwdg.de/pub/opensuse/repositories/home%3A/Scott_Cantor/… .... repo 文件 ftp.gwdg.de/pub/opensuse/repositories/home%3A/Scott_Cantor/… -
我需要 .tar.gz 文件。不过感谢您的回复。
标签: c++ linux xml redhat xerces