Azure-Samples / iot-hub-c-raspberrypi-client-app

Application collects weather data from a BME280 sensor and sends it to IoT hub, also take actions according to cloud-to-device message, device management.
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-kit-c-get-started
MIT License
36 stars 34 forks source link

fatal error: azure_c_shared_utility/xlogging.h: No such file or directory #22

Open Shachar1 opened 6 years ago

Shachar1 commented 6 years ago

When running sudo ./setup.sh I'm getting the following error - fatal error: azure_c_shared_utility/xlogging.h: No such file or directory I'm guessing the azure_c_shared_utility should be part of the build but I don't see it in the walk through

SLdragon commented 6 years ago

Hi, @Shachar1 Can you give us some detailed information about your system version and full error logs? If the setup script is not work for your system, you can try to install the sdk manually, the tutorial can be found here: https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/devbox_setup.md#set-up-a-linux-development-environment

Thanks

Hantse commented 6 years ago

Hello,

I have the same problems :x

lakshmisivareddy commented 6 years ago

[ 20%] Building C object CMakeFiles/app.dir/main.c.o /home/pi/IOT/iot-hub-c-raspberrypi-client-app/main.c:9:45: fatal error: azure_c_shared_utility/xlogging.h: No such file or directory

include <azure_c_shared_utility/xlogging.h>

                                         ^

compilation terminated. CMakeFiles/app.dir/build.make:62: recipe for target 'CMakeFiles/app.dir/main.c.o' failed make[2]: [CMakeFiles/app.dir/main.c.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/app.dir/all' failed make[1]: [CMakeFiles/app.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

ozeltser commented 6 years ago

[ 20%] Building C object CMakeFiles/app.dir/main.c.o /home/xxx/iot-hub-c-raspberrypi-client-app/main.c:9:45: fatal error: azure_c_shared_utility/xlogging.h: No such file or directory

include <azure_c_shared_utility/xlogging.h>

                                         ^

compilation terminated. CMakeFiles/app.dir/build.make:62: recipe for target 'CMakeFiles/app.dir/main.c.o' failed make[2]: [CMakeFiles/app.dir/main.c.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/app.dir/all' failed make[1]: [CMakeFiles/app.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

lakshmisivareddy commented 6 years ago

i am able to fix the problem after doing some changes like copying files & libraries in /usr/local/lib/,/usr/local/include & some changes in iothub_clent( CmakeList.txt)

matskeel commented 6 years ago

@lakshmisivareddy Can you explain which files & libraries you have copied? And what modification you have made to the CMakeList.txt file?

Thank you

lakshmisivareddy commented 6 years ago

my /usr/local/lib snap short
1) check all the libraries are present in your /usr/local/lib if not copy libraries from location /home/pi/Source/azure-iot-sdk-c/cmake/iotsdk_linux

-rw-r--r-- 1 root staff 373338 May 23 10:26 libaziotsharedutil.a -rw-r--r-- 1 root staff 236826 May 24 06:02 libiothub_client.a -rw-r--r-- 1 root staff 367726 May 24 06:00 libiothub_client_amqp_transport.a -rw-r--r-- 1 root staff 369180 May 24 05:58 libiothub_client_amqp_ws_transport.a -rw-r--r-- 1 root staff 73186 May 24 06:01 libiothub_client_http_transport.a -rw-r--r-- 1 root staff 92382 May 24 05:56 libiothub_client_mqtt_transport.a -rw-r--r-- 1 root staff 92912 May 24 06:01 libiothub_client_mqtt_ws_transport.a -rw-r--r-- 1 root staff 141008 May 24 05:55 libiothub_service_client.a -rw-r--r-- 1 root staff 43368 May 24 05:50 libparson.a -rw-r--r-- 1 root staff 260786 May 24 06:03 libserializer.a -rw-r--r-- 1 root staff 47620 May 23 10:24 libumqtt.a lrwxrwxrwx 1 root staff 22 May 24 06:06 libwiringPiDev.so -> libwiringPiDev.so.2.46 -rwxr-xr-x 1 root staff 28188 May 24 06:06 libwiringPiDev.so.2.46 lrwxrwxrwx 1 root staff 19 May 24 06:06 libwiringPi.so -> libwiringPi.so.2.46 -rwxr-xr-x 1 root staff 70184 May 24 06:06 libwiringPi.so.2.46 drwxrwsr-x 3 root staff 4096 Apr 18 00:52 pypy2.7 drwxrwsr-x 4 root staff 4096 Apr 18 00:26 python2.7 drwxrwsr-x 3 root staff 4096 Apr 18 00:18 python3.5

2) i copied internal folder from /home/pi/Source/azure-iot-sdk-c/iothub_client/inc to /usr/local/include/azureiot

3) in /home/pi/Source/azure-iot-sdk-c/iothub_client/CMakeLists.txt file set(iothub_client_c_files ./src/iothub_client.c ./src/iothub_client_core.c ./src/iothub_client_core_ll.c ./src/iothub_client_diagnostic.c ./src/iothub_client_ll.c ./src/iothub_device_client.c ./src/iothub_device_client_ll.c ./src/iothub_message.c ./src/iothubtransport.c ./src/version.c ../deps/parson/parson.c

)

set(iothub_client_h_files ./inc/iothub_client_core.h ./inc/iothub_client_core_ll.h ./inc/iothub_client.h ./inc/internal/iothub_client_common.h ./inc/iothub_client_ll.h ./inc/internal/iothub_client_diagnostic.h ./inc/iothub_client_options.h ./inc/internal/iothub_client_private.h ./inc/iothub_client_version.h ./inc/iothub_device_client.h ./inc/iothub_device_client_ll.h ./inc/iothub_transport_ll.h ./inc/iothub_message.h ./inc/internal/iothubtransport.h ../deps/parson/parson.h )

i added parson.h & parson.c files

aepsicom commented 5 years ago

hi , I was following this steps https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-kit-c-get-started after this sudo ./setup.sh I got this error : pipi@raspberrypi:~/iot-hub-c-raspberrypi-client-app $ sudo ./setup.sh Hit:1 https://deb.nodesource.com/node_11.x stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Hit:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Reading package lists... Done
Reading package lists... Done Building dependency tree
Reading state information... Done Package 'libssl-dev' is not installed, so not removed The following packages were automatically installed and are no longer required: gyp libc-ares2 libhttp-parser2.8 libjs-inherits libjs-node-uuid libssl-doc libuv1-dev nodejs-doc Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Reading package lists... Done Building dependency tree
Reading state information... Done build-essential is already the newest version (12.3). cmake is already the newest version (3.7.2-1). curl is already the newest version (7.52.1-5+deb9u8). git is already the newest version (1:2.11.0-3+deb9u4). libcurl4-openssl-dev is already the newest version (7.52.1-5+deb9u8). libssl1.0-dev is already the newest version (1.0.2l-2+deb9u3). uuid-dev is already the newest version (2.29.2-1+deb9u1). The following packages were automatically installed and are no longer required: gyp libc-ares2 libhttp-parser2.8 libjs-inherits libjs-node-uuid libssl-doc libuv1-dev nodejs-doc Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. mkdir: cannot create directory 'Source': File exists fatal: destination path 'azure-iot-sdk-c' already exists and is not an empty directory. ~/Source/azure-iot-sdk-c/cmake/iotsdk_linux ~/Source/azure-iot-sdk-c/build_all/linux -- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- IoT Client SDK Version = 1.2.10 -- Provisioning client OFF -- Looking for include file stdint.h -- Looking for include file stdint.h - found -- Looking for include file stdbool.h -- Looking for include file stdbool.h - found -- target architecture: ARM -- Performing Test CXX_FLAG_CXX11 -- Performing Test CXX_FLAG_CXX11 - Success -- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libssl.so;/usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.0.2l") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") -- Checking for module 'libcurl' -- Found libcurl, version 7.52.1 -- Found CURL: curl
-- target architecture: ARM -- target architecture: ARM -- target architecture: ARM -- target architecture: ARM -- iothub architecture: ARM -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

run_valgrind
use_tpm_simulator

-- Build files have been written to: /root/Source/azure-iot-sdk-c/cmake/iotsdk_linux ~/Source/azure-iot-sdk-c/build_all/linux Scanning dependencies of target parson [ 0%] Building C object CMakeFiles/parson.dir/deps/parson/parson.c.o [ 1%] Linking C static library libparson.a [ 1%] Built target parson Scanning dependencies of target aziotsharedutil [ 1%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/base32.c.o [ 1%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/base64.c.o [ 2%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/buffer.c.o [ 2%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/connection_string_parser.c.o [ 3%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/constbuffer.c.o [ 3%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/consolelogger.c.o [ 4%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/crt_abstractions.c.o [ 4%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/constmap.c.o [ 5%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/doublylinkedlist.c.o [ 5%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gballoc.c.o [ 6%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gbnetwork.c.o [ 6%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gb_stdio.c.o [ 6%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gb_time.c.o [ 7%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gb_rand.c.o [ 7%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/hmac.c.o [ 8%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/hmacsha256.c.o [ 8%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/xio.c.o [ 9%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/singlylinkedlist.c.o [ 9%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/map.c.o [ 10%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sastoken.c.o [ 10%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sha1.c.o [ 11%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sha224.c.o [ 11%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sha384-512.c.o [ 11%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/strings.c.o [ 12%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/string_token.c.o [ 12%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/string_tokenizer.c.o [ 13%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/uuid.c.o [ 13%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/urlencode.c.o [ 14%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/usha.c.o [ 14%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/vector.c.o [ 15%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/xlogging.c.o [ 15%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/optionhandler.c.o [ 16%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/agenttime.c.o [ 16%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/condition_pthreads.c.o [ 16%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/lock_pthreads.c.o [ 17%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/platform_linux.c.o [ 17%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/socketio_berkeley.c.o [ 18%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/tickcounter_linux.c.o [ 18%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/threadapi_pthreads.c.o [ 19%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/uniqueid_linux.c.o [ 19%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/envvariable.c.o [ 20%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/linux_time.c.o [ 20%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/httpapiex.c.o [ 21%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/httpapiexsas.c.o [ 21%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/httpheaders.c.o [ 21%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/httpapi_curl.c.o [ 22%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/http_proxy_io.c.o [ 22%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/tlsio_openssl.c.o [ 23%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/x509_openssl.c.o [ 23%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/wsio.c.o [ 24%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/uws_client.c.o [ 24%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/uws_frame_encoder.c.o [ 25%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/utf8_checker.c.o [ 25%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/ws_url.c.o [ 26%] Linking C static library libaziotsharedutil.a [ 26%] Built target aziotsharedutil Scanning dependencies of target uamqp [ 27%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqp_definitions.c.o [ 27%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqp_frame_codec.c.o [ 28%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqp_management.c.o [ 28%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqpvalue.c.o [ 29%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqpvalue_to_string.c.o [ 29%] Building C object uamqp/CMakeFiles/uamqp.dir/src/async_operation.c.o [ 30%] Building C object uamqp/CMakeFiles/uamqp.dir/src/cbs.c.o [ 30%] Building C object uamqp/CMakeFiles/uamqp.dir/src/connection.c.o [ 31%] Building C object uamqp/CMakeFiles/uamqp.dir/src/frame_codec.c.o [ 31%] Building C object uamqp/CMakeFiles/uamqp.dir/src/header_detect_io.c.o [ 31%] Building C object uamqp/CMakeFiles/uamqp.dir/src/link.c.o [ 32%] Building C object uamqp/CMakeFiles/uamqp.dir/src/message.c.o [ 32%] Building C object uamqp/CMakeFiles/uamqp.dir/src/message_receiver.c.o [ 33%] Building C object uamqp/CMakeFiles/uamqp.dir/src/message_sender.c.o [ 33%] Building C object uamqp/CMakeFiles/uamqp.dir/src/messaging.c.o [ 34%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_anonymous.c.o [ 34%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_frame_codec.c.o [ 35%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_mechanism.c.o [ 35%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_server_mechanism.c.o [ 36%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_mssbcbs.c.o [ 36%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_plain.c.o [ 36%] Building C object uamqp/CMakeFiles/uamqp.dir/src/saslclientio.c.o [ 37%] Building C object uamqp/CMakeFiles/uamqp.dir/src/session.c.o [ 37%] Building C object uamqp/CMakeFiles/uamqp.dir/src/socket_listener_berkeley.c.o [ 38%] Linking C static library libuamqp.a [ 38%] Built target uamqp Scanning dependencies of target umqtt [ 38%] Building C object umqtt/CMakeFiles/umqtt.dir/src/mqtt_client.c.o [ 39%] Building C object umqtt/CMakeFiles/umqtt.dir/src/mqtt_codec.c.o [ 39%] Building C object umqtt/CMakeFiles/umqtt.dir/src/mqtt_message.c.o [ 40%] Linking C static library libumqtt.a [ 40%] Built target umqtt Scanning dependencies of target uhttp [ 40%] Building C object deps/uhttp/CMakeFiles/uhttp.dir/src/uhttp.c.o [ 41%] Linking C static library libuhttp.a [ 41%] Built target uhttp Scanning dependencies of target iothub_service_client [ 42%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_deviceconfiguration.c.o [ 42%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_devicemethod.c.o [ 43%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_devicetwin.c.o [ 43%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_messaging.c.o [ 44%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_messaging_ll.c.o [ 44%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_registrymanager.c.o [ 45%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_sc_version.c.o [ 45%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_service_client_auth.c.o [ 45%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/__/iothub_client/src/iothub_message.c.o [ 46%] Linking C static library libiothub_service_client.a [ 46%] Built target iothub_service_client Scanning dependencies of target iothub_client_mqtt_transport [ 46%] Building C object iothub_client/CMakeFiles/iothub_client_mqtt_transport.dir/src/iothub_client_authorization.c.o [ 47%] Building C object iothub_client/CMakeFiles/iothub_client_mqtt_transport.dir/src/iothub_client_retry_control.c.o [ 47%] Building C object iothub_client/CMakeFiles/iothub_client_mqtt_transport.dir/src/iothub_transport_ll_private.c.o [ 48%] Building C object iothub_client/CMakeFiles/iothub_client_mqtt_transport.dir/src/iothubtransport_mqtt_common.c.o [ 48%] Building C object iothub_client/CMakeFiles/iothub_client_mqtt_transport.dir/src/iothubtransportmqtt.c.o [ 49%] Linking C static library libiothub_client_mqtt_transport.a [ 49%] Built target iothub_client_mqtt_transport Scanning dependencies of target iothub_client_amqp_ws_transport [ 49%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothub_client_authorization.c.o [ 50%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothub_client_retry_control.c.o [ 50%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothub_transport_ll_private.c.o [ 51%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothubtransport_amqp_common.c.o virtual memory exhausted: Cannot allocate memory iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/build.make:134: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothubtransport_amqp_common.c.o' failed make[2]: [iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothubtransport_amqp_common.c.o] Error 1 CMakeFiles/Makefile2:1388: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/all' failed make[1]: [iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: [all] Error 2 [ 1%] Built target parson [ 26%] Built target aziotsharedutil [ 38%] Built target uamqp [ 40%] Built target umqtt [ 41%] Built target uhttp [ 46%] Built target iothub_service_client [ 49%] Built target iothub_client_mqtt_transport [ 50%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothubtransport_amqp_common.c.o virtual memory exhausted: Cannot allocate memory iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/build.make:134: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothubtransport_amqp_common.c.o' failed make[2]: [iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/src/iothubtransport_amqp_common.c.o] Error 1 CMakeFiles/Makefile2:1388: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/all' failed make[1]: [iothub_client/CMakeFiles/iothub_client_amqp_ws_transport.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: [all] Error 2 gcc version check pass (current:6.3.0,require:4.4.7) cmake version check pass (current:3.7.2,require:2.8.12) Cloning into 'wiringPi'... remote: Counting objects: 1177, done. remote: Compressing objects: 100% (980/980), done. remote: Total 1177 (delta 822), reused 212 (delta 142) Receiving objects: 100% (1177/1177), 369.48 KiB | 0 bytes/s, done. Resolving deltas: 100% (822/822), done. wiringPi Build script

WiringPi Library [UnInstall] [Compile] wiringPi.c [Compile] wiringSerial.c [Compile] wiringShift.c [Compile] piHiPri.c [Compile] piThread.c [Compile] wiringPiSPI.c [Compile] wiringPiI2C.c [Compile] softPwm.c [Compile] softTone.c wiringPi.c:1309:21: warning: 'digitalWrite8Dummy' defined but not used [-Wunused-function] static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct node, UNU int pin, UNU int value) { return ; } ^~~~~~ wiringPi.c:1308:21: warning: 'digitalRead8Dummy' defined but not used [-Wunused-function] static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct node, UNU int UNU pin) { return 0 ; } ^~~~~ [Compile] mcp23008.c [Compile] mcp23017.c [Compile] mcp23016.c [Compile] mcp23s08.c [Compile] mcp23s17.c [Compile] sr595.c [Compile] pcf8574.c [Compile] pcf8591.c [Compile] mcp3002.c [Compile] mcp3004.c [Compile] mcp4802.c [Compile] mcp3422.c [Compile] max31855.c [Compile] max5322.c [Compile] ads1115.c [Compile] sn3218.c [Compile] bmp180.c [Compile] htu21d.c [Compile] ds18b20.c [Compile] rht03.c [Compile] drcSerial.c [Compile] drcNet.c [Compile] pseudoPins.c [Compile] wpiExtensions.c [Link (Dynamic)] [Install Headers] [Install Dynamic Lib]

WiringPi Devices Library [UnInstall] [Compile] ds1302.c [Compile] maxdetect.c [Compile] piNes.c [Compile] gertboard.c [Compile] piFace.c [Compile] lcd128x64.c [Compile] lcd.c [Compile] scrollPhat.c [Compile] piGlow.c [Link (Dynamic)] [Install Headers] [Install Dynamic Lib]

GPIO Utility [Compile] gpio.c [Compile] readall.c [Link] [Install]

All Done.

NOTE: To compile programs with wiringPi, you need to add: -lwiringPi to your compile line(s) To use the Gertboard, MaxDetect, etc. code (the devLib), you need to also add: -lwiringPiDev to your compile line(s).

-- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/pi/iot-hub-c-raspberrypi-client-app Scanning dependencies of target app [ 20%] Building C object CMakeFiles/app.dir/main.c.o /home/pi/iot-hub-c-raspberrypi-client-app/main.c:9:45: fatal error: azure_c_shared_utility/xlogging.h: No such file or directory

include <azure_c_shared_utility/xlogging.h>

                                         ^

compilation terminated. CMakeFiles/app.dir/build.make:62: recipe for target 'CMakeFiles/app.dir/main.c.o' failed make[2]: [CMakeFiles/app.dir/main.c.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/app.dir/all' failed make[1]: [CMakeFiles/app.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

aepsicom commented 5 years ago

I have tried your solution but it is not working.

I could no replicate your first step , step1 location /home/pi/Source/azure-iot-sdk-c/cmake/iotsdk_linux couldn't find this cmake/iotsdk_linux couldn't find this libiothub_client.a in my whole raspberry sd ! step2 ,3 I could replicate I think the source below has changed ? https://github.com/Azure/azure-iot-sdk-c

jkatebin commented 5 years ago

For what it's worth I had similar issues. After looking at your code it seemed to reference stretch. I was running this on an old pi which was running jessie. After upgrading from raspbian jessie to stretch I re-ran the example (sudo ./setup.sh --simulated-data) and things started working much better. You might want to mention your [MS] code is targeting Stretch and either release a jessie version or recommend users upgrade prior to attempting it.

Alberto-Vega commented 5 years ago

Moving this issue here two more users facing this same issue @inesk-vt @kuriancjohn: Errors trying to run set up for the C IoT hub sample on Raspberri Pi - linking errors MicrosoftDocs/azure-docs#24308

yzhong94 commented 5 years ago

Hi everyone, please try again with the latest bits. I ran through it E2E and it was working fine now, thanks to the PR from @Alberto-Vega-MSFT

inesk-vt commented 5 years ago

Great, I will test drive in the morning! Thanks for the quick turn around 😊

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: yzhong94 notifications@github.com Sent: Tuesday, February 19, 2019 2:25:47 PM To: Azure-Samples/iot-hub-c-raspberrypi-client-app Cc: Ines Khelifi; Mention Subject: Re: [Azure-Samples/iot-hub-c-raspberrypi-client-app] fatal error: azure_c_shared_utility/xlogging.h: No such file or directory (#22)

Hi everyone, please try again with the latest bits. I ran through it E2E and it was working fine now, thanks to the PR from @Alberto-Vega-MSFThttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAlberto-Vega-MSFT&data=02%7C01%7C%7Cd90fe6fc4d794db322e708d696b93290%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636862119487614580&sdata=FRR2ttksheaosD8UEib9%2FqhN%2FSehVXgqQAD%2BbiRNGbw%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure-Samples%2Fiot-hub-c-raspberrypi-client-app%2Fissues%2F22%23issuecomment-465336302&data=02%7C01%7C%7Cd90fe6fc4d794db322e708d696b93290%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636862119487634603&sdata=NFPCB0TnjCpQTJ6sBusGWGWgG%2FWTbcT%2FI0LGyRCRGRc%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FArtjNuKIFjEAZgBU6NYeDxcWqMUCGjvfks5vPHnrgaJpZM4SesTf&data=02%7C01%7C%7Cd90fe6fc4d794db322e708d696b93290%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636862119487664608&sdata=qf%2F5wkt3YvVxZrOcOR%2Fy94r9MKPjnlpZ0DGRXeTggjY%3D&reserved=0.

inesk-vt commented 5 years ago

Thanks, it looks like the new drop does address the issue! Was able to get it building successfully and seems to be successfully sending data to IoT Hub.

There is one remaining issue - the app runs fine and data seems to flow to Hub, but it does output this ignorable (?) error to the console:

pi@InesKRaspberrypi:~/iot-hub-c-raspberrypi-client-app $ sudo ./app 'myAccessKey' Info: Sending message: { "deviceId": "Raspberry Pi - C", "messageId": 1, "temperature": 21.459999, "humidity": 74.959999 } Info: Message sent to Azure IoT Hub Error: Time:Thu Feb 21 15:59:57 2019 File:/root/Source/azure-iot-sdk-c/serializer/src/multitree.c Func:MultiTree_GetLeafValue Line:742 (result = MULTITREE_CHILD_NOT_FOUND) Info: Sending message: { "deviceId": "Raspberry Pi - C", "messageId": 2, "temperature": 26.040001, "humidity": 74.760002 } Info: Message sent to Azure IoT Hub

cSteusloff commented 5 years ago

I always get the error /iot-hub-c-raspberrypi-client-app/main.c:9:45: fatal error: azure_c_shared_utility/xlogging.h: No such file or directory.

manoelamado commented 4 years ago

I am getting this same error: /home/pi/iot-hub-c-raspberrypi-client-app/main.c:9:10: fatal error: azure_c_shared_utility/xlogging.h: No such file or directory

include <azure_c_shared_utility/xlogging.h>

GrzesiekFus commented 4 years ago

Hi, I went into several problems during compilation (including the one mentioned in this thread).

All of them went away when I modified setup.sh file:

sudo apt-get purge -y libssl-dev

sudo apt-get install -y libssl1.0-dev git cmake build-essential curl libcurl4-openssl-dev uuid-dev

sudo apt-get install -y git cmake build-essential curl libcurl4-openssl-dev uuid-dev

Basically: setup uninstalls libssl-dev and then tries to install libssl1.0-dev, which fails and do not install any other following packages. Missing packages prevents code from further compilation.

HTH, Grzesiek

catsionson commented 4 years ago

Hi, I went into several problems during compilation (including the one mentioned in this thread).

All of them went away when I modified setup.sh file:

sudo apt-get purge -y libssl-dev

sudo apt-get install -y libssl1.0-dev git cmake build-essential curl libcurl4-openssl-dev uuid-dev

sudo apt-get install -y git cmake build-essential curl libcurl4-openssl-dev uuid-dev

Basically: setup uninstalls libssl-dev and then tries to install libssl1.0-dev, which fails and do not install any other following packages. Missing packages prevents code from further compilation.

HTH, Grzesiek

Hello, I have problems too. Do you run on a real Raspberry? If yes, is it flashed with raspbian buster or raspbian stretch?

Thank you

GrzesiekFus commented 4 years ago

Hi, It's a real raspberry PI 3. I use "--simulated-data" mode, however, I don't think it's a source of problems.

cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

HTH, Grzesiek

NickZt commented 8 months ago

I have same error -- Configuring done -- Generating done -- Build files have been written to: /home/nickzt/azure/iot-hub-c-raspberrypi-client-app [ 16%] Building C object CMakeFiles/app.dir/main.c.o /home/nickzt/azure/iot-hub-c-raspberrypi-client-app/main.c:9:10: fatal error: azure_c_shared_utility/xlogging.h: No such file or directory 9 | #include <azure_c_shared_utility/xlogging.h> | ^~~~~~~~~~~ compilation terminated. make[2]: [CMakeFiles/app.dir/build.make:76: CMakeFiles/app.dir/main.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/app.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

Her detail explanation of my system: cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

ecderonde commented 8 months ago

Yeah same here, it looks like either I'm not using the "right" version of raspbian, or something else is up. None of the suggestions above seem to work

rtheil commented 6 months ago

Same issue here. Sample is basically worthless.