Azure / iot-edge-v1

Azure IoT Edge
http://azure.github.io/iot-edge/
Other
525 stars 258 forks source link

libuv doesn't build in VS2017 #218

Closed RikVerbrugge closed 7 years ago

RikVerbrugge commented 7 years ago

I am running Windows 10 Creative Update with VS 2015 update 3 and latest versions of cmake and git. But every time I try to build the SDK on Windows 10 I get these errors:

   "C:\tmp\azure-iot-gateway-sdk\build\azure_iot_gateway_sdk.sln" (default target) (1) ->
       "C:\tmp\azure-iot-gateway-sdk\build\proxy\modules\native_module_host\native_module_host.vcxproj.metaproj" (defau
       lt target) (29) ->
       "C:\tmp\azure-iot-gateway-sdk\build\proxy\modules\native_module_host\native_module_host.vcxproj" (default target
       ) (46) ->
       (Link target) ->
         LINK : fatal error LNK1104: cannot open file '..\..\..\..\build_libuv\dist\lib\libuv.lib' [C:\tmp\azure-iot-ga
       teway-sdk\build\proxy\modules\native_module_host\native_module_host.vcxproj]

       "C:\tmp\azure-iot-gateway-sdk\build\azure_iot_gateway_sdk.sln" (default target) (1) ->
       "C:\tmp\azure-iot-gateway-sdk\build\core\gateway.vcxproj.metaproj" (default target) (15) ->
       "C:\tmp\azure-iot-gateway-sdk\build\core\gateway.vcxproj" (default target) (41) ->
         LINK : fatal error LNK1104: cannot open file '..\..\build_libuv\dist\lib\libuv.lib' [C:\tmp\azure-iot-gateway-
       sdk\build\core\gateway.vcxproj]

I have created several clones on different machines, but every time the same error. The directory where the libuv.lib should stay is also empty. I did a build --rebuild-deps, but got the same error

zafields commented 7 years ago

Can you specify exactly which versions of git and cmake you are using, so we can reproduce your error?

fedeoliv commented 7 years ago

I'm getting the same issue, using git (2.12.2.windows.1) and cmake (3.8.0).

zafields commented 7 years ago

@fernandoBRS Can you also supply your version of Python? I will setup a VM and try to reproduce your error.

fedeoliv commented 7 years ago

@zafields My python version is 2.7.13. Seems that it's not installing libuv. I needed to copy the libuv.lib to the folder "build_libuv\dist\lib\" at the right moment in the build to make it working.

zafields commented 7 years ago

Interesting. That copy is supposed to be happening right here.

zafields commented 7 years ago

I think I found the culprit...

azure-iot-gateway\tools\build.cmd
...
Cloning into 'libuv'...
Checking out files: 100% (351/351), done.
Switched to a new branch 'v1.11.0'
Warning: Visual Studio not found
...

I'll have an answer shortly.

zafields commented 7 years ago

vcbuild.bat from libuv does not currently support Visual Studio 2017. I have created an issue on libuv, and I am looking for a fix.

To work around this issue, you can call the build script with the --disable-native-remote-modules switch and you should be able to build normally.

fedeoliv commented 7 years ago

@zafields now it's working when I add --disable-native-remote-modules. Thank you!

zafields commented 7 years ago

@fernandoBRS They almost have the fix in place in libuv, to check status watch this issue -> libuv#1284: build: make libuv buildable with vs2017.

Once it is merged in and versioned, then we will start pulling it in.

Thanks for spotting this!

JayeshThamke commented 7 years ago

Hello, I am using Windows 10 - 64 bit Visual Studio 2017 Community (for student) Python v3.6.0 CMake v3.8.1

I tried to build with tools\build_dotnet.cmd - this builds no problem Again I faced the same issue that @RikVerbrugge has faced above for the clone I did last week (4-5 days before), I wonder if this issue has been fixed yet in Azure IoT Edge SDK project here? I then did tools\build_dotnet.cmd --disable-native-remote-modules it builds (not sure what I exactly had happened under the cover). However, it gave me 39 Warnings, I am now worried why these warnings came at all. Please see the Warnings below: ` "f:\gitHubRepo\iot-edge\build\azure_iot_gateway_sdk.sln" (default target) (1) -> "f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj.metaproj" (default target) (19) -> "f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj" (default target) (42) -> (Link target) -> iothub_client_amqp_transport.lib(version.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport.pdb' was no t found with 'iothub_client_amqp_transport.lib(version.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\ Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edge\build\module s\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothub_client_authorization.obj) : warning LNK4099: PDB 'iothub_client_amqp_t ransport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothub_client_authorization.obj)' or at 'F:\g itHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug i nfo [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothub_message.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothub_message.obj)' or at 'F:\gitHubRepo\iot-edge\build\m odules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edg e\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothub_client_ll.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport.pd b' was not found with 'iothub_client_amqp_transport.lib(iothub_client_ll.obj)' or at 'F:\gitHubRepo\iot-edge\bui ld\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot -edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(blob.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport.pdb' was not f ound with 'iothub_client_amqp_transport.lib(blob.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\ iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edge\build\modules\ioth ub\iothub.vcxproj] iothub_client_amqp_transport.lib(parson.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport.pdb' was not found with 'iothub_client_amqp_transport.lib(parson.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\De bug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edge\build\modules\ iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothub_client_ll_uploadtoblob.obj) : warning LNK4099: PDB 'iothub_client_amqp _transport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothub_client_ll_uploadtoblob.obj)' or at ' F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no deb ug info [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothubtransport_amqp_common.obj) : warning LNK4099: PDB 'iothub_client_amqp_t ransport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothubtransport_amqp_common.obj)' or at 'F:\g itHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug i nfo [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothubtransport_amqp_device.obj) : warning LNK4099: PDB 'iothub_client_amqp_t ransport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothubtransport_amqp_device.obj)' or at 'F:\g itHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug i nfo [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothubtransport_amqp_cbs_auth.obj) : warning LNK4099: PDB 'iothub_client_amqp _transport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothubtransport_amqp_cbs_auth.obj)' or at ' F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no deb ug info [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothubtransport_amqp_connection.obj) : warning LNK4099: PDB 'iothub_client_am qp_transport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothubtransport_amqp_connection.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothubtransport_amqp_messenger.obj) : warning LNK4099: PDB 'iothub_client_amq p_transport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothubtransport_amqp_messenger.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no d ebug info [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothub_client_retry_control.obj) : warning LNK4099: PDB 'iothub_client_amqp_t ransport.pdb' was not found with 'iothub_client_amqp_transport.lib(iothub_client_retry_control.obj)' or at 'F:\g itHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug i nfo [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(uamqp_messaging.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport.pdb ' was not found with 'iothub_client_amqp_transport.lib(uamqp_messaging.obj)' or at 'F:\gitHubRepo\iot-edge\build \modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-e dge\build\modules\iothub\iothub.vcxproj] iothub_client_amqp_transport.lib(iothubtransportamqp.obj) : warning LNK4099: PDB 'iothub_client_amqp_transport .pdb' was not found with 'iothub_client_amqp_transport.lib(iothubtransportamqp.obj)' or at 'F:\gitHubRepo\iot-ed ge\build\modules\iothub\Debug\iothub_client_amqp_transport.pdb'; linking object as if no debug info [f:\gitHubRe po\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(amqp_definitions.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(amqp_definiti ons.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug inf o [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(amqp_frame_codec.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(amqp_frame_co dec.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug inf o [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(amqp_management.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(amqp_managemen t.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(amqpvalue.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(amqpvalue.obj)' or a t 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRe po\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(amqpvalue_tostring.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(amqpvalue to_string.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no deb ug info [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(cbs.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(cbs.obj)' or at 'F:\gitHub Repo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edge\ build\modules\iothub\iothub.vcxproj] uamqp.lib(connection.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(connection.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHub Repo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(frame_codec.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(frame_codec.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitH ubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(link.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(link.obj)' or at 'F:\gitH ubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRepo\iot-edg e\build\modules\iothub\iothub.vcxproj] uamqp.lib(message.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(message.obj)' or at 'F :\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRepo\i ot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(message_receiver.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(message_recei ver.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug inf o [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(message_sender.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(message_sender. obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f :\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(messaging.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(messaging.obj)' or a t 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRe po\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(sasl_frame_codec.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(sasl_frame_co dec.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug inf o [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(sasl_mechanism.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(sasl_mechanism. obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f :\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(sasl_mssbcbs.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(sasl_mssbcbs.obj) ' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gi tHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(saslclientio.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(saslclientio.obj) ' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gi tHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] uamqp.lib(session.obj) : warning LNK4099: PDB 'uamqp.pdb' was not found with 'uamqp.lib(session.obj)' or at 'F :\gitHubRepo\iot-edge\build\modules\iothub\Debug\uamqp.pdb'; linking object as if no debug info [f:\gitHubRepo\i ot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_http_transport.lib(iothubtransporthttp.obj) : warning LNK4099: PDB 'iothub_client_http_transport .pdb' was not found with 'iothub_client_http_transport.lib(iothubtransporthttp.obj)' or at 'F:\gitHubRepo\iot-ed ge\build\modules\iothub\Debug\iothub_client_http_transport.pdb'; linking object as if no debug info [f:\gitHubRe po\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_mqtt_transport.lib(iothubtransport_mqtt_common.obj) : warning LNK4099: PDB 'iothub_client_mqtt_t ransport.pdb' was not found with 'iothub_client_mqtt_transport.lib(iothubtransport_mqtt_common.obj)' or at 'F:\g itHubRepo\iot-edge\build\modules\iothub\Debug\iothub_client_mqtt_transport.pdb'; linking object as if no debug i nfo [f:\gitHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] iothub_client_mqtt_transport.lib(iothubtransportmqtt.obj) : warning LNK4099: PDB 'iothub_client_mqtt_transport .pdb' was not found with 'iothub_client_mqtt_transport.lib(iothubtransportmqtt.obj)' or at 'F:\gitHubRepo\iot-ed ge\build\modules\iothub\Debug\iothub_client_mqtt_transport.pdb'; linking object as if no debug info [f:\gitHubRe po\iot-edge\build\modules\iothub\iothub.vcxproj] umqtt.lib(mqtt_client.obj) : warning LNK4099: PDB 'umqtt.pdb' was not found with 'umqtt.lib(mqtt_client.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\umqtt.pdb'; linking object as if no debug info [f:\gitH ubRepo\iot-edge\build\modules\iothub\iothub.vcxproj] umqtt.lib(mqtt_codec.obj) : warning LNK4099: PDB 'umqtt.pdb' was not found with 'umqtt.lib(mqtt_codec.obj)' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\umqtt.pdb'; linking object as if no debug info [f:\gitHub Repo\iot-edge\build\modules\iothub\iothub.vcxproj] umqtt.lib(mqtt_message.obj) : warning LNK4099: PDB 'umqtt.pdb' was not found with 'umqtt.lib(mqtt_message.obj) ' or at 'F:\gitHubRepo\iot-edge\build\modules\iothub\Debug\umqtt.pdb'; linking object as if no debug info [f:\gi tHubRepo\iot-edge\build\modules\iothub\iothub.vcxproj]

39 Warning(s)
0 Error(s)`

Thanks

damonbarry commented 7 years ago
  1. The output you provided looks like it came from running tools\build.cmd, not tools\build_dotnet.cmd. Can you confirm?
  2. You can get rid of the PDB warnings by adding the --rebuild-deps command, e.g.:
    tools\build.cmd --disable-native-remote-modules --rebuild-deps
zafields commented 7 years ago

Also some of our configurations require Python2.7 instead of Python3.6

damonbarry commented 7 years ago

Available in the 2017-08-21 release.