Skip to content

Добавить зависимость на Threads при сборке#4

Open
Pmmlabs wants to merge 2 commits intostrijar:mainfrom
Pmmlabs:threads-cmake
Open

Добавить зависимость на Threads при сборке#4
Pmmlabs wants to merge 2 commits intostrijar:mainfrom
Pmmlabs:threads-cmake

Conversation

@Pmmlabs
Copy link

@Pmmlabs Pmmlabs commented Mar 19, 2026

На Debian 10 сборка падает с ошибкой:

[ 10%] Building C object CMakeFiles/rnode.dir/sx126x/sx126x.c.o
[ 20%] Linking C executable rnode
/usr/bin/ld: CMakeFiles/rnode.dir/src/queue.c.o: in function `queue_init':
queue.c:(.text+0x25c): undefined reference to `pthread_create'
/usr/bin/ld: queue.c:(.text+0x264): undefined reference to `pthread_detach'
/usr/bin/ld: CMakeFiles/rnode.dir/sx126x/sx126x.c.o: in function `sx126x_init_dio1':
sx126x.c:(.text+0xdb8): undefined reference to `pthread_create'
/usr/bin/ld: sx126x.c:(.text+0xdc0): undefined reference to `pthread_detach'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rnode.dir/build.make:204: rnode] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/rnode.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

После добавления Threads в список библиотек для линковки ошибка исчезла и сборка прошла успешно

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

Successfully merging this pull request may close these issues.

1 participant