Thursday, October 17, 2024

Error on trying to install an OOT

I'm not sure this is where I should be asking this question but here goes.
 
To anyone that is wondering I just upgraded to Bookworm on my Pi and installed GNURadio 3.10.5.1. ( This was the subject of much discussion recently)
 
I am attempting to install an OOT module from my existing project because it does not show in the flowgraph. I assume that I need to perform 'sudo make install' to load it into the new GNURadio. Perhaps this is not a correct assumption.
 
However, when I perform the command I get an error which is spelled out in the error log below.
 
What do I need to do here?
 
Jim
 
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/pi/gr-freq/build/CMakeFiles/CMakeTmp
 
Run Build Command(s):/usr/bin/gmake cmTC_15004/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_15004.dir/build.make CMakeFiles/cmTC_15004.dir/build
gmake[1]: Entering directory '/home/pi/gr-freq/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_15004.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD -std=gnu11 -o CMakeFiles/cmTC_15004.dir/src.c.o -c /home/pi/gr-freq/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_15004
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_15004.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_15004.dir/src.c.o -o cmTC_15004
/usr/bin/ld: CMakeFiles/cmTC_15004.dir/src.c.o: in function `main':
src.c:(.text+0x40): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x4c): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x58): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text+0x68): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_15004.dir/build.make:106: cmTC_15004] Error 1
gmake[1]: Leaving directory '/home/pi/gr-freq/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_15004/fast] Error 2
 
 
Source file was:
#include <pthread.h>
 
void* test_func(void* data)
{
  return data;
}
 
int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);
 
  return 0;
}
 
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/pi/gr-freq/build/CMakeFiles/CMakeTmp
 
Run Build Command(s):/usr/bin/gmake cmTC_75010/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_75010.dir/build.make CMakeFiles/cmTC_75010.dir/build
gmake[1]: Entering directory '/home/pi/gr-freq/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_75010.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create -std=gnu11 -o CMakeFiles/cmTC_75010.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.18/Modules/CheckFunctionExists.c
Linking C executable cmTC_75010
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_75010.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_75010.dir/CheckFunctionExists.c.o -o cmTC_75010  -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_75010.dir/build.make:106: cmTC_75010] Error 1
gmake[1]: Leaving directory '/home/pi/gr-freq/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_75010/fast] Error 2

Virus-free.www.avg.com

No comments:

Post a Comment