Thank you very much Vasil for your response.

I already had that. But I keep getting the same problemI was looking at
module as an example
https://github.com/kit-cel/gr-specest/blob/master/lib/CMakeLists.txt

However, in this example I need to remove this line; otherwise I get error.
But I still can use Armadillo without having this line.
https://github.com/kit-cel/gr-specest/blob/fe599836c38e2a858c1ae0703ebd006a2fe9edae/CMakeLists.txt#L149

I do have some undefined symbols. Any advice of how to fix that?
ldd -r build/lib/lib*.so
             undefined symbol: wrapper2_dgesdd_
(build/lib/libgnuradio-bcsi.so)
             undefined symbol: wrapper2_dgesvd_
(build/lib/libgnuradio-bcsi.so)
    ldd -r build/swig/*_swig.so
           undefined symbol: wrapper2_dgesdd_
(/home/laura/Documents/BCSI/ASK-FM0/gr-bcsi/build/lib/libgnuradio-bcsi-1.0.0git.so.0.0.0)
           undefined symbol: wrapper2_dgesvd_
(/home/laura/Documents/BCSI/ASK-FM0/gr-bcsi/build/lib/libgnuradio-bcsi-1.0.0git.so.0.0.0)



target_link_libraries(gnuradio-bcsi
    ${ARMADILLO_LIBRARIES}
    ${LAPACK_LIBRARIES}
    ${BLAS_LIBRARIES}
)

On Thu, Feb 6, 2020 at 10:38 AM Vasil Velichkov <vvvelich...@gmail.com>
wrote:

> Hi Laura,
>
> On 06/02/2020 20.16, Laura Arjona wrote:
> > Whenever I try to use the *pinv* function inside  my OOT block, I get the
> > error :  *AttributeError: 'module' object has no attribute 'cca_update'*
> > I just comment the line about the pinv, and no error appears.
>
> One of the possible reasons for this error is that you are not linking the
> library where the pinv function is implemented.
>
> > *CMakeLists.txt file in my OOT Module*
> > ########################################################################
> > # Find gnuradio build dependencies
> > ########################################################################
> > find_package(BLAS REQUIRED)
> > find_package(LAPACK REQUIRED)
> > message(STATUS "LAPACK libraries: ${LAPACK_LIBRARIES}")
> > message(STATUS "BLAS libraries: ${BLAS_LIBRARIES}")
> > find_package(Armadillo)
>
> You need to link the LAPACK and/or BLAS libraries to your OOT module. In
> lib/CMakeLists.txt you should have something like
>
>     target_link_libraries(<oot_module_name> ${LAPACK_LIBRARIES}
> ${BLAS_LIBRARIES} ...)
>
> Replace <oot_module_name> with the name of your OOT module.
>
> And after rebuilding make sure there are not undefined symbols in the
> shared objects
>
>     ldd -r build/lib/lib*.so
>     ldd -r build/swig/*_swig.so
>
> Regards,
> Vasil
>


-- 
*Laura Arjona *
Washington Research Foundation Innovation Postdoctoral Fellow in
Neuroengineering

*Paul G. Allen School of Computer Science & Engineering*
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350

Reply via email to