Downloading from github - there seems to be a directory missing (azure-iot-sdk-c) - azure-iot-hub

I am working thru this Tutorial
(https://learn.microsoft.com/en-us/azure/iot-develop/quickstart-send-telemetry-central?pivots=programming-language-ansi-c)
Was able to perform all steps to install the SDK and samples.
In the next step - when I ran the sample code:
cmake\iothub_client\samples\pnp\pnp_temperature_controller\Debug\pnp_temperature_controller.exe
Encountered an error that states:
The system cannot find the path specified.
When I look into my directory system & follow the path of the sample code above I see that the path ends at
cmake\iothub_client\samples\pnp\pnp_temperature_controller\
This section is missing
\Debug\pnp_temperature_controller.exe
Missing:
(Directory: "Debug"
File: "pnp_temperature_controller.exe")
Have I done something wrong or is this missing from the repository. I somehow think that I did something wrong but I cannot see where.
Any help on this would be helpful. Thanks
Weng

Are you able to complete the step3 under Install the SDK and samples successfully?
cmake -Bcmake -Duse_prov_client=ON -Dhsm_type_symm_key=ON -Drun_e2e_tests=OFF
cmake --build cmake
Please ensure you have installed cmake and path is updated in your machine.
I had the same issue initially and then checked the cmake version and appears to be not added to the system Path.
Once cmake is installed and updated the PATH, I tried the example again and able to run it successfully.
Output from the Azure IoT Central page device telemetry graph.

Related

Could not find a package configuration file provided by "Protobuf" with any of the following names: ProtobufConfig.cmake protobuf-config.cmake

Trying to compile the quick start example for GRPC.
It produces these errors:
CMake Error at /home/priya/grpc/examples/cpp/cmake/common.cmake:101 (find_package):
Could not find a package configuration file provided by "Protobuf" with any
of the following names:
ProtobufConfig.cmake
protobuf-config.cmake
Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
"Protobuf_DIR" to a directory containing one of the above files. If
"Protobuf" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:24 (include)
I have tried all the proposed solutions for this on other similar questions but to no avail. These are the solutions that did not work for me:
Changing find_package(protobuf CONFIG REQUIRED) to an uppercase find_package(Protobuf REQUIRED)
Installing pkg-config
This thread
I could not find any other solutions. Any help would be greatly appreciated.
So the problem is I am new with bash scripts. I had copied and pasted the instructions in quick start into a bash script so that we could integrate the gRPC repository into our repo smoothly without having to build manually each time.
This problem was caused by incorrectly calling the script, which meant the environment variable for the install directory was never getting set correctly and was remaining an empty value. You must put source before calling the file, e.g source ./grpcSetup.sh. Please read this other stackoverflow question that explains the problem more clearly.
It's likely to be caused by lack of submodules in the gRPC repo, I guess. Would you get submodules before build? You can run git clone --recurse-submodules -b v1.38.0 https://github.com/grpc/grpc for it, as an example.
Have you compiled and installed grpc before?
I get this cmake error today and I run make install in the directory of builded grpc and it works now.
While installing GRPC, a variable is set that points to installation folder of GRPC.
mkdir -p $MY_INSTALL_DIR
mkdir -p $MY_INSTALL_DIR
If we change name MY_INSTALL_DIR to other, then that has to changed in CMakeList.txt file , hence error. To avoid and to keep it simple just use same name as mentioned in documentation.

The following configuration files were considered but not accepted:

I am new in Cmake thats why I will write story detailed.
I trying to build one lib under windows and that lib depends on other lib. (libmatroska depends on libebml) source libmatroska and source libebml
Fortunately both libs can be build with cmake.
I built libebml successfuly with cmake. And also built binaries using VS studio.
Then I tried to deal with libmatroska:
During first try I got:
Could not find a package configuration file provided by "Ebml" (requested
version 1.3.5) with any of the following names:
EbmlConfig.cmake
ebml-config.cmake
at libebml sources I found EbmlConfig.cmake.
I Type export Ebml_DIR=D:/work/mkv/libebml and try again.
On second run I got:
Could not find a configuration file for package "Ebml" that is compatible
with requested version "1.3.5".
The following configuration files were considered but not accepted:
D:/work/mkv/libebml/EbmlConfig.cmake, version: unknown
And after few hours I am still stuck on it.
I can't understand root of this error.
Is it something wrong with EbmlConfig.cmake?
... or maybe I specified path to wrong *.cmake file?
... or I need to install libebml some how before handling libmatroska?
I will be happy for any clue.
UPDATE:
Here EbmlConfig.cmake context:
include(${CMAKE_CURRENT_LIST_DIR}/EbmlTargets.cmake)
Where EbmlTargets.cmake is file generated while Ebml compilation.
I tried to change path inside EbmlConfig.cmake to global path. But got same error.
Also when I delete context of EbmlConfig.cmake I still have same error.
It looks like "default error when something goes wrong"

ownCloud Desktop Client Theming

I have been trying to build the desktop client for about a week now so that I can dig in and try to mess with some theming and turn off some features I wont be needing. In the process I have run into numerous issues and have managed to resolve them in one way or another. I have a VM running openSUSE and I have downloaded the source file ownCloudClient-2.3.2.tar.xz file and unzipped it all into my home/jwarren/client folder. I then ran:
cd admin/win/docker
docker build . -t owncloud-client-win32:
Which I was able to get through. Now I am on the second command:
docker run -v "$PWD:/home/user/client" owncloud-client-win32: \
/home/user/client/admin/win/docker/build.sh client/ $(id -u)
Here I am getting almost to the end and then I receive this error message which I cant figure out how to resolve.
CPack Error: Problem running NSIS command "user/bin/makensis"
CPack Error: Problem Compressing Directory
Can anyone help me out with this? Or maybe point me in the direction of better instructions for the ownCloud Desktop Client theming. I noticed that once you get it installed properly there is no instructions explaining where anything is to edit.
I wrote a comprehensive guide to build the Windows client using the cross-compilation toolchain in the Dockerfile some time ago in ownCloud's central: https://central.owncloud.org/t/error-using-docker-to-build-the-windows-client/5107/5
What you're probably missing out is the git-submodule initialization; i.e. running git submodule update --init on your unzipped repository. You need these to bundle on the installer some pre-compiled binaries used by the shell integrations.
Also, on a side note, there was some problems last month with mingw toolchain compiler (gcc7) - in case you get some dll error after installing the client with your self-generated installer, refer to https://central.owncloud.org/t/building-the-windows-installer/8403/4 for an snapshot of a fully working Docker image to use instead of your self-built.
About the docs to build your own theme: those can be found in https://doc.owncloud.org/branded_clients/branded_desktop_client/index.html (for enterprise installations of ownCloud) - and for an unsupported version, you can also check the source in
https://github.com/owncloud/client/blob/master/src/libsync/theme.cpp for some hints about what settings can be overwritten from there.

VS Code + CMake : cmake.build not found

I have CMake working perfectly fine with Visual Studio 2015. I wanted to try VS Code with C++ and CMake extensions, but when I try to call the build command (configured to F7 by default with the CMake extension for VSCode), I only get the message:
command 'cmake.build' not found
Is it trying to tell me it can't find CMake ? Because Cmake is installed and working so... I also tried changing in the settings to the full path to cmake with no success. I installed both CMake and CMake Tools from Extensions. Also the toolbar for CMake doesn't appear on the blue VSCode toolbar as shown in CMake Tools extension doc.
Edit:
The author of that extension believes they've resolved this issue in the latest version 0.9.7.
https://github.com/vector-of-bool/vscode-cmake-tools/issues/157#issuecomment-307005140
So, I've just pushed 0.9.7:
No more dependency on twxs.cmake, so that shouldn't be causing any
issues anymore
#ytimenkov fixed some version parsing code that was
lying about what version of CMake was installed. Should fix issues
people are seeing with pre-3.7 versions.
#ytimenkov added better
errors when initialization failed. This should help create future
tickets!
As such, I'm going to close this issue and ask that anyone
with any further issues open a new ticket using the new error messages
that appear during a failed initialization.
I too had this issue and was given a solution here in my ticket.
For some people, one of their dependencies isn't getting installed correctly on our system. So you need to install another additional extension to get it to work.
It's called "CMake" or "twxs.cmake" (actual package name) and can be found here: https://marketplace.visualstudio.com/items?itemName=twxs.cmake
If it still isn't working, some have reported that they needed to uninstall both extensions then reinstall them both to get it to work--making sure to restart VSCode.
try this:
create a new copy of "mingw32-make.exe".
rename the copy to "make.exe".
restart your vscode.

How to build yaml-cpp with CMake on Windows?

I can be a real dummy when it comes to following instructions sometimes, pardon me. I'm in a bit of a hurry to get YAML files working with my program. I have downloaded the YAML files from the official site, I have downloaded an installed the latest CMake. What do i do now? I don't understand DLL creation nor the issues that there seem to be.
When I open CMake I put in the path to the extracted yaml-cpp-0.2.7 folder with the yaml-cpp.pc.cmake file and I set up the build path. Is there anything else I should do here? I get this error:
CMake Error: CMake was unable to find a build program corresponding to ""Visual Studio 9 2008"". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Could not find cmake module file:C:/path/yaml-cpp-0.2.7/build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Could not find cmake module file:C:/path/yaml-cpp-0.2.7/build/CMakeFiles/CMakeCXXCompiler.cmake
Also once i'm done with this what should I do next to be able to launch the example code from the site? Which configuration should I use to be able to launch the file on VS Express 2010? I'm stuck, I can't find answers anywhere.
I have made a mistake here, i tried to get the CMake file going on a computer which didn't have the IDE installed, i installed VC++ 2010 and it works now.
I loaded the yaml-cpp solution into VC++ 2010, bulit it, linked everything and it works fine now.