Azure / azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
https://azure.github.io/azure-iot-sdk-c
Other
589 stars 737 forks source link

Release 2018-03-02 does not build on armhf #409

Closed danieferreira closed 6 years ago

danieferreira commented 6 years ago

OS

Linux USCDBN-IOT-001 4.1.15-cl-som-imx7-4.0 #1 SMP PREEMPT Sun Aug 13 17:03:14 IDT 2017 armv7l GNU/Linux

SDK version

HEAD is now at 50ce0588 release_2018_03_02_after_bump_version ./build.sh --no-make -- The C compiler identification is GNU 7.3.0 -- The CXX compiler identification is GNU 7.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.0 -- 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/libcrypto.so (found version "1.0.2n") -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Found CURL: /usr/lib/arm-linux-gnueabihf/libcurl.so (found version "7.58.0") -- Found CURL: /usr/lib/arm-linux-gnueabihf/libcurl.so
-- 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

Description of the issue:

Switched git source from release_2018_01_29 to tag/2018-03-02 Building the SDK on an armhf device fails with [ 45%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_device.c.o In file included from /home/danie/Source/azure-iot-sdk-c/iothub_client/src/iothubtransport_amqp_device.c:12:0: /home/danie/Source/azure-iot-sdk-c/iothub_client/inc/iothubtransport_amqp_telemetry_messenger.h:11:10: fatal error: azure_uamqp_c/amqp_definitions_sequence_no.h: No such file or directory

include "azure_uamqp_c/amqp_definitions_sequence_no.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/build.make:278: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_device.c.o' failed make[2]: [iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_device.c.o] Error 1 CMakeFiles/Makefile2:1856: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/all' failed make[1]: [iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

Code sample exhibiting the issue:

git pull git checkout 2018-03-02 git reset --hard 2018-03-02 cd build_all/linux/ ./build.sh --no-make cd ../../cmake/iotsdk_linux make

Console log of the issue:

Scanning dependencies of target aziotsharedutil [ 0%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/base32.c.o [ 0%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/base64.c.o [ 1%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/buffer.c.o [ 1%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/connection_string_parser.c.o [ 1%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/constbuffer.c.o [ 2%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/consolelogger.c.o [ 2%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/crt_abstractions.c.o [ 3%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/constmap.c.o [ 3%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/doublylinkedlist.c.o [ 3%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gballoc.c.o [ 4%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gb_stdio.c.o [ 4%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gb_time.c.o [ 4%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/gb_rand.c.o [ 5%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/hmac.c.o [ 5%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/hmacsha256.c.o [ 6%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/http_proxy_io.c.o [ 6%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/xio.c.o [ 6%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/singlylinkedlist.c.o [ 7%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/map.c.o [ 7%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sastoken.c.o [ 8%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sha1.c.o [ 8%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sha224.c.o [ 8%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/sha384-512.c.o [ 9%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/strings.c.o [ 9%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/string_tokenizer.c.o [ 9%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/uuid.c.o [ 10%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/urlencode.c.o [ 10%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/usha.c.o [ 11%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/vector.c.o [ 11%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/xlogging.c.o [ 11%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/optionhandler.c.o [ 12%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/agenttime.c.o [ 12%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/condition_pthreads.c.o [ 13%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/lock_pthreads.c.o [ 13%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/platform_linux.c.o [ 13%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/socketio_berkeley.c.o [ 14%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/tickcounter_linux.c.o [ 14%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/threadapi_pthreads.c.o [ 14%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/uniqueid_linux.c.o [ 15%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/linux_time.c.o [ 15%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/httpapiex.c.o [ 16%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/httpapiexsas.c.o [ 16%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/httpheaders.c.o [ 16%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/adapters/httpapi_curl.c.o [ 17%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/tlsio_openssl.c.o [ 17%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/x509_openssl.c.o [ 18%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/wsio.c.o [ 18%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/uws_client.c.o [ 18%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/uws_frame_encoder.c.o [ 19%] Building C object c-utility/CMakeFiles/aziotsharedutil.dir/src/utf8_checker.c.o [ 19%] Linking C static library libaziotsharedutil.a [ 19%] Built target aziotsharedutil Scanning dependencies of target iot_c_utility [ 19%] Building C object c-utility/samples/iot_c_utility/CMakeFiles/iot_c_utility.dir/iot_c_utility.c.o [ 19%] Linking C executable iot_c_utility [ 19%] Built target iot_c_utility Scanning dependencies of target uamqp [ 19%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqp_definitions.c.o [ 19%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqp_frame_codec.c.o [ 20%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqp_management.c.o [ 20%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqpvalue.c.o [ 21%] Building C object uamqp/CMakeFiles/uamqp.dir/src/amqpvalue_to_string.c.o [ 21%] Building C object uamqp/CMakeFiles/uamqp.dir/src/async_operation.c.o [ 21%] Building C object uamqp/CMakeFiles/uamqp.dir/src/cbs.c.o [ 22%] Building C object uamqp/CMakeFiles/uamqp.dir/src/connection.c.o [ 22%] Building C object uamqp/CMakeFiles/uamqp.dir/src/frame_codec.c.o [ 23%] Building C object uamqp/CMakeFiles/uamqp.dir/src/header_detect_io.c.o [ 23%] Building C object uamqp/CMakeFiles/uamqp.dir/src/link.c.o [ 23%] Building C object uamqp/CMakeFiles/uamqp.dir/src/message.c.o [ 24%] Building C object uamqp/CMakeFiles/uamqp.dir/src/message_receiver.c.o [ 24%] Building C object uamqp/CMakeFiles/uamqp.dir/src/message_sender.c.o [ 24%] Building C object uamqp/CMakeFiles/uamqp.dir/src/messaging.c.o [ 25%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_anonymous.c.o [ 25%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_frame_codec.c.o [ 26%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_mechanism.c.o [ 26%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_server_mechanism.c.o [ 26%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_mssbcbs.c.o [ 27%] Building C object uamqp/CMakeFiles/uamqp.dir/src/sasl_plain.c.o [ 27%] Building C object uamqp/CMakeFiles/uamqp.dir/src/saslclientio.c.o [ 28%] Building C object uamqp/CMakeFiles/uamqp.dir/src/session.c.o [ 28%] Building C object uamqp/CMakeFiles/uamqp.dir/src/socket_listener_berkeley.c.o [ 28%] Linking C static library libuamqp.a [ 28%] Built target uamqp Scanning dependencies of target message_sender_sample [ 28%] Building C object uamqp/samples/message_sender_sample/CMakeFiles/message_sender_sample.dir/main.c.o [ 29%] Linking C executable message_sender_sample [ 29%] Built target message_sender_sample Scanning dependencies of target message_receiver_sample [ 30%] Building C object uamqp/samples/message_receiver_sample/CMakeFiles/message_receiver_sample.dir/main.c.o [ 30%] Linking C executable message_receiver_sample [ 30%] Built target message_receiver_sample Scanning dependencies of target mssbcbs_sample [ 30%] Building C object uamqp/samples/mssbcbs_sample/CMakeFiles/mssbcbs_sample.dir/main.c.o [ 31%] Linking C executable mssbcbs_sample [ 31%] Built target mssbcbs_sample Scanning dependencies of target eh_sender_with_sas_token_sample [ 31%] Building C object uamqp/samples/eh_sender_with_sas_token_sample/CMakeFiles/eh_sender_with_sas_token_sample.dir/main.c.o [ 32%] Linking C executable eh_sender_with_sas_token_sample [ 32%] Built target eh_sender_with_sas_token_sample Scanning dependencies of target local_client_sample [ 32%] Building C object uamqp/samples/local_client_sample/CMakeFiles/local_client_sample.dir/main.c.o [ 32%] Linking C executable local_client_sample [ 32%] Built target local_client_sample Scanning dependencies of target websockets_sample [ 33%] Building C object uamqp/samples/websockets_sample/CMakeFiles/websockets_sample.dir/main.c.o [ 33%] Building C object uamqp/samples/websockets_sample/CMakeFiles/websockets_sample.dir/iothub_certs.c.o [ 34%] Linking C executable websockets_sample [ 34%] Built target websockets_sample Scanning dependencies of target umqtt [ 34%] Building C object umqtt/CMakeFiles/umqtt.dir/src/mqtt_client.c.o [ 35%] Building C object umqtt/CMakeFiles/umqtt.dir/src/mqtt_codec.c.o [ 35%] Building C object umqtt/CMakeFiles/umqtt.dir/src/mqtt_message.c.o [ 35%] Linking C static library libumqtt.a [ 35%] Built target umqtt Scanning dependencies of target uhttp [ 36%] Building C object deps/uhttp/CMakeFiles/uhttp.dir/src/uhttp.c.o [ 36%] Linking C static library libuhttp.a [ 36%] Built target uhttp Scanning dependencies of target uhttp_sample [ 36%] Building C object deps/uhttp/samples/uhttp_sample/CMakeFiles/uhttp_sample.dir/uhttp_sample.c.o [ 37%] Linking C executable uhttp_sample [ 37%] Built target uhttp_sample Scanning dependencies of target iothub_service_client [ 37%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/__/deps/parson/parson.c.o [ 37%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_registrymanager.c.o [ 38%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_messaging.c.o [ 38%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_messaging_ll.c.o [ 39%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_devicetwin.c.o [ 39%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_devicemethod.c.o [ 39%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_service_client_auth.c.o [ 40%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_sc_version.c.o [ 40%] Building C object iothub_service_client/CMakeFiles/iothub_service_client.dir//iothub_client/src/iothub_message.c.o [ 41%] Linking C static library libiothub_service_client.a [ 41%] Built target iothub_service_client Scanning dependencies of target iothub_client_amqp_transport [ 41%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/version.c.o [ 42%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothub_client_authorization.c.o [ 42%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothub_message.c.o [ 43%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothub_client_ll.c.o [ 43%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothub_client_diagnostic.c.o [ 43%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir//deps/parson/parson.c.o [ 44%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothub_client_ll_uploadtoblob.c.o [ 44%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/blob.c.o [ 44%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_common.c.o [ 45%] Building C object iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_device.c.o In file included from /home/danie/Source/azure-iot-sdk-c/iothub_client/src/iothubtransport_amqp_device.c:12:0: /home/danie/Source/azure-iot-sdk-c/iothub_client/inc/iothubtransport_amqp_telemetry_messenger.h:11:10: fatal error: azure_uamqp_c/amqp_definitions_sequence_no.h: No such file or directory

include "azure_uamqp_c/amqp_definitions_sequence_no.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/build.make:278: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_device.c.o' failed make[2]: [iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/src/iothubtransport_amqp_device.c.o] Error 1 CMakeFiles/Makefile2:1856: recipe for target 'iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/all' failed make[1]: [iothub_client/CMakeFiles/iothub_client_amqp_transport.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

jspaith commented 6 years ago

I refactored a bunch of headers in the sub-repo uamqp (to make unit tests build way faster; its a long story). One of them added the header you're missing.

My guess here is that you need to do a 'git submodule update --recursive` and you should be in business.

danieferreira commented 6 years ago

Thanks, the recursive update did not fix my issue but a new clone did fix anything that was wrong with my local repository: 'git clone --recursive https://github.com/azure/azure-iot-sdk-c.git'