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

Error while cmake for azure-iot-gateway-sdk for uamqp #567

Closed
amoldixit-Git opened this issue Jul 18, 2018 · 3 comments
Closed

Error while cmake for azure-iot-gateway-sdk for uamqp #567

amoldixit-Git opened this issue Jul 18, 2018 · 3 comments
Assignees

Comments

@amoldixit-Git
Copy link

Ubuntu 16.04
azure-iot-gateway-sdk 1.0.3

While building azure-iot-gateway-sdk on Ubuntu 16.04 using cmake, got error for uamqp.

-- CMake Install Prefix is /usr/local
-- AIG architecture: x86_64
-- NANOMSG LIBRARIES: nanomsg
-- NANOMSG CFLAGS: -I/usr/local/include
-- NANOMSG LOCATION: /usr/local/lib/libnanomsg.so
-- uamqp not found...
-- Building uamqp...
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.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
-- AMQP Target architecture: x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/..../azure-iot-gateway-sdk/deps/uamqp/build
-- Installing uamqp. Please wait...
CMake Error at gatewayFunctions.cmake:170 (message):
Error installing uamqp: 2
Call Stack (most recent call first):
modules/dependencies.cmake:9 (findAndInstall)
modules/CMakeLists.txt:6 (include)

After digging deep for that error, found that "LogError" function is called multiple times in azure-iot-gateway-sdk\deps\uamqp\src\cbs.c & header_detect_io.c
After including "azure_c_shared_utility/xlogging.h" in both the file that error was gone but now another error came up. Here is the error messages observed in error.txt
/home/ubuntu/Projects/VanillaCopy/azure-iot-gateway-sdk/deps/uamqp/samples/eh_sender_with_sas_token_sample/main.c: In function ‘main’:
/home/ubuntu/Projects/VanillaCopy/azure-iot-gateway-sdk/deps/uamqp/samples/eh_sender_with_sas_token_sample/main.c:133:25: error: implicit declaration of function ‘Base64_Encode’ [-Werror=implicit-function-declaration]
sas_key_value = Base64_Encode(buffer);
^
/home/ubuntu/Projects/VanillaCopy/azure-iot-gateway-sdk/deps/uamqp/samples/eh_sender_with_sas_token_sample/main.c:133:23: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
sas_key_value = Base64_Encode(buffer);
^
cc1: all warnings being treated as errors
make[2]: *** [samples/eh_sender_with_sas_token_sample/CMakeFiles/eh_sender_with_sas_token_sample.dir/main.c.o] Error 1
make[1]: *** [samples/eh_sender_with_sas_token_sample/CMakeFiles/eh_sender_with_sas_token_sample.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

Is the 'azure-iot-gateway-sdk' code useful? Can you please confirm if this is an issue or I am missing something?

@jspaith
Copy link
Contributor

jspaith commented Jul 18, 2018

@amoldixit-Git - what are you trying to build here?

  • The azure-iot-gateway-sdk code is for our Edge gateway v1. If you're building an Edge device (e.g. one that typically sits between devices on an internal network and the broader Internet) you should really be on V2 (https://github.com/azure/azure-iotedge). I'll forward this issue onto Edge team in meantime. If you use V2 Edge, even though we open source it there's considerably easier packaging technologies to get up and running with it.
  • This repro is for the C SDK, which is a lightweight SDK for running on embedded devices. Here you'd want to clone https://github.com/Azure/azure-iot-sdk-c with a --recursive and you should get going.

@jspaith jspaith self-assigned this Jul 18, 2018
@darobs
Copy link
Contributor

darobs commented Jul 18, 2018

Hello @amoldixit-Git,

The Edge V1 code relies on submodules to pull in its dependencies. That error looks like the submodules did not get initialized. Running git submodule update --init --recursive will probably clear up this error. If you are still having trouble, please raise an issue here: https://github.com/Azure/iot-edge-v1

What @jspaith wrote applies as well. the V1 Edge is an SDK intended for users creating modular, extensible gateway software, but unless you are on a very constrained system, you may want to consider looking at the V2 gateway.

Thanks

@darobs darobs closed this as completed Jul 18, 2018
@az-iot-builder-01
Copy link
Collaborator

@amoldixit-Git, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

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

No branches or pull requests

4 participants