2017-06-27 113 views
0

我一直在試圖讓Redhawk SDR導入一個Octave M文件。我最初開始使用Octave 3.8.2和Redhawk 2.1.0。正如另一位用戶發現的,這導致了一個do_octave_atexit錯誤(do_octave_atexit missing? does createOctaveComponent work?)儘管答案中有解決方案,但我無法使其工作。正如也有人建議的那樣,我隨後降級到Octave 3.6.4。我現在得到以下錯誤,我不知道如何克服這個錯誤。CreateOctaveComponent error「DSO Missing from command line」

我試圖移植到Redhawk的文件的名稱叫做multByTwo.m。我嘗試了幾個文件沒有任何成功。我可以運行不帶--install參數的命令。

[[email protected] workspace]# createOctaveComponent --install multByTwo.m 
multByTwo 
Component multByTwo 
    build.sh 
    multByTwo.spec 
Tests multByTwo 
    tests/test_multByTwo.py 
Implementation: cpp 
WARNING: cpp/Makefile.am.ide has been modified or is a user file that must be explicitly updated, use -f to overwrite 
WARNING: cpp/multByTwo.cpp has been modified or is a user file that must be explicitly updated, use -f to overwrite 
WARNING: cpp/multByTwo.h has been modified or is a user file that must be explicitly updated, use -f to overwrite 
    cpp/main.cpp 
    cpp/Makefile.am 
    cpp/configure.ac 
    cpp/build.sh 
    cpp/reconf 
    cpp/multByTwo_base.cpp 
    cpp/multByTwo_base.h 
    cpp/COPYING 
checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p 
checking for gawk... gawk 
checking whether make sets $(MAKE)... yes 
checking whether make supports nested variables... yes 
./configure: line 2572: test: too many arguments 
checking for gcc... gcc 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking for style of include used by make... GNU 
checking dependency style of gcc... gcc3 
checking for g++... g++ 
checking whether we are using the GNU C++ compiler... yes 
checking whether g++ accepts -g... yes 
checking dependency style of g++... gcc3 
checking for pkg-config... /usr/bin/pkg-config 
checking pkg-config is at least version 0.9.0... yes 
checking for omniORB4... yes 
checking for ossie home... /usr/local/redhawk/core 
checking to see ossie is installed... checking for sdr root... /var/redhawk/sdr 
configure: using /var/redhawk/sdr/ as installation prefix 
checking whether make supports nested variables... (cached) yes 
checking for PROJECTDEPS... yes 
checking for INTERFACEDEPS... yes 
checking for LOG4CXX... yes 
checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking for boostlib >= 1.41... yes 
checking whether the Boost::System library is available... yes 
checking for exit in -lboost_system... yes 
checking whether the Boost::Thread library is available... yes 
checking for exit in -lboost_thread... yes 
checking whether the Boost::Regex library is available... yes 
checking for exit in -lboost_regex-mt... yes 
checking that generated files are newer than configure... done 
configure: creating ./config.status 
config.status: creating Makefile 
config.status: executing depfiles commands 
    CXX  multByTwo-main.o 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from main.cpp:19: 
/usr/local/include/octave-3.6.4/octave/config.h:132:0:  warning: "GETTIMEOFDAY_TIMEZONE" redefined [enabled by default] 
#define GETTIMEOFDAY_TIMEZONE struct timezone 
^ 
In file included from /usr/include/omniconfig.h:37:0, 
       from /usr/include/omniORB4/CORBA_sysdep.h:51, 
       from /usr/include/omniORB4/omniInternal.h:42, 
       from /usr/include/omniORB4/CORBA.h:65, 
       from /usr/local/redhawk/core/include/ossie/CF/cf.h:6, 
        from /usr/local/redhawk/core/include/ossie/ossieSupport.h:34, 
       from main.cpp:17: 
/usr/include/omniORB4/acconfig.h:16:0: note: this is the location of the previous definition 
#define GETTIMEOFDAY_TIMEZONE /**/ 
^ 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from main.cpp:19: 
/usr/local/include/octave-3.6.4/octave/config.h:2505:0: warning: "PACKAGE" redefined [enabled by default] 
#define PACKAGE "octave" 
^ 
<command-line>:0:0: note: this is the location of the previous definition 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from main.cpp:19: 
/usr/local/include/octave-3.6.4/octave/config.h:2520:0: warning: "PACKAGE_URL" redefined [enabled by default] 
#define PACKAGE_URL "http://www.gnu.org/software/octave/" 
^ 
In file included from /usr/include/omniconfig.h:37:0, 
       from /usr/include/omniORB4/CORBA_sysdep.h:51, 
       from /usr/include/omniORB4/omniInternal.h:42, 
       from /usr/include/omniORB4/CORBA.h:65, 
       from /usr/local/redhawk/core/include/ossie/CF/cf.h:6, 
        from /usr/local/redhawk/core/include/ossie/ossieSupport.h:34, 
       from main.cpp:17: 
/usr/include/omniORB4/acconfig.h:263:0: note: this is the location of the previous definition 
#define PACKAGE_URL "" 
^ 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from main.cpp:19: 
/usr/local/include/octave-3.6.4/octave/config.h:2669:0: warning: "VERSION"  redefined [enabled by default] 
#define VERSION "3.6.4" 
^ 
<command-line>:0:0: note: this is the location of the previous definition 
    CXX  multByTwo-multByTwo_base.o 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo_base.cpp:16: 
/usr/local/include/octave-3.6.4/octave/config.h:132:0:  warning: "GETTIMEOFDAY_TIMEZONE" redefined [enabled by default] 
#define GETTIMEOFDAY_TIMEZONE struct timezone 
^ 
In file included from /usr/include/omniconfig.h:37:0, 
       from /usr/include/omniORB4/CORBA_sysdep.h:51, 
       from /usr/include/omniORB4/omniInternal.h:42, 
       from /usr/include/omniORB4/CORBA.h:65, 
       from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:, 
       from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25, 
       from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27, 
       from /usr/local/redhawk/core/include/ossie/Component.h:23, 
       from multByTwo_base.h:20, 
       from multByTwo_base.cpp:16: 
/usr/include/omniORB4/acconfig.h:16:0: note: this is the location of the  previous definition 
#define GETTIMEOFDAY_TIMEZONE /**/ 
^ 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo_base.cpp:16: 
/usr/local/include/octave-3.6.4/octave/config.h:2505:0: warning: "PACKAGE" redefined [enabled by default] 
#define PACKAGE "octave" 
^ 
<command-line>:0:0: note: this is the location of the previous definition 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
      from multByTwo_base.cpp:16: 
/usr/local/include/octave-3.6.4/octave/config.h:2520:0: warning: "PACKAGE_URL" redefined [enabled by default] 
#define PACKAGE_URL "http://www.gnu.org/software/octave/" 
^ 
In file included from /usr/include/omniconfig.h:37:0, 
       from /usr/include/omniORB4/CORBA_sysdep.h:51, 
       from /usr/include/omniORB4/omniInternal.h:42, 
       from /usr/include/omniORB4/CORBA.h:65, 
       from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:, 
       from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25, 
       from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27, 
       from /usr/local/redhawk/core/include/ossie/Component.h:23, 
       from multByTwo_base.h:20, 
       from multByTwo_base.cpp:16: 
/usr/include/omniORB4/acconfig.h:263:0: note: this is the location of the previous definition 
#define PACKAGE_URL "" 
^ 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo_base.cpp:16: 
/usr/local/include/octave-3.6.4/octave/config.h:2669:0: warning: "VERSION" redefined [enabled by default] 
#define VERSION "3.6.4" 
^ 
<command-line>:0:0: note: this is the location of the previous definition 
    CXX  multByTwo-multByTwo.o 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from multByTwo.cpp:28: 
/usr/local/include/octave-3.6.4/octave/config.h:132:0:  warning: "GETTIMEOFDAY_TIMEZONE" redefined [enabled by default] 
#define GETTIMEOFDAY_TIMEZONE struct timezone 
^ 
In file included from /usr/include/omniconfig.h:37:0, 
       from /usr/include/omniORB4/CORBA_sysdep.h:51, 
       from /usr/include/omniORB4/omniInternal.h:42, 
       from /usr/include/omniORB4/CORBA.h:65, 
       from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:, 
       from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25, 
       from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27, 
       from /usr/local/redhawk/core/include/ossie/Component.h:23, 
       from multByTwo_base.h:20, 
       from multByTwo.h:20, 
       from multByTwo.cpp:28: 
/usr/include/omniORB4/acconfig.h:16:0: note: this is the location of the previous definition 
#define GETTIMEOFDAY_TIMEZONE /**/ 
^ 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from multByTwo.cpp:28: 
/usr/local/include/octave-3.6.4/octave/config.h:2505:0: warning: "PACKAGE" redefined [enabled by default] 
#define PACKAGE "octave" 
^ 
<command-line>:0:0: note: this is the location of the previous definition 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from multByTwo.cpp:28: 
/usr/local/include/octave-3.6.4/octave/config.h:2520:0: warning: "PACKAGE_URL" redefined [enabled by default] 
#define PACKAGE_URL "http://www.gnu.org/software/octave/" 
^ 
In file included from /usr/include/omniconfig.h:37:0, 
       from /usr/include/omniORB4/CORBA_sysdep.h:51, 
       from /usr/include/omniORB4/omniInternal.h:42, 
       from /usr/include/omniORB4/CORBA.h:65, 
       from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:, 
       from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25, 
       from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27, 
       from /usr/local/redhawk/core/include/ossie/Component.h:23, 
       from multByTwo_base.h:20, 
       from multByTwo.h:20, 
       from multByTwo.cpp:28: 
/usr/include/omniORB4/acconfig.h:263:0: note: this is the location of the  previous definition 
#define PACKAGE_URL "" 
^ 
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0, 
       from multByTwo_base.h:24, 
       from multByTwo.h:20, 
       from multByTwo.cpp:28: 
/usr/local/include/octave-3.6.4/octave/config.h:2669:0: warning: "VERSION"  redefined [enabled by default] 
#define VERSION "3.6.4" 
^ 
<command-line>:0:0: note: this is the location of the previous definition 
    CXXLD multByTwo 
    /usr/bin/ld: multByTwo-multByTwo_base.o: undefined reference to symbol '_ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE' 
    /usr/lib64/libboost_filesystem.so.1.53.0: error adding symbols: DSO missing from command line 
    collect2: error: ld returned 1 exit status 
    make: *** [multByTwo] Error 1 

,我收到了一些警告,但它不是直到最後從哪裏獲得

/usr/lib64/libboost_filesystem.so.1.53.0:錯誤添加符號:DSO命令行 失蹤collect2:錯誤:ld返回1退出狀態

它出錯。通過向命令行添加各種參數已解決了Stackoverflow上的類似問題。但在這種情況下,命令行不接受任何其他條目,因爲它只是>> createOctaveComponent --install fileName.m

有什麼想法?

回答

1

createOctaveComponent腳本似乎只是調用代碼生成器並創建關聯的Makefile.am和configure.ac文件。您收到的錯誤是鏈接器錯誤。它無法找到符號_ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE。如果可以的話,老版本的gcc會自動添加鏈接,即使用戶沒有指定它,所以我假設你使用的是比CentOS6更新的操作系統。鏈接器足以告訴你這個符號在/usr/lib64/libboost_filesystem.so.1.53.0中,因此你可以簡單地將-lboost_filesystem添加到構建中,但這不是自動工具應該用於定位的首選方式庫和檢測名稱。

如果你看看生成的Makefile.am文件,你會看到$(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB),但沒有boost文件系統。如果添加$(BOOST_FILESYSTEM_LIB),然後將相應的AX_BOOST_FILESYSTEM添加到configure.ac文件,則可以重新運行./reconf && ./configure && make && make install,並且它應該找到正確的boost文件系統庫並將其添加到鏈接程序調用中。

+0

這似乎工作!感謝Youssef! 對於那些好奇的人,我在configure.ac文件的_#Dependencies_部分下的Makefile.am和_ AX_BOOST_FILESYSTEM_中添加了_ $(BOOST_FILESYSTEM_LIB)_到_functionname_LDADD_部分。在這種情況下,「functionname」是我創建的名爲「MultByTwo」的M文件的名稱。 – EastCoast

+0

我也想補充一點,你對操作系統是正確的。我正在使用CentOS7 – EastCoast