[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[wakaama-dev] Building and running tests
|
Hi,
I am trying to build and run the test program so I can start to understand the current tests and add to them.
Currently I have followed these steps.
- Created a test directory outside of wakaama
- Ran "cmake ../wakaama/tests
- Ran "make"
- I get an error that stats I need to declare std=c99
- I add the declaration in the Cmake file
- Run "make" again
- It errors out again and I can't troubleshoot the log. I've attached it
- Am I missing some dependency?
Cheers,
Danny
[ 4%] Building C object CMakeFiles/lwm2munittests.dir/home/danny/Bitbucket/wakaama/examples/shared/connection.c.o
/home/danny/Bitbucket/wakaama/examples/shared/connection.c: In function ‘create_socket’:
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:30:21: error: storage size of ‘hints’ isn’t known
struct addrinfo hints;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:37:22: error: ‘AI_PASSIVE’ undeclared (first use in this function)
hints.ai_flags = AI_PASSIVE;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:37:22: note: each undeclared identifier is reported only once for each function it appears in
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:39:5: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
if (0 != getaddrinfo(NULL, portStr, &hints, &res))
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:44:47: error: dereferencing pointer to incomplete type
for(p = res ; p != NULL && s == -1 ; p = p->ai_next)
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:46:21: error: dereferencing pointer to incomplete type
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:46:35: error: dereferencing pointer to incomplete type
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:46:51: error: dereferencing pointer to incomplete type
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:49:32: error: dereferencing pointer to incomplete type
if (-1 == bind(s, p->ai_addr, p->ai_addrlen))
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:49:44: error: dereferencing pointer to incomplete type
if (-1 == bind(s, p->ai_addr, p->ai_addrlen))
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:57:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
freeaddrinfo(res);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:30:21: warning: unused variable ‘hints’ [-Wunused-variable]
struct addrinfo hints;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c: In function ‘connection_create’:
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:107:21: error: storage size of ‘hints’ isn’t known
struct addrinfo hints;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:123:52: error: dereferencing pointer to incomplete type
for(p = servinfo ; p != NULL && s == -1 ; p = p->ai_next)
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:125:21: error: dereferencing pointer to incomplete type
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:125:35: error: dereferencing pointer to incomplete type
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:125:51: error: dereferencing pointer to incomplete type
s = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:128:19: error: dereferencing pointer to incomplete type
sa = p->ai_addr;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:129:19: error: dereferencing pointer to incomplete type
sl = p->ai_addrlen;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:130:35: error: dereferencing pointer to incomplete type
if (-1 == connect(s, p->ai_addr, p->ai_addrlen))
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:130:47: error: dereferencing pointer to incomplete type
if (-1 == connect(s, p->ai_addr, p->ai_addrlen))
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:107:21: warning: unused variable ‘hints’ [-Wunused-variable]
struct addrinfo hints;
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c: In function ‘lwm2m_buffer_send’:
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:206:34: warning: unused parameter ‘userdata’ [-Wunused-parameter]
void * userdata)
^
/home/danny/Bitbucket/wakaama/examples/shared/connection.c: In function ‘lwm2m_session_is_equal’:
/home/danny/Bitbucket/wakaama/examples/shared/connection.c:227:36: warning: unused parameter ‘userData’ [-Wunused-parameter]
void * userData)
^
CMakeFiles/lwm2munittests.dir/build.make:606: recipe for target 'CMakeFiles/lwm2munittests.dir/home/danny/Bitbucket/wakaama/examples/shared/connection.c.o' failed
make[2]: *** [CMakeFiles/lwm2munittests.dir/home/danny/Bitbucket/wakaama/examples/shared/connection.c.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/lwm2munittests.dir/all' failed
make[1]: *** [CMakeFiles/lwm2munittests.dir/all] Error 2
Makefile:86: recipe for target 'all' failed
make: *** [all] Error 2