"DSO Missing from command line" 的 CreateOctaveComponent 错误

CreateOctaveComponent error with "DSO Missing from command line"

我一直在尝试让 Redhawk SDR 导入 Octave M 文件。我最初是从 Octave 3.8.2 和 Redhawk 2.1.0 开始的。正如另一位用户发现的那样,这导致了 do_octave_atexit 错误 () 尽管答案中有解决方案,但我无法让它工作。然后,我也按照建议降级到 Octave 3.6.4。我现在收到以下错误,我不确定如何克服这个错误。

我尝试移植到 Redhawk 的文件名为 multByTwo.m。我试过几个文件都没有成功。我可以 运行 没有 --install 参数的命令。

[root@localhost 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 个退出状态

它出错了。 Whosebug 上的类似问题已通过向命令行添加各种参数得到解决。但在这种情况下,命令行不接受任何其他条目,因为它只是 >>createOctaveComponent --install fileName.m

有什么想法吗?

createOctaveComponent 脚本似乎只是调用代码生成器并创建关联的 Makefile.am 和 configure.ac 文件。您收到的错误是 linker 错误。它找不到符号 _ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE。如果可以的话,旧版本的 gcc 会自动添加 link,即使用户没有指定它,所以我假设你使用的 OS 比 CentOS6 更新。 linker 足以告诉您此符号在 /usr/lib64/libboost_filesystem.so.1.53.0 中,因此您可以简单地将 -lboost_filesystem 添加到构建中,但这不是首选因为应该使用 autotools 来定位库并检测名称。

如果您查看生成的 Makefile.am 文件,您会看到 $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) 但没有增强文件系统。如果您添加 $(BOOST_FILESYSTEM_LIB) 然后将相应的 AX_BOOST_FILESYSTEM 添加到 configure.ac 文件中,您可以重新运行 ./reconf && ./configure && make && make install 并且它应该找到正确的 boost 文件系统库并将其添加到 link打来电话。