需要帮助升级 xml-security-c-2.0.2 出现致命错误

问题描述

我正在尝试升级 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。这已经是一个月左右的问题了,我们无法弄清楚为什么它找不到那个源文件。当我在这个特定文件上运行 find 时,我得到以下路径,显示它确实在多个位置:

/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

这是怎么回事?

解决方法

RHEL 7.2 是 2015 年的更新。当前是 7.8(yum 更新)。

XercesDefs.hpp:没有那个文件

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

例如: CXXFLAGS=-I/opt/shibboleth-sp/include ,即→

$ ./configure --prefix=/opt/shibboleth-sp CXXFLAGS=-I/opt/shibboleth-sp/include

错误: xml-security-c-2.0.2 中没有错误。将在 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

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...