Just been spending some time trying to get some stuff going for testing GDB, when running I get:
root@beaglebone:~/TestGDB# ./TestGDB
./TestGDB: symbol lookup error: /usr/xenomai/lib/libalchemy.so.0: undefined symbol: threadobj_tskey
Any ideas on that one?
code:
/*
* TestGDB.cpp
*
* Created on: 22 Nov 2016
* Author: andrewcapon
*/
#include <sys/mman.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <stdarg.h>
//#include <Bela.h>
#include <native/task.h>
#include <rtdk.h>
RT_TASK first_task;
RT_TASK second_task;
const char n1[] = "first";
const char n2[] = "second";
void second_task_body(void* cookie)
{
rt_printf((const char *) "test");
while (1)
{
rt_printf((const char *) "Info: In %s task\n", (char*) cookie);
rt_task_sleep(10000000);
}
}
void first_task_body(void* cookie)
{
int err = rt_task_spawn(&second_task, n2, 0, 2, 0, second_task_body,(void*) n2);
while (!err)
{
rt_printf("Info: In %s task\n", (char*) cookie);
rt_task_sleep(10000000);
}
}
int main(void)
{
int err;
mlockall(MCL_CURRENT | MCL_FUTURE);
rt_print_auto_init(1);
err = rt_task_spawn(&first_task, n1, 0, 3, 0, first_task_body, (void*) n1);
if (!err)
{
while (1)
{
rt_printf("Info: In linux task\n");
sleep(1);
}
}
return err;
}
building with :
08:26:23 **** Incremental Build of configuration Debug for project TestGDB ****
make all
Building file: ../TestGDB.cpp
Invoking: Cross G++ Compiler
arm-linux-gnueabihf-g++ -std=c++0x -D__XENO_COMPAT__ -D_GNU_SOURCE -D__COBALT__ -I/Development/bela_4.4/xenomai/include/alchemy -I/Development/bela_4.4/xenomai/include/trank -I/Development/bela_4.4/xenomai/include/ -I/Development/bela_4.4/xenomai/include/cobalt -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"TestGDB.d" -MT"TestGDB.o" -o "TestGDB.o" "../TestGDB.cpp"
Finished building: ../TestGDB.cpp
Building target: TestGDB
Invoking: Cross G++ Linker
arm-linux-gnueabihf-g++ -L/Development/bela_4.4/xenomai/lib -pthread -rdynamic -Wl,-unresolved-symbols=ignore-in-shared-libs -o "TestGDB" ./TestGDB.o -ltrank -lcobalt -lalchemy
Finished building target: TestGDB
08:26:23 Build Finished (took 334ms)