Coder Social home page Coder Social logo

Comments (7)

 avatar commented on August 17, 2024

Not an sdk dev but have you read
https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/devbox_setup.md#linux ?

I am asking because you are doing things a bit different than said there (cmake folder outside of project folder).

In general setting options in CMake works with the -D parameter. So your above command would look like this:

cmake ../azure-iot-sdk-c/ -DCMAKE_INSTALL_PREFIX=install_folder -Duse_wsio=ON -Duse_installed_dependencies=ON

Can you try it?
For me that does not work since then cmake is not able to find some config files. Do you see the same?

from azure-iot-sdk-c.

damonbarry avatar damonbarry commented on August 17, 2024

I reproduced this. @andrew-buckley, any thoughts?

from azure-iot-sdk-c.

andrew-buckley avatar andrew-buckley commented on August 17, 2024

Hi @FSchwarzer and @lmussier, in order to install this SDK each of it's dependencies must also be installed on your machine. This is why for you, @FSchwarzer, it may have given you an error saying it couldn't find a package configuration file under the name azure_c_shared_utilityConfig.cmake. What it means is that it's searching your machine for this installed package and it cannot find it.

You will have to individually install azure-c-shared-utility, umqtt, uamqp. If you wish to run the tests, you will also need to install azure-ctest, azure-c-testrunner-switcher, and umock-c.

from azure-iot-sdk-c.

andrew-buckley avatar andrew-buckley commented on August 17, 2024

Installation instructions should be on the man README pages of those repositories.

from azure-iot-sdk-c.

lmussier avatar lmussier commented on August 17, 2024

@andrew-buckley To be be crystal clear, I can no more install the agent from the only git we clone, that's it.
i.e clone / cmake /make install won't work.
Does it also mean that build.sh --install-path-prefix will be removed or modified?

Do you plan to make the install phase working like it used to work (clone / cmake / install) from the top level cmake again, or we have to switch to the new method which seems to be :

  1. Clone the whole sdk, which clones all its dependencies
  2. Build the whole SDK, which build all its dependencies
  3. Navigate to all of the cmake sub-folders created for dependencies builds and issue a make install for each dependencie needed
  4. Return to the top level build folder and finally install the SDK itself

I'm right?

from azure-iot-sdk-c.

andrew-buckley avatar andrew-buckley commented on August 17, 2024

@lmussier, like @FSchwarzer mentioned above you will have to pass the additional flag to your cmake command before attempting to install (-Duse_installed_dependencies=ON). Next, yes you will need to have each of the dependencies installed on your machine using cmake.

i.e clone / cmake /make install won't work.

The above should work so long as you make sure to pass the flag -Duse_installed_dependencies=ON, and have the dependencies installed. The flow is this:

  1. Clone the sdk and dependencies
  2. Navigate to the dependencies and cmake install them
  3. Go to your top-level build folder and run cmake -Duse_installed_dependencies=ON <any other flags> <path to root>

We do not plan to go back to the previous install mechanism as it was incorrect (even though it ended up working). The way it works now is all dependencies need to be on the machine in order to install the SDK.

You may use the CMAKE_INSTALL_PREFIX flag when you install the dependencies or the top-level sdk, but you'll have to be careful to also set the CMAKE_PREFIX_PATH for any installation that depends on packages that are installed in non-standard locations. The CMAKE_PREFIX_PATH is an additional location for CMake to search for installed packages.

Hope this helps.
Thanks,
-Andrew

from azure-iot-sdk-c.

lmussier avatar lmussier commented on August 17, 2024

@andrew-buckley Thanks for the 'how to'.

from azure-iot-sdk-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.