首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >需要帮助升级xml-安全性-c-2.0.2获得致命错误

需要帮助升级xml-安全性-c-2.0.2获得致命错误
EN

Stack Overflow用户
提问于 2021-06-15 21:02:21
回答 1查看 180关注 0票数 1

我正在尝试升级xml-security-c-2.0.2。我在linux环境中提取了tar文件。我在下面的./configure命令之前导出了以下xerces环境变量:

环境变量:

代码语言:javascript
复制
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后,将得到以下错误:

代码语言:javascript
复制
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。这是一个月左右的问题,我们无法弄清楚为什么它找不到那个源文件。当我在这个特定文件上运行一个find时,我会得到以下路径,显示它确实位于多个位置:

代码语言:javascript
复制
/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的bug,或者需要从1.x版本配置到2.x版本?

这都是为了升级shibboleth idp,并在Shibboleth构建之前安装所有所需的依赖项。

代码语言:javascript
复制
> 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,但是当我发出make命令时仍然会得到以下错误:

代码语言:javascript
复制
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

这是怎么回事?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-17 08:16:51

RHEL 7.2是2015年的最新情况。当前为7.8 (yum更新)。

XercesDefs.hpp:没有这样的文件

xml-security-c-2.0.2配置将在/usr/include, /usr/local/include中查看!当您有“隐藏”位置时,必须指定包含路径:请参阅$ ./configure --help

例子:CXXFLAGS=-I/opt/shibboleth-sp/include,I.e.→

代码语言:javascript
复制
$ ./configure --prefix=/opt/shibboleth-sp CXXFLAGS=-I/opt/shibboleth-sp/include

Bugs :在c-2.0.2中没有bug。编译时将在EL 7(3分钟,g++73 (或使用默认的g++版本)中没有错误。4.8 )。

我需要.tar.gz文件:请按照https://ftp.gwdg.de/pub/opensuse/repositories/home%3A/Scott_Cantor/CentOS_7/src/的链接

示例$ bash unPack_rpm.sh xml-security-c-2.0.2-4.2.src.rpm,您得到了xml-security-c-2.0.2-4.2.src/{xml-security-c-2.0.2.tar.bz2 , xml-security-c.spec}

脚本unPack_rpm.sh https://drive.google.com/file/d/1q3d9QqrRhEThYByPDgWEaoxHnqWFWqfE/view?usp=sharing

获取构建点:# yum-builddep xml-security-c.spec

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67993469

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档