Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Build Failed #286

Closed
melzoghbi opened this issue May 28, 2017 · 5 comments
Closed

Build Failed #286

melzoghbi opened this issue May 28, 2017 · 5 comments

Comments

@melzoghbi
Copy link

When i am trying to build the solution on Win10 x64 bit with VS2017, The build failed and i get this error message:
image

Any idea how to fix this issue?

Thanks

@aribeironovaes
Copy link
Contributor

aribeironovaes commented May 28, 2017 via email

@melzoghbi
Copy link
Author

melzoghbi commented May 30, 2017

Hi Angelo,

I checked, those are the versions that i have:

Python 2.7.9
git version 2.1.4

I ran

sudo apt-get update

to make sure i have latest packages. I have reviewed the dev box setup article and i do not set any requirement for git but Python 2.7 which i already have.

When i scroll up, i found this error has been repeated which is related to linkink error for"libuv.lib":
image

Let me know what else could be the problem.

@melzoghbi
Copy link
Author

melzoghbi commented May 30, 2017

I have excellent news, I was able to build the azure_iot_gateway_sdk solution after i digged into the errors and i found out the root cause of it. The main cause of the problem was libuv did not build due to VS2010 build does not exist on my machine! The iot solution was looking into this file
"[RepoFolder]\iot-edge\build_libuv\dist\lib" to load libuv.lib which does not exist!

So here is the steps you need to follow to upgrade libuv solution to use latest VC++ build tools for VS 2017 instead:

  1. Open ux.sln from build_libuv ->libuv folder.
  2. Once you open up the project, it will ask you to upgrade the solution to use the VS tools you have got on your machine. In my case was VS 2017.

image

  1. Right click on the solution and click on retarget solution. select the latest VS build tools version.

  2. Build a release build for libuv tool! you should be able to get a successful build!

image

  1. Copy the release build "libuv.lib" is located at the following folder "[RepoFolder]\iot-edge\build_libuv\libuv\Release\lib"

  2. Paste the lib into the following folder path "[RepoFolder]\iot-edge\build_libuv\dist\lib"

  3. Build the azure iot solution and you should be able to have a successful build with no errors!

Note: The copy and paste step of the release build lib should be taking care of by "vcbuild.bat" file which is looking for VS2015 or earlier version which i don't have. This file is being called when you build the azure iot solution since the libuv is one of its dependency. I am working with the product team to update the batch file to include vs2017 c++ build tools so you should not have this problem when you are using VS 2017 moving forward.

Enjoy!

@zafields
Copy link
Contributor

zafields commented May 30, 2017

@melzoghbi Your issue appears to be related to issue #218. The problem you are experiencing is that LibUV has not yet been upgraded to support VS2017. The work has been completed and is awaiting a merge; tracked here.
It looks like your method works, but would not be the preferred way to compile. As soon as LibUV is updated (and preferably versioned), then we can snap to the appropriate commit to fully support VS2017.
If you wish to use the latest SDK, and do not need remote module support, then you can use the --disable-native-remote-modules flag with build.sh to compile your solution

@melzoghbi
Copy link
Author

Awesome! Looking forward to the update. as far as of now, i was able to build manually from VS 2017. Once this is merged #218, This would not be an issue with VS 2017 C++ build tools. Thanks a lot @zafields & @aribeironovaes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants