octaveredhawksdr

CreateOctaveComponent error with "DSO Missing from command line"


I've been trying to get Redhawk SDR to import an Octave M file. I initially started with Octave 3.8.2 and Redhawk 2.1.0. As another user discovered, this resulted in a do_octave_atexit error (do_octave_atexit missing? does createOctaveComponent work?) Despite the solutions in the answer, I was not able to get this to work. I then downgraded to Octave 3.6.4, as was also suggested. I now get the following error and I'm not sure how to overcome this fault.

The name of the file I'm attempting to port to Redhawk is named multByTwo.m. I've tried several files without any success. I can run the command without the --install parameter.

[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

I get a few warnings, but it's not until the end where I get

/usr/lib64/libboost_filesystem.so.1.53.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

that it errors out. Similar issues on Stackoverflow have been resolved by adding various parameters to the command line. But in this case, the command line does not accept any other entries, as it's only >>createOctaveComponent --install fileName.m

Any thoughts?


Solution

  • The createOctaveComponent script seems to just invoke the code generators and create the associated Makefile.am and configure.ac files. The error you are getting is a linker error. It cannot find the symbol _ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE. Older versions of gcc would automatically add the link if it could, even though the user hadn't specified it so I'm assuming you are on a newer OS than CentOS6. The linker is helpful enough to tell you that this symbol is in /usr/lib64/libboost_filesystem.so.1.53.0 so you could simply add the -lboost_filesystem to the build but this isn't the preferred way since autotools should be used to locate the library and detect the name.

    If you look at the generated Makefile.am file you'll see $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) but no boost filesystem. If you add $(BOOST_FILESYSTEM_LIB) and then add the corresponding AX_BOOST_FILESYSTEM to the configure.ac file you can rerun ./reconf && ./configure && make && make install and it should locate the proper boost filesystem library and add it to the linker call.