在Fedora24上从源代码构建REDHAWK CF [英] Building REDHAWK CF from Source on Fedora24

查看:73
本文介绍了在Fedora24上从源代码构建REDHAWK CF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Fedora24机器上的源代码构建REDHAWKCF.我遇到了一些障碍,希望人们可以就以下两个问题提供指导:

I am attempting to build the REDHAWK CF from source on a Fedora24 machine. I've hit a few barriers, and am hoping folks can provide guidance on the following two issues:

1)我克隆了 RedhawkSDR/redhawk 存储库,并尝试在. F24随GCC6一起提供,并且基于列出的受支持平台(RHEL/CentOS 6系列),我想这比上游要测试的平台提前了一点.在我进行克隆时,core位于cfea23b,其标记为v2.0.1.

1) I cloned the RedhawkSDR/redhawk repository, and am attempting to build the CF in redhawk.git/redhawk/core/src. F24 ships with GCC6, and based on the listed supported platforms (RHEL / CentOS 6-series), I'm guessing this is a bit ahead of what the upstream is testing against. At the time of my clone, core was at cfea23b which is tagged as v2.0.1.

为了构建它,我必须进行四处更改.我认为其中的后两个是GCC6要求的更改(即gnu-c ++ 14),但是我认为无论使用的C ++标准如何,都需要前两个.就是说,这些台词最后一次修改是在2016年2月,因此引起了我的关注.我敢打赌,如果它们是实际错误,这些问题到现在就会被发现,这使我相信我做错了什么.

In order to get it to build, I've had to make four changes. The latter two of them I believe to be GCC6-required changes (i.e., gnu-c++14), but I think the top two would be required regardless of the C++ standard in use. That said, these lines were last touched in Feb 2016 - hence my concern. My bet is that these would have been caught by now if they were actual errors, which leads me to believe I'm doing something wrong.

我的变更集如下:

diff --git a/src/control/framework/nodebooter.cpp b/src/control/framework/nodebooter.cpp
index d79c291..dbd97ad 100644
--- a/src/control/framework/nodebooter.cpp
+++ b/src/control/framework/nodebooter.cpp
@@ -141,7 +141,7 @@ void loadPRFExecParams (const std::string& prfFile, ExecParams& execParams)
         prf.load(prfStream);
     } catch (const ossie::parser_error& ex) {
         std::string parser_error_line = ossie::retrieveParserErrorLineNumber(ex.what());
-        LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
+        LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfFile<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
         exit(EXIT_FAILURE);
     }
     prfStream.close();
diff --git a/src/control/sdr/dommgr/ApplicationFactory_impl.cpp b/src/control/sdr/dommgr/ApplicationFactory_impl.cpp
index d370519..92699e0 100644
--- a/src/control/sdr/dommgr/ApplicationFactory_impl.cpp
+++ b/src/control/sdr/dommgr/ApplicationFactory_impl.cpp
@@ -194,7 +194,7 @@ void ApplicationFactory_impl::ValidateSPD(CF::FileManager_ptr fileMgr,
                                           const bool require_prf, 
                                           const bool require_scd) {
   SoftPkg pkg;
-  ValidateSPD(fileMgr, pkg, false, false );
+  ValidateSPD(fileMgr, pkg, sfw_profile, require_prf, require_scd);
 }

 void ApplicationFactory_impl::ValidateSPD(CF::FileManager_ptr fileMgr, 
diff --git a/src/control/sdr/dommgr/applicationSupport.cpp b/src/control/sdr/dommgr/applicationSupport.cpp
index 1daa7ce..fbb5ac8 100644
--- a/src/control/sdr/dommgr/applicationSupport.cpp
+++ b/src/control/sdr/dommgr/applicationSupport.cpp
@@ -853,7 +853,7 @@ const bool  ComponentInfo::isScaCompliant()

 bool ComponentInfo::isAssignedToDevice() const
 {
-    return assignedDevice;
+  return static_cast<bool>(assignedDevice);
 }

 bool ComponentInfo::checkStruct(CF::Properties &props)
diff --git a/src/testing/sdr/dev/devices/CppTestDevice/cpp/CppTestDevice.h b/src/testing/sdr/dev/devices/CppTestDevice/cpp/CppTestDevice.h
index 8e1c396..af71c53 100644
--- a/src/testing/sdr/dev/devices/CppTestDevice/cpp/CppTestDevice.h
+++ b/src/testing/sdr/dev/devices/CppTestDevice/cpp/CppTestDevice.h
@@ -28,7 +28,7 @@ class CppTestDevice_i : public CppTestDevice_base
 {
     ENABLE_LOGGING
     public:
-       static const float MAX_LOAD = 4.0;
+       static constexpr float MAX_LOAD = 4.0;

        CppTestDevice_i(char *devMgr_ior, char *id, char *lbl, char *sftwrPrfl);
         CppTestDevice_i(char *devMgr_ior, char *id, char *lbl, char *sftwrPrfl, char *compDev);

2)通过此补丁,我可以构建CF.不幸的是,运行make test失败,并显示以下内容:

2) With this patch, I am able to build the CF. Unfortunately, running make test fails with the following:

cd testing; ./runtests.py
Searching for files in tests/ with prefix test_*.py

Creating the Test Domain

bhilburn22299

R U N N I N G  T E S T S
SDRROOT:  /home/bhilburn/src/redhawk.git/redhawk/core/src/testing/sdr

Loading module tests/test_00_PythonFramework.py
LOADING
Loading module tests/test_00_PythonUtils.py
LOADING
Loading module tests/test_00_ValidateTestDomain.py
LOADING
Loading module tests/test_01_DeviceManager.py
LOADING
Traceback (most recent call last):
  File "./runtests.py", line 231, in <module>
    suite = TestCollector(files, testMethodPrefix=options.prefix, prompt=options.prompt)
  File "./runtests.py", line 112, in __init__
    self.loadTests()
  File "./runtests.py", line 129, in loadTests
    self.addTest(loader.loadTestsFromTestCase(candidate))
  File "./runtests.py", line 104, in loadTestsFromTestCase
    return self.suiteClass(map(testCaseClass, testCaseNames))
  File "/home/bhilburn/src/redhawk.git/redhawk/core/src/testing/_unitTestHelpers/scatest.py", line 328, in __init__
    self._root = self._ns._narrow(CosNaming.NamingContext)
  File "/usr/lib/python2.7/site-packages/omniORB/CORBA.py", line 585, in _narrow
    return self._obj.narrow(repoId, 1)
omniORB.CORBA.TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO)
Makefile:1023: recipe for target 'test' failed
make: *** [test] Error 1

根据安装说明,我敢打赌omniORB的配置不正确.不过,我在弄清楚我到底缺少了什么时遇到了麻烦.我已经对安装说明中所述的/etc/omniORB.cfg进行了更改,但是当我尝试手动调用cleanomni时,会看到以下内容:

Based on the Installation Instructions, my bet is that omniORB is not configured correctly. I'm having trouble figuring out what exactly I'm missing, though. I have made the change to /etc/omniORB.cfg described in the installation instructions, but when I try to manually invoke cleanomni I see this:

sh: /etc/init.d/omniNames: No such file or directory

我的猜测是,当通过RPM安装CF时,会执行一些其他的配置步骤,这些步骤在安装说明中没有进行描述.是否有任何文档可以将其分解为更多细节?

My guess is that when the CF is installed through RPMs, some additional configuration steps are done that aren't described in the installation instructions. Are there any docs that break these out into more detail?

推荐答案

我还必须在与您建议的位置相同的位置修补框架,并采用与您相同的方法.我还必须配置以下内容:

I also had to patch the framework in the same spots as you suggested and took the same approach as you. I also had to configure with the following:

CXXFLAGS='-g -O2 -fpermissive' ./configure --disable-log4cxx

因为我没有log4cxx,但dnf搜索找不到它.

as I did not have log4cxx and a dnf search did not find it.

对于make test调用,我相信您需要运行omniName才能执行.如果安装了omniORB服务器,则应该能够sudo systemctl start omniNames.service.我在docker映像中运行,所以我直接使用以下命令启动它:

As for the make test call, you'll need to have omniNames running for those to execute I believe. You should be able to sudo systemctl start omniNames.service if you have omniORB-servers installed. I was running in a docker image so I started it directly with:

/usr/bin/omniNames -start -always -logdir /var/log/omniORB/ -errlog /var/log/omniORB/error.log

因为我相信我需要做一些额外的工作才能使systemctl在docker中正常运行.之后,应该运行单元测试.尽管我也执行了make install并将profile.d脚本来源到$ OSSIEHOME/etc/profile.d中.当然,我没有安装omniEvents,所以我的话充满了:

since I believe I would need to do some extra work to get systemctl playing nice in docker. After this the unit tests should run. Although I also performed a make install and sourced the profile.d scripts in $OSSIEHOME/etc/profile.d. Of course, I do not have omniEvents installed so mine are riddled with:

ERROR:DomainManager - Service unvailable, Unable to create event channel: IDM_Channel

关于cleanomni脚本,该脚本非常依赖于系统,我相信只能在CentOS6上运行.应该停止omni服务,删除日志"(其行为更像是持久性),然后重新启动它们.根据omniNames的启动/编译方式,每个系统的日志目录可能不同.我通常只是手动清理它,或者使用bash脚本来停止/清理/启动服务.

Regarding the cleanomni script, this script is very system dependent and I believe only works on CentOS6. It should, stop the omni services, remove the "logs" (which act more like persistence), then restart them. Depending on how omniNames is started / compiled the logging directory may be different per system. I usually just clean it by hand or have a bash script to stop/clean/start the services.

经过长时间的等待,我的单元测试确实完成了以下结果:

After a long wait my unit tests did finish with the following results:

Ran 498 tests in 1587.850s FAILED (failures=11, errors=35)

Ran 498 tests in 1587.850s FAILED (failures=11, errors=35)

这可能不是一个很好的评估;有些测试依赖于omniEvents,有些依赖于诸如valgrind的安装库,有些依赖于BULKIO等.因此,您的测试结果可能会因测试结果而异,并且可能需要进行其他检查以查看失败是否合法.

This is likely not a good assessment though; some of the tests depend on omniEvents, some depend on libraries like valgrind being installed, some require BULKIO etc. So your millage may vary on the test results and may require addition inspection to see if the failures are legit or not.

这篇关于在Fedora24上从源代码构建REDHAWK CF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆