jumanpp: MSVC 2017 build fails with x86 architecture (v2.0.0-rc2)
Using MSVC 2017 Community on Windows 10 and CMake 3.11.3, I am trying to build Windows binary from jumanpp-2.0.0-rc2.tar.xz. However, I have some trouble to ask the developers for help. (On Linux, I got working binary from the same source. Many thanks!)
Procedure
- Install MSVC 2017 Comunnity version (chose default set for Desktop development with C++) and CMake 3.11.3 (chose Windows win64-x64 ZIP as the installer gave an error).
- Download jumanpp-2.0.0-rc2.tar.xz and extract into C:\data\jumanpp-2.0.0-rc2 (I used 7-Zip 18.05).
- As instructed https://github.com/ku-nlp/jumanpp#building-from-a-package , open a terminal and do the following with the result.
C:\data\jumanpp-2.0.0-rc2>mkdir bld
C:\data\jumanpp-2.0.0-rc2>cd bld
C:\data\jumanpp-2.0.0-rc2\bld>cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="C:\Program Files\jumanpp"
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.16299.
-- The C compiler identification is MSVC 19.14.26430.0
-- The CXX compiler identification is MSVC 19.14.26430.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/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/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/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
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
Not using Protobuf-based components
-- Eigen3... OK
Static feature generation:
COMMAND cgtest02_codegen_binary cgtest02 Test02 C:/data/jumanpp-2.0.0-rc2/bld/src/core/codegen/gen
DEPENDS cgtest02_codegen_binary cg_2_spec.h
OUTPUT C:/data/jumanpp-2.0.0-rc2/bld/src/core/codegen/gen/cgtest02.cc C:/data/jumanpp-2.0.0-rc2/bld/src/core/codegen/gen/cgtest02.h
LIBS jpp_core
Static feature generation:
COMMAND jpp_jumandic_cg_codegen_binary jpp_jumandic_cg JumandicStatic C:/data/jumanpp-2.0.0-rc2/bld/src/jumandic/gen
DEPENDS jpp_jumandic_cg_codegen_binary shared/jumandic_spec.cc
OUTPUT C:/data/jumanpp-2.0.0-rc2/bld/src/jumandic/gen/jpp_jumandic_cg.cc C:/data/jumanpp-2.0.0-rc2/bld/src/jumandic/gen/jpp_jumandic_cg.h
LIBS jpp_jumandic_spec
C:/data/jumanpp-2.0.0-rc2/bld/src/jumandic/gen
-- Configuring done
-- Generating done
-- Build files have been written to: C:/data/jumanpp-2.0.0-rc2/bld
- Doubleclick “C:\data\jumanpp-2.0.0-rc2\bld\jumanpp.sln” and launch MSVC 2017.
- After some messages and project loading is done, choose ALL_BUILD from Solution Explorer and build with solution configuration of Release (changed from Debug) and Win32 (as default).
- After a while, I get 19 errors and many warnings and the build fails. Attached gz file is the exact output of the build (1210 lines long).
jumanpp-build-log.txt.gz
Since Linux build is fine and it actually works pretty well, something on my Windows is not right. Some advice would be really appreciated.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 17 (14 by maintainers)
I am using the same procedure (the only difference is that I was using mingw-msys64 cmake and not the Windows installer) and it works (with AppVeyor CI as well). I’ll try to dig into it.
A question: does this script work for you? (A build out of MSVS GUI, but still using MSVC toolkit).
Thanks for digging. I’m busy with a paper and upcoming PhD thesis right now, so I can’t guarantee when I look into it, but I will try.
I have looked over your build log once more. It seems that by default CMake tries to generate build files for 32-bit. I haven’t tested that configuration.
It probably should work, but a lot of Juman++ internal optimizations assume that we are using a 64-bit platform and have a sane number of 64-bit registers, which is obviously false on x86.
Nice to know that the build have passed. That means that at least MSBuild files generated by CMake are sane. I wonder that is the problem with the VS Solution.