Open Shachar1 opened 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
Hello,
I have the same problems :x
[ 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
^
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
[ 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
^
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
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)
@lakshmisivareddy Can you explain which files & libraries you have copied? And what modification you have made to the CMakeList.txt file?
Thank you
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
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
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
^
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
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
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.
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
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
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.
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
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
.
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
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 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
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
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
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/"
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
Same issue here. Sample is basically worthless.
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