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

Run build.cmd on Windows 10 #284

Closed
frankchu0131 opened this issue May 25, 2017 · 4 comments
Closed

Run build.cmd on Windows 10 #284

frankchu0131 opened this issue May 25, 2017 · 4 comments
Labels

Comments

@frankchu0131
Copy link

I got the latest version from github and set up development environment already.

C:\GitRepository\IoT\iot-edge\tools>build.cmd
**Building for "Visual Studio 15 2017"
Cleaning up build artifacts...
The system cannot find the file specified.
-- The C compiler identification is MSVC 19.10.25019.0
-- The CXX compiler identification is MSVC 19.10.25019.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMake Install Prefix is C:/Program Files (x86)/azure_iot_gateway_sdk-1.0.5/
-- AIG architecture: x86
-- nanomsg not found...
-- Building nanomsg...
-- The C compiler identification is MSVC 19.10.25019.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected nanomsg ABI v5.0.0
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Looking for InitializeConditionVariable
-- Looking for InitializeConditionVariable - found
-- Performing Test NN_HAVE_GCC_ATOMIC_BUILTINS
-- Performing Test NN_HAVE_GCC_ATOMIC_BUILTINS - Failed
CMake Warning at CMakeLists.txt:252 (message):
Could not find asciidoctor: skipping docs

-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

CMAKE_BUILD_TYPE

-- Build files have been written to: C:/GitRepository/IoT/iot-edge/deps/nanomsg/build
-- Installing nanomsg. Please wait...
-- Building libuv for 32-bit Windows...
The system cannot find the file specified.
Cloning into 'libuv'...
Switched to a new branch 'v1.10.1'
Warning: Visual Studio not found
git clone https://chromium.googlesource.com/external/gyp build/gyp
Cloning into 'build/gyp'...
Checking out files: 100% (1646/1646), done.
['-Dtarget_arch=ia32', '-Duv_library=static_library', '.\uv.gyp', '-I', '.\common.gypi', '--depth=.', '-Dhost_arch=x64']
Project files generated.
Build skipped. To build, this file needs to run from VS cmd prompt.
libuv\include\android-ifaddrs.h
libuv\include\pthread-barrier.h
libuv\include\stdint-msvc2008.h
libuv\include\tree.h
libuv\include\uv-aix.h
libuv\include\uv-bsd.h
libuv\include\uv-darwin.h
libuv\include\uv-errno.h
libuv\include\uv-linux.h
libuv\include\uv-os390.h
libuv\include\uv-sunos.h
libuv\include\uv-threadpool.h
libuv\include\uv-unix.h
libuv\include\uv-version.h
libuv\include\uv-win.h
libuv\include\uv.h
16 file(s) copied.
The system cannot find the path specified.
error: The following untracked working tree files would be overwritten by checkout:
.gitattributes
.github/CONTRIBUTING.md
.github/ISSUE_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
.gitignore
.gitmodules
CMakeLists.txt
LICENSE
build_all/arduino/CMakeList.append
build_all/arduino/Makefile.iot
build_all/arduino/build.sh
build_all/arduino/setup.sh
build_all/arduino/setup_sdk.sh
build_all/arduino_cc/PrintTestsLst.cmd
build_all/arduino_cc/PushToMaster.ps1
build_all/arduino_cc/Tests.lst
build_all/arduino_cc/Tests_Huzzah.lst
build_all/arduino_cc/Tests_M0WiFi.lst
build_all/arduino_cc/Tests_Thingdev.lst
build_all/arduino_cc/Tests_rm.lst
build_all/arduino_cc/base-libraries/AzureIoTHub/.travis.yml
build_all/arduino_cc/base-libraries/AzureIoTHub/README.md
build_all/arduino_cc/base-libraries/AzureIoTHub/examples/README.md
build_all/arduino_cc/base-libraries/AzureIoTHub/examples/simplesample_http/simplesample_http.ino
build_all/arduino_cc/base-libraries/AzureIoTHub/keywords.txt
build_all/arduino_cc/base-libraries/AzureIoTHub/library.properties
build_all/arduino_cc/base-libraries/AzureIoTHub/src/AzureIoTHub.h
build_all/arduino_cc/base-libraries/AzureIoTHub/src/AzureIoTHubClient.cpp
build_all/arduino_cc/base-libraries/AzureIoTHub/src/AzureIoTHubClient.h
build_all/arduino_cc/base-libraries/AzureIoTHub/src/esp8266/azcpgmspace.cpp
build_all/arduino_cc/base-libraries/AzureIoTHub/src/esp8266/azcpgmspace.h
build_all/arduino_cc/base-libraries/AzureIoTHub/src/esp8266/gbatomic.cpp
build_all/arduino_cc/base-libraries/AzureIoTHub/src/esp8266/gbatomic.h
build_all/arduino_cc/base-libraries/AzureIoTHub/src/esp8266/time.cpp
build_all/arduino_cc/base-libraries/AzureIoTHub/src/samd/gbatomic.cpp
build_all/arduino_cc/base-libraries/AzureIoTHub/src/samd/gbatomic.h
build_all/arduino_cc/base-libraries/AzureIoTHub/src/samd/stdio.cpp
build_all/arduino_cc/base-libraries/AzureIoTHub/src/samd/time.cpp
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/.travis.yml
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/README.md
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/examples/README.md
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/examples/simplesample_http/simplesample_http.ino
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/keywords.txt
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/library.properties
build_all/arduino_cc/base-libraries/AzureIoTProtocol_HTTP/src/AzureIoTProtocol_HTTP.h
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/.travis.yml
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/README.md
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/examples/README.md
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/examples/simplesample_mqtt/simplesample_mqtt.ino
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/keywords.txt
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/library.properties
build_all/arduino_cc/base-libraries/AzureIoTProtocol_MQTT/src/AzureIoTProtocol_MQTT.h
build_all/arduino_cc/base-libraries/AzureIoTUtility/.travis.yml
build_all/arduino_cc/base-libraries/AzureIoTUtility/README.md
build_all/arduino_cc/base-libraries/AzureIoTUtility/examples/README.md
build_all/arduino_cc/base-libraries/AzureIoTUtility/examples/simplesample_http/simplesample_http.ino
build_all/arduino_cc/base-libraries/AzureIoTUtility/keywords.txt
build_all/arduino_cc/base-libraries/AzureIoTUtility/library.properties
build_all/arduino_cc/base-libraries/AzureIoTUtility/src/AzureIoTUtility.h
build_all/arduino_cc/build.cmd
build_all/arduino_cc/download_blob.cmd
build_all/arduino_cc/execute.ps1
build_all/arduino_cc/make_sdk.cmd
build_all/docs/Doxyfile
build_all/linux/build.sh
build_all/linux/print_failed_tests.sed
build_all/linux/setup.sh
build_all/linux/setup_opensuse.sh
build_all/mbed/build.cmd
build_all/packaging/linux/apt-get-release.sh
build_all/packaging/linux/debian/azure-iot-sdk-c-dev.dirs
build_all/packaging/linux/debian/azure-iot-sdk-c-dev.install
build_all/packaging/linux/debian/azure-iot-
Aborting
Unable to checkout 'b50e0b61cf3ccf5dd692743da010faacef3288cf' in submodule path 'deps/iot-sdk-c'
CMake Error at modules/dependencies.cmake:28 (message):
Error pulling iot-sdk-c submodule: 1
Call Stack (most recent call first):
modules/CMakeLists.txt:6 (include)

-- Configuring incomplete, errors occurred!
See also "C:/GitRepository/IoT/iot-edge/build/CMakeFiles/CMakeOutput.log".
See also "C:/GitRepository/IoT/iot-edge/build/CMakeFiles/CMakeError.log".

Thank you!

@myagley myagley added the build label May 25, 2017
@damonbarry
Copy link
Member

This looks like the important part:

Unable to checkout 'b50e0b61cf3ccf5dd692743da010faacef3288cf' in submodule path 'deps/iot-sdk-c'

I just did a fresh clone of our repo, plus git submodule update --init to checkout commit 'b50e0b6' in the 'deps/iot-sdk-c' submodule, and it worked fine. I can also navigate to that commit on GitHub.

I wonder if you experienced a temporary network hiccup? Does it happen if you try again?

@frankchu0131
Copy link
Author

After shorten characters of the local path, it works fine!
But I got another error, please see the following:
...
...
42>Lib:
native_module_host_static.vcxproj -> C:\iot-edge\build\proxy\modules\native_module_host\Debug\native_module_ho
st_static.lib
CopyFilesToOutputDirectory:
Copying file from "native_module_host_static.dir\Debug\native_module_host_static.pdb" to "C:\iot-edge\build\pr
oxy\modules\native_module_host\Debug\native_module_host_static.pdb".
39>LINK : fatal error LNK1104: cannot open file '....\build_libuv\dist\lib\libuv.lib' [C:\iot-edge\build\core\gate
way.vcxproj]
FinalizeBuildStatus:
Deleting file "native_module_host_static.dir\Debug\native_m.7BD8E825.tlog\unsuccessfulbuild".
Touching "native_module_host_static.dir\Debug\native_m.7BD8E825.tlog\native_module_host_static.lastbuildstate"
.
42>Done Building Project "C:\iot-edge\build\proxy\modules\native_module_host\native_module_host_static.vcxproj" (de
fault targets).
28>Done Building Project "C:\iot-edge\build\proxy\modules\native_module_host\native_module_host_static.vcxproj.meta
proj" (default targets).
39>Done Building Project "C:\iot-edge\build\core\gateway.vcxproj" (default targets) -- FAILED.
12>Done Building Project "C:\iot-edge\build\core\gateway.vcxproj.metaproj" (default targets) -- FAILED.
43>Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\lin
k.exe /ERRORREPORT:QUEUE /OUT:"C:\iot-edge\build\proxy\modules\native_module_host\Debug\native_module_host.dll
" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.
lib comdlg32.lib advapi32.lib ......\core\deps\Debug\parson.lib ......\core\Debug\module_host_static.lib .
...\gateway\native\Debug\proxy_gateway.lib "........\install-deps\lib\aziotsharedutil.lib" ......\core\d
eps\Debug\parson.lib ........\build_libuv\dist\lib\libuv.lib Psapi.lib Iphlpapi.lib Userenv.lib crypt32.lib
winhttp.lib crypt32.lib winhttp.lib ws2_32.lib secur32.lib advapi32.lib rpcrt4.lib "........\install-deps
lib\nanomsg.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/i
ot-edge/build/proxy/modules/native_module_host/Debug/native_module_host.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNA
MICBASE /NXCOMPAT /IMPLIB:"C:/iot-edge/build/proxy/modules/native_module_host/Debug/native_module_host.lib" /M
ACHINE:X86 /SAFESEH /guard:cf /machine:X86 /DLL native_module_host.dir\Debug\native_module_host.obj
38>Lib:
gateway_static.vcxproj -> C:\iot-edge\build\core\Debug\gateway_static.lib
CopyFilesToOutputDirectory:
Copying file from "gateway_static.dir\Debug\gateway_static.pdb" to "C:\iot-edge\build\core\Debug\gateway_stati
c.pdb".
43>LINK : fatal error LNK1104: cannot open file '........\build_libuv\dist\lib\libuv.lib' [C:\iot-edge\build\pro
xy\modules\native_module_host\native_module_host.vcxproj]
FinalizeBuildStatus:
Deleting file "gateway_static.dir\Debug\gateway_static.tlog\unsuccessfulbuild".
Touching "gateway_static.dir\Debug\gateway_static.tlog\gateway_static.lastbuildstate".
38>Done Building Project "C:\iot-edge\build\core\gateway_static.vcxproj" (default targets).
13>Done Building Project "C:\iot-edge\build\core\gateway_static.vcxproj.metaproj" (default targets).
43>Done Building Project "C:\iot-edge\build\proxy\modules\native_module_host\native_module_host.vcxproj" (default t
argets) -- FAILED.
27>Done Building Project "C:\iot-edge\build\proxy\modules\native_module_host\native_module_host.vcxproj.metaproj" (
default targets) -- FAILED.
2>Done Building Project "C:\iot-edge\build\ALL_BUILD.vcxproj.metaproj" (default targets) -- FAILED.
1>Done Building Project "C:\iot-edge\build\azure_iot_gateway_sdk.sln" (default targets) -- FAILED.

Build FAILED.

Thank you!

@damonbarry
Copy link
Member

Since you're trying to build with VS2017, it looks like you're hitting #218. We're waiting for the libuv project to take in a PR that fixes this. In the meantime, if you don't need the out-of-proc modules feature you can disable it by passing the --disable-native-remote-modules to tools\build.cmd.

@tanieee28
Copy link

tanieee28 commented Nov 15, 2018

Hi,

i am experiencing the same problem, do we found any solution for these ?
I am building iotedge using command

.\v1\tools\build.cmd

and didnt gave the disabling native modules flag as i want to use out-of-process module concept of iotedge.
I built this in VS 2017 and facing the same issue.

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

No branches or pull requests

4 participants