ericssonresearch / calvin-constrained Goto Github PK
View Code? Open in Web Editor NEWC based implementation of Calvin runtime for constrained devices
License: Apache License 2.0
C based implementation of Calvin runtime for constrained devices
License: Apache License 2.0
Hello,
I am compiling the calvin-constrained with CoAP client and it fails. I am facing below-mentioned issues.
pkg-config
command could not set the values for CC_FLAGS, CC_LDFLAGS, and CC_LIBS for libcoap package.As I could not locate the libcoap package by default, I installed it manually but I am not sure what to put into the .pc file for libcoap to make pkg-config command succeed.
libcoap Package installed : libcoap-1-0:amd64 4.1.2-1 amd64 C-Implementation of CoAP
List of files owned by the package:
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libcoap-1.so.0.0.0
/usr/share
/usr/share/doc
/usr/share/doc/libcoap-1-0
/usr/share/doc/libcoap-1-0/CONTRIBUTE.gz
/usr/share/doc/libcoap-1-0/TODO
/usr/share/doc/libcoap-1-0/changelog.Debian.gz
/usr/share/doc/libcoap-1-0/copyright
/usr/lib/x86_64-linux-gnu/libcoap-1.so.0
Compilation Log:
$ make -f runtime/south/platform/x86/Makefile LIBCOAP=1 CONFIG="runtime/south/platform/x86/cc_config_x86_coap.h"
Renaming mp_decode_uint in msgpuck/msgpuck.h
Package libcoap-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing libcoap-1.pc' to the PKG_CONFIG_PATH environment variable No package 'libcoap-1' found Package libcoap-1 was not found in the pkg-config search path. Perhaps you should add the directory containing
libcoap-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcoap-1' found
Package libcoap-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcoap-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcoap-1' found
Building calvin
gcc main.c runtime/south/platform/x86/cc_platform_x86.c runtime/south/transport/socket/cc_transport_socket.c runtime/south/platform/x86/calvinsys/cc_test_gpio.c runtime/south/platform/x86/calvinsys/cc_test_temperature.c runtime/south/platform/x86/calvinsys/cc_libcoap_client.c cc_api.c runtime/north/cc_common.c runtime/north/scheduler/np_scheduler/cc_scheduler.c runtime/north/cc_node.c runtime/north/cc_proto.c runtime/north/cc_transport.c runtime/north/cc_tunnel.c runtime/north/cc_link.c runtime/north/cc_actor_store.c runtime/north/cc_actor.c runtime/north/cc_port.c runtime/north/cc_fifo.c runtime/north/cc_token.c runtime/north/cc_app_manager.c msgpuck/msgpuck.c runtime/north/coder/cc_coder_msgpuck.c calvinsys/cc_calvinsys.c calvinsys/common/cc_calvinsys_timer.c calvinsys/common/cc_calvinsys_attribute.c calvinsys/common/cc_calvinsys_schedule.c jsmn/jsmn.c actors/sensor/cc_actor_accelerometer.c actors/sensor/cc_actor_coap_source.c actors/sensor/cc_actor_triggered_temperature.c actors/sensor/cc_actor_soil_moisture.c actors/sensor/cc_actor_temperature_tagged.c actors/sensor/cc_actor_temperature.c actors/sensor/cc_actor_gyroscope.c actors/io/cc_actor_light.c actors/io/cc_actor_button.c actors/io/cc_actor_log.c actors/std/cc_actor_counttimer.c actors/std/cc_actor_identity.c actors/context/cc_actor_registry_attribute.c actors/test/cc_actor_replica_identity.c actors/media/cc_actor_camera.c -o calvin_c -Wall -Os -fdata-sections -ffunction-sections -I. -DCC_USE_FDS=1 -DCC_USE_LIBCOAP_CLIENT=1 -DCC_CONFIGFILE_H=""runtime/south/platform/x86/cc_config_x86_coap.h"" -Wl,--gc-sections
runtime/south/transport/socket/cc_transport_socket.c: In function ‘cc_transport_socket_create’:
runtime/south/transport/socket/cc_transport_socket.c:362:47: warning: ‘:’ directive writing 1 byte into a region of size between 0 and 39 [-Wformat-overflow=]
sprintf(transport_client->uri, "calvinip://%s:%d", transport_socket->ip, transport_socket->port);
^
In file included from /usr/include/stdio.h:862:0,
from runtime/south/transport/socket/cc_transport_socket.c:16:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 14 and 63 bytes into a destination of size 50
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
runtime/south/platform/x86/calvinsys/cc_libcoap_client.c:26:10: fatal error: coap/coap.h: No such file or directory
#include <coap/coap.h>
^~~~~~~~~~~~~
compilation terminated.
runtime/north/cc_app_manager.c: In function ‘cc_app_manager_load_script’:
runtime/north/cc_app_manager.c:241:17: warning: implicit declaration of function ‘cc_platform_file_read’; did you mean ‘cc_platform_mem_free’? [-Wimplicit-function-declaration]
if ((result = cc_platform_file_read(script, &file_buffer, &size)) != CC_SUCCESS) {
^~~~~~~~~~~~~~~~~~~~~
cc_platform_mem_free
actors/std/cc_actor_counttimer.c: In function ‘cc_actor_counttimer_fire’:
actors/std/cc_actor_counttimer.c:315:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (cc_actor_counttimer_stop(actor))
^~
actors/std/cc_actor_counttimer.c:318:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
return fired;
^~~~~~
runtime/south/platform/x86/Makefile:37: recipe for target 'calvin' failed
make: *** [calvin] Error 1
$
Could you please correct me if I am not following the right procedure to compile with coap client as compilation does not work for me out of the box.
Looking for your support.
Thanks!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.