Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup script to align with IoT C SDK build output #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesweare
Copy link

Running sudo ./setup.sh as described in the tutorial results in an error below.

[ 16%] Building C object CMakeFiles/app.dir/main.c.o
**REDACTED**/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

This occurs as setup.sh assumes the directory {build_root}/cmake/iotsdk_linux to be the build output of IoT C SDK.
It was so in the past (example), but the current output is {build_root}/cmake instead (example). Due to this mismatch installation of IoT C SDK ends midway, leaving no actual library for the application code to reference.

+ build_folder=/home/***/Source/azure-iot-sdk-c/cmake
...
~/Source/azure-iot-sdk-c/build_all/linux
sh: 14: cd: can't cd to ../../cmake/iotsdk_linux
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
...

With the proposed change, setup.sh would reference the correct directory, thereby installing the SDK and succeeding in building the app.

Modify setup script to reference correct build output folder of IoT C SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant