In brief: Depending on the settings make test does not always test what
should test.
In detail:
The following is based on gnuradio v3.7.2.1-159-g3fa56a46 though the
problems already exist with older versions.
If I run make test on a fresh build ( but not installed! ) version of
gnuradio I get a lot of errors.
Mainly symbol not found.
This depends on my special ( but I think not really unusual ) setup.
I work with multiple version of gnuradio all installed in /usr/local,
for example:
drwxr-xr-x 9 root root 88 21. Jan 17:27 /usr/local/gnuradio-3.7.1
drwxr-xr-x 9 root root 88 13. Sep 12:13 /usr/local/gnuradio-3.7-debug
The installation to use is selected by an symbolic link:
lrwxrwxrwx 1 root root 14 26. Jan 12:30 /usr/local/gnuradio ->
gnuradio-3.7.1
The gnuradio-libs a referenced by:
LD_LIBRARY_PATH=/usr/local/gnuradio/lib
and
PYTHONPATH=/usr/local/gnuradio/lib64/python2.7/site-packages/
Switching between versions is easy, I've just change the symbolic link.
This works very well.
Installing a new(er) version of gnuradio is as follow.
Clone the repository.
Run cmake in the build- directory defining a new installation directory
and run
make test.
Only if the test are O.K. I'd really like to install the new version.
No the problems arise:
As LD_LIBRARY_PATH is set, the volk test uses the wrong library:
ldd lib/test_all
linux-vdso.so.1 (0x00007fff45bff000)
libvolk.so.0.0.0 => /usr/local/gnuradio/lib/libvolk.so.0.0.0
(0x00007eff7c501000)
libboost_filesystem.so.1.55.0 =>
/usr/lib64/libboost_filesystem.so.1.55.0 (0x00007eff7c2e9000)
libboost_system.so.1.55.0 => /usr/lib64/libboost_system.so.1.55.0
(0x00007eff7c0e5000)
libboost_unit_test_framework.so.1.55.0 =>
/usr/lib64/libboost_unit_test_framework.so.1.55.0 (0x00007eff7be39000)
libboost_program_options.so.1.55.0 =>
/usr/lib64/libboost_program_options.so.1.55.0 (0x00007eff7bbc6000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007eff7b9c2000)
liborc-0.4.so.0 => /usr/lib64/liborc-0.4.so.0 (0x00007eff7b73b000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6
(0x00007eff7b433000)
libm.so.6 => /lib64/libm.so.6 (0x00007eff7b133000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/libgcc_s.so.1
(0x00007eff7af1c000)
libc.so.6 => /lib64/libc.so.6 (0x00007eff7ab6c000)
librt.so.1 => /lib64/librt.so.1 (0x00007eff7a964000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007eff7a747000)
/lib64/ld-linux-x86-64.so.2 (0x00007eff7c81b000)
So the test results in:
lib/test_all: symbol lookup error: lib/test_all: undefined symbol:
volk_32f_invsqrt_32f_get_func_desc
This can be avoided be adding . to the LD_LIBRARY_PATH in the test script.
Similar problems arise in many tests that depend on the volk library.
For example the analog/qa_agc.py test results in
undefined symbol: volk_malloc
If you have a look into the test script you'll find
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
export
PYTHONPATH=/home/schroer/gnuradiocomponents/gnuradio/build-master/gnuradio-runtime/python:$PYTHONPATH
The setting of the LD_LIBRARY_PATH makes no real sense. It should be
prefixed with the path to the newly compiled volk library in the build
directory, similarly like the PYTHONPATH is set.
For example:
export
LD_LIBRARY_PATH=/home/schroer/gnuradiocomponents/gnuradio/build-master/volk/lib:$LD_LIBRARY_PATH
There are some other tests affected.
The attached patch adresses these problems and the patch for
FindQwt.cmake solves a problem on gentoo that the wrong qwt library is
used. The original FindQwt.cmake finds the include file of qwt6 but the
lib of qwt5.
-- Volker
>From 3c614ce18ec863eaff3a304c0f1c94c3c730477f Mon Sep 17 00:00:00 2001
From: dl1ksv <dl1...@gmx.de>
Date: Sun, 26 Jan 2014 12:19:31 +0100
Subject: [PATCH] Fixing problems with library path
---
cmake/Modules/FindQwt.cmake | 4 ++--
gr-analog/python/analog/CMakeLists.txt | 2 +-
gr-atsc/python/atsc/CMakeLists.txt | 2 +-
gr-channels/python/channels/CMakeLists.txt | 2 +-
gr-digital/python/digital/CMakeLists.txt | 2 +-
gr-filter/python/filter/CMakeLists.txt | 3 ++-
gr-pager/python/pager/CMakeLists.txt | 2 +-
gr-qtgui/python/qtgui/CMakeLists.txt | 3 ++-
gr-trellis/python/trellis/CMakeLists.txt | 2 +-
gr-vocoder/python/vocoder/CMakeLists.txt | 2 +-
gr-wavelet/python/wavelet/CMakeLists.txt | 2 +-
volk/lib/CMakeLists.txt | 3 ++-
12 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake
index a940558..0e2c135 100644
--- a/cmake/Modules/FindQwt.cmake
+++ b/cmake/Modules/FindQwt.cmake
@@ -21,7 +21,7 @@ find_path(QWT_INCLUDE_DIRS
)
find_library (QWT_LIBRARIES
- NAMES qwt qwt6 qwt-qt4
+ NAMES qwt6 qwt qwt-qt4
HINTS
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
@@ -56,4 +56,4 @@ if(QWT_FOUND)
include ( FindPackageHandleStandardArgs )
find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS )
MARK_AS_ADVANCED(QWT_LIBRARIES QWT_INCLUDE_DIRS)
-endif(QWT_FOUND)
\ No newline at end of file
+endif(QWT_FOUND)
diff --git a/gr-analog/python/analog/CMakeLists.txt b/gr-analog/python/analog/CMakeLists.txt
index 2da8273..bcbedff 100644
--- a/gr-analog/python/analog/CMakeLists.txt
+++ b/gr-analog/python/analog/CMakeLists.txt
@@ -45,7 +45,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-atsc/python/atsc/CMakeLists.txt b/gr-atsc/python/atsc/CMakeLists.txt
index a26df35..a03cad4 100644
--- a/gr-atsc/python/atsc/CMakeLists.txt
+++ b/gr-atsc/python/atsc/CMakeLists.txt
@@ -49,7 +49,7 @@ install(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-channels/python/channels/CMakeLists.txt b/gr-channels/python/channels/CMakeLists.txt
index 0e36b94..e2e0286 100644
--- a/gr-channels/python/channels/CMakeLists.txt
+++ b/gr-channels/python/channels/CMakeLists.txt
@@ -42,7 +42,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-digital/python/digital/CMakeLists.txt b/gr-digital/python/digital/CMakeLists.txt
index 091bd88..871445c 100644
--- a/gr-digital/python/digital/CMakeLists.txt
+++ b/gr-digital/python/digital/CMakeLists.txt
@@ -71,7 +71,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-filter/python/filter/CMakeLists.txt b/gr-filter/python/filter/CMakeLists.txt
index e83e6dd..c08b11f 100644
--- a/gr-filter/python/filter/CMakeLists.txt
+++ b/gr-filter/python/filter/CMakeLists.txt
@@ -37,7 +37,8 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS
+ "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-pager/python/pager/CMakeLists.txt b/gr-pager/python/pager/CMakeLists.txt
index 899c62e..863583e 100644
--- a/gr-pager/python/pager/CMakeLists.txt
+++ b/gr-pager/python/pager/CMakeLists.txt
@@ -35,7 +35,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt
index 8fcbac6..270011d 100644
--- a/gr-qtgui/python/qtgui/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/CMakeLists.txt
@@ -32,7 +32,8 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS
+ "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-trellis/python/trellis/CMakeLists.txt b/gr-trellis/python/trellis/CMakeLists.txt
index b4223af..1f02910 100644
--- a/gr-trellis/python/trellis/CMakeLists.txt
+++ b/gr-trellis/python/trellis/CMakeLists.txt
@@ -35,7 +35,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-vocoder/python/vocoder/CMakeLists.txt b/gr-vocoder/python/vocoder/CMakeLists.txt
index ca8323d..82fa0e3 100644
--- a/gr-vocoder/python/vocoder/CMakeLists.txt
+++ b/gr-vocoder/python/vocoder/CMakeLists.txt
@@ -36,7 +36,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/gr-wavelet/python/wavelet/CMakeLists.txt b/gr-wavelet/python/wavelet/CMakeLists.txt
index bb88c50..e988441 100644
--- a/gr-wavelet/python/wavelet/CMakeLists.txt
+++ b/gr-wavelet/python/wavelet/CMakeLists.txt
@@ -33,7 +33,7 @@ GR_PYTHON_INSTALL(
if(ENABLE_TESTING)
set(GR_TEST_TARGET_DEPS "")
- set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/volk/lib")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
)
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index dbebac0..4176599 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -464,6 +464,7 @@ if(Boost_FOUND)
)
target_link_libraries(test_all volk ${Boost_LIBRARIES})
add_test(qa_volk_test_all test_all)
-
+ set_tests_properties(qa_volk_test_all PROPERTIES ENVIRONMENT
+ "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH")
endif(Boost_FOUND)
--
1.8.5.3
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio