【问题标题】:Need Help Upgrading xml-security-c-2.0.2 Getting Fatal Error需要帮助升级 xml-security-c-2.0.2 出现致命错误
【发布时间】: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

这是怎么回事?

【问题讨论】:

标签: c++ linux xml redhat xerces


【解决方案1】:

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

XercesDefs.hpp:没有这样的文件

xml-security-c-2.0.2 配置将查看 /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.shhttps://drive.google.com/file/d/1q3d9QqrRhEThYByPDgWEaoxHnqWFWqfE/view?usp=sharing

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

【讨论】:

  • 感谢您的回复!我按照你说的做了,虽然制作过程更进一步,但我仍然收到以下错误:/opt/shibboleth-sp/include:文件无法识别:是一个目录 collect2:错误:ld 返回 1 退出状态 make[2] : *** [xsec-xtest] 错误 1 ​​make[2]: 离开目录/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
  • 也感谢您提供的额外信息,我仍在学习 linux 的基本知识,所以非常感谢。
猜你喜欢
  • 2017-01-06
  • 1970-01-01
  • 2011-09-02
  • 1970-01-01
  • 2018-05-20
  • 2016-05-25
  • 2016-02-11
  • 2012-04-08
  • 1970-01-01
相关资源
最近更新 更多