The problem was, of course, mine

I had  wrong line in my cmake. With libuhd 3.10.3 I had the line

set(MY_STATIC_LIB -Wl,--whole-archive ${UHD_STATIC}
-Wl,--no-whole-archive ${DL_STATIC})

while for libuhd 3.15

set(MY_STATIC_LIB -Wl,--whole-archive ${UHD_STATIC} -Wl,-no-whole-archive)

However I have proposal for a fix for the CMkeFiles of libuhd 3.15. I
don't know if it is the case to discuss it here, or directly with 
developer.

If  developer or a moderator will read this mail, please let me know.

Thank you in advance

Paolo


On 5/12/21 10:38 AM, Paolo Palana wrote:
>
> Hi to all the mailing list.
>
> I'm trying to compile libuhd-3.15 in order to get the static version
> of this library, but I've problems. The platform I'm using in ubuntu
> 18.04 x86_64
>
> the cmake command I use is: cmake -DENABLE_STATIC_LIBS=ON
> -DENABLE_LIBERIO=OFF -DENABLE_USB=OFF -DENABLE_B100=OFF
> -DENABLE_B200=OFF -DENABLE_E300=OFF -DENABLE_USRP1=OFF
> -DENABLE_USRP2=OFF -DENABLE_N230=OFF -DENABLE_MPMD=OFF
> -DENABLE_E320=OFF -DENABLE_OCTOCLOCK=OFF -DENABLE_DPDK=OFF ../
>
> The compilation process seems to be ok, but I get from the linker the
> error: /usr/lib/x86_64-linux-gnu/libboost_filesystem.a(operations.o):
> relocation R_X86_64_PC32 against symbol ......
>
> If I run the command VERBOSE=1 make I can see that the linker command
> issued to  generate of libuhd.so try to link libbost_*.a files in
> order to genertate the libuhd.so file. To be plain I'm not very
> familiar with this kind of problems, but I think this is not correct.
> I did many try and guess to solve the issue and I found that
> commenting the line set(Boost_USE_STATIC_LIBS ${ENABLE_STATIC_LIBS})
> in cmake/Modules/UHDBoost.cmake seems to solve the problem, both
> libuhd.so and libuhd.a are generated.
>
> But now another problem arise, when I compile my static application I
> get other link errors like:
>
> usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libdl.a(dlerror.o):
> In function `dlerror':
> (.text+0x1): undefined reference to `__dlerror'
>
> Because the same application is succesfully compiled on the same
> system (so system libraries are exactly the same) using libuhd 3.10.3
> I think these errors could be related with something wrong I did in
> compiling libuhd-3.15. Of course every time I need to change libuhd
> version I uninstall (through make uninstall) the undesired library.
>
> So my question is, what is wrong with libuhd-3.15 or, better, what I
> did wrong?
>
> Thank you for your kindness.
>
> Paolo
>
>
>
>
> _______________________________________________
> USRP-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]


_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to