problem with run the unittest

Asked by sunzn

When I run the unittest, I got this message

/openwns-sdk/tests/unit/unitTests$ ./openwns -tv
Loading...
Library: copper
Module: copper

Loading libcopper.so

Library: ip
Module: ip

Loading libip.so

Library: constanze
Module: constanze

Loading libconstanze.so

Library: tcp
Module: tcp

Loading libtcp.so

Library: dllbase
Module: dll

Loading libdllbase.so

Library: imtaphy
Module: imtaphy

Loading libimtaphy.so
Library: glue
Module: Glue

Loading libglue.so

Library: imtaphy
Module: imtaphy

Loading libimtaphy.so
Backtrace (most recent call last, stack size: 0):
  No backtrace available.
  Backtrace is currently only available on systems with glibc, sorry.
openWNS: Caught wns::Exception:

StaticFactory<wns::PyConfigViewCreator<wns::module::Base, wns::module::Base>> says:
You tried to create a 'imtaphy' instance.
Valid choices are:

  * Glue
  * constanze
  * copper
  * dll
  * ip
  * tcp

I don't know how to deal with this problem? Many THANKS

Question information

Language:
English Edit question
Status:
Answered
For:
IMTAphy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#1

Hi sunzn,

most likely something went wrong when you tried to compile. Please check if the file sandbox/dbg/lib/libimtaphy.so is there. If not, try recompiling (./playground.py install) and look for any error messages.

Greats,

Maciej

Revision history for this message
Jan (jan-ellenbeck) said :
#2

Thanks for answering, Maciej. I was about to write the same.

In addition, it could be that a library IMTAphy depends on is not found when you try to run it (e.g., because you try to run it in a different shell or a different machine where the MKL environment variables are not set or something like that.) If the libimtaphy.so file is there, check whether ldd shows you any unmet dependencies by running

openwns-sdk$ ldd sandbox/dbg/lib/libimtaphy.so

Cheers
Jan

Revision history for this message
sunzn (sunzhennian) said :
#3

Hi Jan and Maciej

I have checked the libintaphy.so, and then ldd sandbox/dbg/lib/libimtaphy.so got the following messages

 linux-vdso.so.1 => (0x00007fff53bff000)
 libboost_filesystem.so.1.42.0 => /usr/lib/libboost_filesystem.so.1.42.0 (0x00007f8184f41000)
 libboost_program_options.so.1.42.0 => /usr/lib/libboost_program_options.so.1.42.0 (0x00007f8184cd2000)
 libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007f81847c9000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f81845c5000)
 libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f81843c2000)
 libitpp.so.6 => /usr/lib/libitpp.so.6 (0x00007f8183ea5000)
 libboost_date_time.so.1.42.0 => /usr/lib/libboost_date_time.so.1.42.0 (0x00007f8183c91000)
 libcppunit-1.12.so.1 => /usr/local/lib/libcppunit-1.12.so.1 (0x00007f8183a4c000)
 libboost_signals.so.1.42.0 => /usr/lib/libboost_signals.so.1.42.0 (0x00007f8183836000)
 libmkl_intel_lp64.so => /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007f8183095000)
 libmkl_intel_thread.so => /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_intel_thread.so (0x00007f8182043000)
 libmkl_core.so => /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_core.so (0x00007f8181008000)
 libiomp5.so => /opt/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/libiomp5.so (0x00007f8180d1c000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8180afe000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f81807f7000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8180572000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f818035c000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f817ffc7000)
 libboost_system.so.1.42.0 => /usr/lib/libboost_system.so.1.42.0 (0x00007f817fdc3000)
 librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f817fbbb000)
 libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007f817f967000)
 libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007f817f5d8000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f817f3c0000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f8187b7b000)
 libfftw3.so.3 => /usr/lib/libfftw3.so.3 (0x00007f817f0c4000)
 liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00007f817e4a8000)
 libblas.so.3gf => /usr/lib/libblas.so.3gf (0x00007f817e223000)
 libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f817df3e000)

Revision history for this message
sunzn (sunzhennian) said :
#4

I think maybe something is wrong with the Backtrace , whether I need to install the "backtrace"?

Backtrace (most recent call last, stack size: 0):
  No backtrace available.
  Backtrace is currently only available on systems with glibc, sorry.

Thanks

Revision history for this message
Jan (jan-ellenbeck) said :
#5

Hi,

could you please provide more details about your system (Linux distribution, compiler versions (g++ --version)).

You did not modify anything in the code and you upgraded to the latest revision (playground.py upgrade)?

I've seen similar problems when symbols are undefined for some reason. Could you please paste the output of the following:

nm -u sandbox/dbg/lib/libimtaphy.so |c++filt |grep -i imta

and

nm -u sandbox/dbg/lib/libimtaphy.so |c++filt |grep -i ltea

Thanks
Jan

Revision history for this message
sunzn (sunzhennian) said :
#6

Hi Jan

1. Linux: ubuntu 11.04 64
g++ --version:4.5.2
2. I have not modify the code, and installed it following the "http://www.lkn.ei.tum.de/personen/jan/imtaphy/install.html"

3 . I got nothing after input the following command:
nm -u sandbox/dbg/lib/libimtaphy.so |c++filt |grep -i imta

and

nm -u sandbox/dbg/lib/libimtaphy.so |c++filt |grep -i ltea

Revision history for this message
Jan (jan-ellenbeck) said :
#7

Hi,

your system seems to be fine in general and the (missing) output from "nm" shows that there are no undefined imtaphy/ltea symbols that might cause this problem.

It still sounds like a compilation problem. Could you please try to recompile. Before doing that, remove all previous object files by doing:

openwns-sdk$ rm -rf .build
openwns-sdk$ rm -rf sandbox

Then re-compile with playground.py install

If the problem persists, you could try to get more insights from a debugger. Start the test like this:

openwns-sdk/tests/unit/unitTests$ gdb ./openwns
(gdb) catch throw
(gdb) run -tv

and then when the execution stops, say

(gdb) bt

and paste the backtrace information. Maybe this gives a clue as to what happens there.

Thanks
Jan

Revision history for this message
sunzn (sunzhennian) said :
#8

Hi

I have done as your said,

[Thread debugging using libthread_db enabled]
Loading...
Library: copper
Module: copper

Loading libcopper.so

Library: ip
Module: ip

Loading libip.so

Library: constanze
Module: constanze

Loading libconstanze.so

Library: tcp
Module: tcp

Loading libtcp.so

Library: dllbase
Module: dll

Loading libdllbase.so

Library: imtaphy
Module: imtaphy

Loading libimtaphy.so
Library: glue
Module: Glue

Loading libglue.so

Library: imtaphy
Module: imtaphy

Loading libimtaphy.so
Catchpoint 1 (exception thrown), 0x00007ffff4704a00 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff4704a00 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff6c00ca3 in wns::StaticFactory<wns::PyConfigViewCreator<wns::module::Base, wns::module::Base> >::creator (name=...) at .include/WNS/StaticFactory.hpp:204
#2 0x00007ffff6bfac39 in wns::simulator::Application::loadModules (this=0x7fffffffdb08) at framework/library/src/simulator/Application.cpp:717
#3 0x00007ffff6bf7368 in wns::simulator::Application::doInit (this=0x7fffffffdb08) at framework/library/src/simulator/Application.cpp:330
#4 0x00007ffff6bf596f in wns::simulator::IApplication::init (this=0x7fffffffdb08) at framework/library/src/simulator/IApplication.cpp:45
#5 0x0000000000402521 in wns::simulator::Main<wns::simulator::Application>::doInit (this=0x7fffffffdb00) at .include/WNS/simulator/Main.hpp:138
#6 0x00007ffff6bf596f in wns::simulator::IApplication::init (this=0x7fffffffdb00) at framework/library/src/simulator/IApplication.cpp:45
#7 0x0000000000401f48 in main (argc=2, argv=0x7fffffffdf78) at framework/application/src/Main.cpp:47
(gdb)

Many Thanks

Zhennian

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#9

Hi,

two more thinks you could try:

enter the directory modules/phy/imtaphy/testConfigs and run ./openwns

if this fails please use the absolute path( replace the bla bla accordingly for your absolute path to openWNS)

/bla/bla/bla/openwns-sdk/sandbox/dbg/bin/openwns

Revision history for this message
sunzn (sunzhennian) said :
#10

Hi ALL

The problem has not solved yet
Feel sad

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#11

Hi,

please try installing IMTAPhy from scratch following the directions in http://www.lkn.ei.tum.de/personen/jan/imtaphy/install.html

Be sure to delete the old openwns-sdk directory: "rm -rf openwns-sdk"

Greats,

Mac

Revision history for this message
Stojan Kitanov (stojankitanov) said :
#12

Hello dear colleagues,

I faced the following problem when I run the unitTests:

root@stojan-laptop:/usr/local/imtAphy/openwns-sdk/tests/unit/unitTests# ./openwns -tv
Loading...
Library: copper
Module: copper

Loading libcopper.so

Library: ip
Module: ip

Loading libip.so

Library: constanze
Module: constanze

Loading libconstanze.so

Library: tcp
Module: tcp

Loading libtcp.so

Library: dllbase
Module: dll

Loading libdllbase.so

Library: imtaphy
Module: imtaphy

Loading libimtaphy.so
Library: glue
Module: Glue

Loading libglue.so

Library: imtaphy
Module: imtaphy

Loading libimtaphy.so
ModuleFactory contains the following modules:
 Glue
 constanze
 copper
 dll
 ip
 tcp
Backtrace (most recent call last, stack size: 10):
 10) unknown
 9) __libc_start_main
 8) unknown
 7) wns::simulator::IApplication::init()
 6) wns::simulator::Main<wns::simulator::Application>::doInit()
 5) wns::simulator::IApplication::init()
 4) wns::simulator::Application::doInit()
 3) wns::simulator::Application::loadModules()
 2) wns::Exception::Exception(std::string const&)
 1) wns::Backtrace::snapshot()
openWNS: Caught wns::Exception:

Can't load all specified modules. Reason:
/usr/local/imtAphy/openwns-sdk/sandbox/dbg/lib/libimtaphy.so: undefined symbol: _ZN4itpp5DSFMTILi19937ELi117ELi19ELy4498102069230399ELy4501400546508797ELj1047295ELj4294966079ELj1048063ELj4237361149ELy10376655713290109737ELy4291106551315987578ELy4432916062321256576ELy1EE6statusE/usr/local/imtAphy/openwns-sdk/sandbox/dbg/lib/libimtaphy.so: undefined symbol: _ZN4itpp5DSFMTILi19937ELi117ELi19ELy4498102069230399ELy4501400546508797ELj1047295ELj4294966079ELj1048063ELj4237361149ELy10376655713290109737ELy4291106551315987578ELy4432916062321256576ELy1EE6statusE

root@stojan-laptop:/usr/local/imtAphy/openwns-sdk/tests/unit/unitTests#

Any idea what may cause this exception.

Stojan

Revision history for this message
Jan (jan-ellenbeck) said :
#13

I haven't seen this error before.

The unresolved symbol should be coming from the it++ library. It seems the itpp library is not installed correctly or cannot be found during runtime.

You can check the libraries the simulator is linked against by doing:

openwns-sdk/sandbox/dbg/lib$ ldd libimtaphy.so

Jan

Revision history for this message
Stojan Kitanov (stojankitanov) said :
#14

Hi Jan,

Sorry for my late response.

Below is the output from Ubunty 10.04 64 bit system. It seems everything is ok. I tried also on 32 bit Ubuntu 10.04, and the same error appears.

However I would like to ask some things about installation. Under number 3, it is stated that an IT++ library of mathematical, signal processing and communication routines is also required. Also it is stated that Ubuntu has a pre-compiled package. What is meant by this.

Is it meant that it is necessary only to install: libitpp-dev package or it is necessary to install itpp-4.2 software from the given link of IT++ library.

Regards,

Stojan

root@stojan-laptop:~/Downloads/openwns-sdk/sandbox/dbg/lib# ldd libimtaphy.so
 linux-vdso.so.1 => (0x00007fff797bf000)
 libboost_filesystem.so.1.40.0 => /usr/lib/libboost_filesystem.so.1.40.0 (0x00007f6fd6a7b000)
 libboost_program_options.so.1.40.0 => /usr/lib/libboost_program_options.so.1.40.0 (0x00007f6fd682d000)
 libdl.so.2 => /lib/libdl.so.2 (0x00007f6fd6628000)
 libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0x00007f6fd6177000)
 libutil.so.1 => /lib/libutil.so.1 (0x00007f6fd5f74000)
 libitpp.so.6 => /usr/lib/libitpp.so.6 (0x00007f6fd5a57000)
 libboost_date_time.so.1.40.0 => /usr/lib/libboost_date_time.so.1.40.0 (0x00007f6fd5844000)
 libcppunit-1.12.so.1 => /usr/lib/libcppunit-1.12.so.1 (0x00007f6fd55ff000)
 libboost_signals.so.1.40.0 => /usr/lib/libboost_signals.so.1.40.0 (0x00007f6fd53ea000)
 libmkl_intel_lp64.so => /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007f6fd4c49000)
 libmkl_intel_thread.so => /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_intel_thread.so (0x00007f6fd3bf7000)
 libmkl_core.so => /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_core.so (0x00007f6fd2bbc000)
 libiomp5.so => /opt/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64/libiomp5.so (0x00007f6fd28d0000)
 libpthread.so.0 => /lib/libpthread.so.0 (0x00007f6fd26b3000)
 libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6fd239e000)
 libm.so.6 => /lib/libm.so.6 (0x00007f6fd211b000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f6fd1f04000)
 libc.so.6 => /lib/libc.so.6 (0x00007f6fd1b80000)
 libboost_system.so.1.40.0 => /usr/lib/libboost_system.so.1.40.0 (0x00007f6fd197c000)
 librt.so.1 => /lib/librt.so.1 (0x00007f6fd1774000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f6fd974b000)
 libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007f6fd1521000)
 libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007f6fd1191000)
 libz.so.1 => /lib/libz.so.1 (0x00007f6fd0f7a000)
 libfftw3.so.3 => /usr/lib/libfftw3.so.3 (0x00007f6fd0c7e000)
 liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf (0x00007f6fd0077000)
 libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0x00007f6fcf6dc000)
 libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f6fcf3ee000)
root@stojan-laptop:~/Downloads/openwns-sdk/sandbox/dbg/lib#

Revision history for this message
Jan (jan-ellenbeck) said :
#15

Hi Stojan,

when you install the libitpp-dev Ubuntu package, which contains the header files, it should also install the libraries (binaries in /usr/lib). Apparently, you have the libraries installed because they are found at /usr/lib/libitpp.so.6 (see above).

I have no idea what goes wrong there. Maybe something (like libitpp) is not correctly installed. Maybe you are mixing headers/libraries from the it++ version that comes with Ubuntu 10.04 and something you tried to install yourself?

I guess my advice would be to make a fresh installation of IMTAphy on a freshly installed Ubuntu system (maybe more recent than 10.04 even though that should be OK because I have it running on 10.04 as well).

Cheers
Jan

PS: In the future, please open a new thread because the question has nothing to do with the initial problem but still everybody in this thread will receive updates...

Can you help with this problem?

Provide an answer of your own, or ask sunzn for more information if necessary.

To post a message you must log in.