Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[folly] build failed #2997

Closed
MVoz opened this issue Mar 9, 2018 · 5 comments
Closed

[folly] build failed #2997

MVoz opened this issue Mar 9, 2018 · 5 comments

Comments

@MVoz
Copy link
Contributor

MVoz commented Mar 9, 2018

vcpkg.exe install --triplet x64-windows-static boost-thread --debug
The following packages are already installed:
    boost-thread[core]:x64-windows-static
Starting package 1/1: boost-thread:x64-windows-static
Package boost-thread:x64-windows-static is already installed
vcpkg install pthreads:x64-windows-static --debug
The following packages are already installed:
    pthreads[core]:x64-windows-static
Starting package 1/1: pthreads:x64-windows-static
Package pthreads:x64-windows-static is already installed

depends PTHREAD
-- Could NOT find LIBPTHREAD (missing: LIBPTHREAD_LIBRARIES LIBPTHREAD_INCLUDE_DIRS)

-- Found Windows SDK 10.0.16299.0
-- The CXX compiler identification is MSVC 19.12.25835.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.12.25827/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: E:/tools/vcpkg/downloads/tools/python/python3/python.exe (found version "3.5.4") 
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - not found
-- Found Threads: TRUE  
-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   context
--   chrono
--   date_time
--   filesystem
--   program_options
--   regex
--   system
--   thread
--   atomic
-- Found DOUBLE_CONVERSION: E:/tools/vcpkg/installed/x64-windows-static/lib/double-conversion.lib  
-- Found double-conversion: E:/tools/vcpkg/installed/x64-windows-static/lib/double-conversion.lib
-- Found OpenSSL: E:/tools/vcpkg/installed/x64-windows-static/lib/libeay32.lib (found version "1.0.2n") 
-- Could NOT find LIBPTHREAD (missing: LIBPTHREAD_LIBRARIES LIBPTHREAD_INCLUDE_DIRS) 
-- Configuring incomplete, errors occurred!
See also "E:/tools/vcpkg/buildtrees/folly/x64-windows-static-rel/CMakeFiles/CMakeOutput.log".
See also "E:/tools/vcpkg/buildtrees/folly/x64-windows-static-rel/CMakeFiles/CMakeError.log".

@MVoz
Copy link
Contributor Author

MVoz commented Mar 12, 2018

в общем что то идет не так, выложу что получается

ошибка раз, LIBPTHREAD_LIBRARIES x64
facebook/folly#54
https://github.com/Bakhazard/winpthreads-msvc , rename winpthread.lib -> pthread.lib

ошибка два,
mv E:\tools\vcpkg\buildtrees\folly\src\folly-2017.11.27.00\folly\Benchmark.cpp E:\tools\vcpkg\buildtrees\folly\src\folly-2017.11.27.00\folly\Benchmark.cpp__
mv E:\tools\vcpkg\buildtrees\folly\src\folly-2017.11.27.00\folly\futures\test\Benchmark.cpp E:\tools\vcpkg\buildtrees\folly\src\folly-2017.11.27.00\folly\futures\test\Benchmark.cpp__

ошибка три, добавляем shlwapi.lib -> CMakeLists.txt

set(FOLLY_LINK_LIBRARIES
  ${FOLLY_LINK_LIBRARIES}
  ${Boost_LIBRARIES}
  Iphlpapi.lib
  Ws2_32.lib
  shlwapi.lib
  ${FOLLY_SHINY_DEPENDENCIES}
)

ошибка черыре, BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE на msvc2017, исправляем
x64-windows-static/include/boost/config/compiler/visualc.hpp
https://gist.github.com/ttldtor/5b05f258b746929146b4d0c7acf9f3b4
https://studiofreya.com/2018/01/06/visual-studio-2017-with-cpp17-and-boost/

ошибка пять, связанно с символами -> CMakeLists.txt
#1075 (comment)

if(WIN32)
    add_definitions(/DGOOGLE_GLOG_DLL_DECL=)
endif()

if(WIN32)
    add_definitions(/DGOOGLE_GFLAG_DLL_DECL=)
endif()

осталась последняя, не компануется debug

[8/15] cmd.exe /C "cd . && E:\tools\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\GenerateFingerprintTables.dir --manifests  -- C:\PROGRA~2\MIB055~1\2017\ENTERP~2\VC\Tools\MSVC\1412~1.258\bin\Hostx64\x64\link.exe  CMakeFiles\folly_base.dir\folly\build\EscapeTables.cpp.obj CMakeFiles\folly_base.dir\folly\build\FormatTables.cpp.obj CMakeFiles\folly_base.dir\folly\build\GroupVarintTables.cpp.obj CMakeFiles\GenerateFingerprintTables.dir\folly\build\GenerateFingerprintTables.cpp.obj  /out:GenerateFingerprintTables.exe /implib:GenerateFingerprintTables.lib /pdb:GenerateFingerprintTables.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  /INCREMENTAL /OPT:NOREF /OPT:NOICF  E:\tools\vcpkg\installed\x64-windows-static\debug\lib\double-conversion.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_context-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_chrono-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_date_time-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_filesystem-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_program_options-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_regex-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_system-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_thread-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_atomic-vc140-mt-gd.lib Iphlpapi.lib Ws2_32.lib shlwapi.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\ssleay32.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\libeay32.lib E:\tools\vcpkg\installed\x64-windows-static\lib\gflags_static.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\glogd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\event.lib E:\tools\vcpkg\installed\x64-windows-static\lib\pthread.lib DbgHelp.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: GenerateFingerprintTables.exe 
cmd.exe /C "cd . && E:\tools\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\GenerateFingerprintTables.dir --manifests  -- C:\PROGRA~2\MIB055~1\2017\ENTERP~2\VC\Tools\MSVC\1412~1.258\bin\Hostx64\x64\link.exe  CMakeFiles\folly_base.dir\folly\build\EscapeTables.cpp.obj CMakeFiles\folly_base.dir\folly\build\FormatTables.cpp.obj CMakeFiles\folly_base.dir\folly\build\GroupVarintTables.cpp.obj CMakeFiles\GenerateFingerprintTables.dir\folly\build\GenerateFingerprintTables.cpp.obj  /out:GenerateFingerprintTables.exe /implib:GenerateFingerprintTables.lib /pdb:GenerateFingerprintTables.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  /INCREMENTAL /OPT:NOREF /OPT:NOICF  E:\tools\vcpkg\installed\x64-windows-static\debug\lib\double-conversion.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_context-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_chrono-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_date_time-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_filesystem-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_program_options-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_regex-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_system-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_thread-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_atomic-vc140-mt-gd.lib Iphlpapi.lib Ws2_32.lib shlwapi.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\ssleay32.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\libeay32.lib E:\tools\vcpkg\installed\x64-windows-static\lib\gflags_static.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\glogd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\event.lib E:\tools\vcpkg\installed\x64-windows-static\lib\pthread.lib DbgHelp.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MIB055~1\2017\ENTERP~2\VC\Tools\MSVC\1412~1.258\bin\Hostx64\x64\link.exe CMakeFiles\folly_base.dir\folly\build\EscapeTables.cpp.obj CMakeFiles\folly_base.dir\folly\build\FormatTables.cpp.obj CMakeFiles\folly_base.dir\folly\build\GroupVarintTables.cpp.obj CMakeFiles\GenerateFingerprintTables.dir\folly\build\GenerateFingerprintTables.cpp.obj /out:GenerateFingerprintTables.exe /implib:GenerateFingerprintTables.lib /pdb:GenerateFingerprintTables.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console /INCREMENTAL /OPT:NOREF /OPT:NOICF E:\tools\vcpkg\installed\x64-windows-static\debug\lib\double-conversion.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_context-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_chrono-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_date_time-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_filesystem-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_program_options-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_regex-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_system-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_thread-vc140-mt-gd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\boost_atomic-vc140-mt-gd.lib Iphlpapi.lib Ws2_32.lib shlwapi.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\ssleay32.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\libeay32.lib E:\tools\vcpkg\installed\x64-windows-static\lib\gflags_static.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\glogd.lib E:\tools\vcpkg\installed\x64-windows-static\debug\lib\event.lib E:\tools\vcpkg\installed\x64-windows-static\lib\pthread.lib DbgHelp.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\GenerateFingerprintTables.dir/intermediate.manifest CMakeFiles\GenerateFingerprintTables.dir/manifest.res" failed (exit code 1319) with the following output:
Microsoft (R) Incremental Linker Version 14.12.25835.0

Copyright (C) Microsoft Corporation.  All rights reserved.



gflags_static.lib(gflags.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in FormatTables.cpp.obj

gflags_static.lib(gflags.cc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in FormatTables.cpp.obj

gflags_static.lib(gflags_reporting.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in FormatTables.cpp.obj

gflags_static.lib(gflags_reporting.cc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in FormatTables.cpp.obj

gflags_static.lib(gflags_completions.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in FormatTables.cpp.obj

gflags_static.lib(gflags_completions.cc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in FormatTables.cpp.obj

LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

GenerateFingerprintTables.exe : fatal error LNK1319: 6 mismatches detected

ninja: build stopped: subcommand failed.

/nodefaultlib:LIBCMT /nodefaultlib:MSVCRT
-custom-crt

@MVoz
Copy link
Contributor Author

MVoz commented Apr 3, 2018

Проблемы и с новым портом остались все те же, видимо интереса к folly нет.
Закрою

@MVoz MVoz closed this as completed Apr 3, 2018
@KindDragon
Copy link
Contributor

I don't use static triplet

@KindDragon
Copy link
Contributor

Works for me

Installing package folly[core,zlib]:x64-windows-static... done
Elapsed time for package folly:x64-windows-static: 8.116 min

Total elapsed time: 32.1 min

The package folly:x64-windows-static provides CMake targets:

    find_package(folly REQUIRED)
    target_link_libraries(main PRIVATE Folly::folly Folly::follybenchmark)

@KindDragon
Copy link
Contributor

ошибка раз, LIBPTHREAD_LIBRARIES x64
facebook/folly#54
https://github.com/Bakhazard/winpthreads-msvc , rename winpthread.lib -> pthread.lib

libpthread not required on Windows

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

No branches or pull requests

2 participants