Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on Fedora 32 (beta) #2

Open
jawatson opened this issue Mar 31, 2020 · 1 comment
Open

Building on Fedora 32 (beta) #2

jawatson opened this issue Mar 31, 2020 · 1 comment
Assignees

Comments

@jawatson
Copy link

I had a problem compiling the API3+RSPduo branch Fedora 32 (beta), using cmake version 3.17.0. The results of my initial attempts using cmake and make are shown below;

[jwatson@merlin build]$ cmake ..
-- Build type not specified: defaulting to release.
-- LIBSDRPLAY_INCLUDE_DIRS - /usr/local/include
-- LIBSDRPLAY_LIBRARIES - /usr/local/lib/libsdrplay_api.so
-- Module sdrPlaySupport configured with version: 0.3.0-9746de2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jwatson/develop/SoapySDRPlay/build
[jwatson@merlin build]$ make
Scanning dependencies of target sdrPlaySupport
[ 16%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Registration.cpp.o
[ 33%] Building CXX object CMakeFiles/sdrPlaySupport.dir/sdrplay_api.cpp.o
[ 50%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Settings.cpp.o
[ 66%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Streaming.cpp.o
[ 83%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Version.cpp.o
[100%] Linking CXX shared module libsdrPlaySupport.so
/usr/bin/ld: CMakeFiles/sdrPlaySupport.dir/Streaming.cpp.o: in function `SoapySDRPlay::acquireReadBuffer(SoapySDR::Stream*, unsigned long&, void const**, int&, long long&, long)':
Streaming.cpp:(.text+0xa9d): undefined reference to `pthread_cond_clockwait'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/sdrPlaySupport.dir/build.make:163: libsdrPlaySupport.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:93: CMakeFiles/sdrPlaySupport.dir/all] Error 2
make: *** [Makefile:147: all] Error 2
[jwatson@merlin build]$

I re-ran with make VERBOSE=1 and didn't see any pthread flags so following on from this StackOverflow post I added the following lines to CMakeLists.txt and the library now compiles;

set(CMAKE_LINKER_FLAGS "-pthread" CACHE STRING "Linker Flags" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_LINKER_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_LINKER_FLAGS}" CACHE STRING "" FORCE)
[jwatson@merlin build]$ cmake ..
-- Build type not specified: defaulting to release.
-- LIBSDRPLAY_INCLUDE_DIRS - /usr/local/include
-- LIBSDRPLAY_LIBRARIES - /usr/local/lib/libsdrplay_api.so
-- Module sdrPlaySupport configured with version: 0.3.0-9746de2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jwatson/develop/SoapySDRPlay/build
[jwatson@merlin build]$ make clean && make
Scanning dependencies of target sdrPlaySupport
[ 16%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Registration.cpp.o
[ 33%] Building CXX object CMakeFiles/sdrPlaySupport.dir/sdrplay_api.cpp.o
[ 50%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Settings.cpp.o
[ 66%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Streaming.cpp.o
[ 83%] Building CXX object CMakeFiles/sdrPlaySupport.dir/Version.cpp.o
[100%] Linking CXX shared module libsdrPlaySupport.so
[100%] Built target sdrPlaySupport
[jwatson@merlin build]$ 
@fventuri
Copy link
Owner

Thanks @jawatson for this report.
I apologize that I didn't see up until now.
A month or so ago I moved all the development of this module here: https://github.com/SDRplay/SoapySDRPlay, and I forgot to update the README here about this move (I just did do that).

Anyway, I am on Fedora 32 too now (I upgraded from 31 to 32 a couple of weeks ago, I think); I just tried to compile it, and I seeing the same error.

Tomorrow morning I'll look into this bug, and I'll push a fix in the repository I mentioned above.

Thanks for reporting it and also many thanks for suggesting how to fix it.
Franco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants