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

windows compilation #22

Open
ghost opened this issue Dec 28, 2017 · 2 comments
Open

windows compilation #22

ghost opened this issue Dec 28, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 28, 2017

i compiled v8 with the depot_tools. this was suprislingly, without any greater hasle.
but if i want to compile v8-rs, the following error emerges.

rust toolchain: nightly-x86_64-pc-windows-msvc
visual studio: 15.5.2
v8: 6.5.9
environment variables set:
* V8_SOURCE: v8_path
* V8_BUILD: v8_path + 'out/Release'

as one my notice, the flags for the "c++14" standart is already there. i cloned the v8-rs repo and changed it. but it does change nothing. the error message is exactly the same.

   Compiling v8-sys v0.14.7 (file:///E:/workspace/v8-rs/v8-sys)
error: failed to run custom build command for `v8-sys v0.14.7 (file:///E:/workspace/v8-rs/v8-sys)`
process didn't exit successfully: `E:\workspace\evermore\target\debug\build\v8-sys-a77c977a56620f5b\build-script-build` (exit code: 101)
--- stderr
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstddef:257:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:521:13: error: deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:772:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:816:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:1226:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xutility:1280:12: error: deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0:412:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xmemory0:422:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:75:2: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:119:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:144:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:169:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:188:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:213:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:233:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:252:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xstring:276:3: error: statement not allowed in constexpr function
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\vector:643:2: error: 'auto' return without trailing return type; deduced return types are a C++14 extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\vector:935:3: error: deduced return types are a C++14 extension
fatal error: too many errors emitted, stopping now [-ferror-limit=]
thread 'main' panicked at '

Internal error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX64\\x64\\cl.exe" "/nologo" "/MD" "/Z7" "/I" "E:\\workspace\\evermo
re\\libs\\v8\\include" "/I" "src" "/I" "E:\\workspace\\evermore\\target\\debug\\build\\v8-sys-a7c4f5bbff11adde\\out" "-std=c++14" "/std:c++14" "-Wall" "/W4" "/FoE:\\workspace\\evermore\\target\\debug\\build\
\v8-sys-a7c4f5bbff11adde\\out\\src\\v8-glue.o" "/c" "src/v8-glue.cc" with args "cl.exe" did not execute successfully (status code exit code: 2).

', C:\Users\gojira\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.54\src\lib.rs:1670:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.```
@ghost
Copy link
Author

ghost commented Dec 30, 2017

i am pretty sure no one cares, except for me.
but, the problem seems to be a issue with Clang, i had clang 5.0.1 installed and switched to 4.0.1.

i got the idea from -> http://lists.llvm.org/pipermail/cfe-dev/2017-August/055022.html

but why is clang needed in the first place?

   Compiling v8-sys v0.14.7 (file:///E:/workspace/v8-rs/v8-sys)
error: failed to run custom build command for `v8-sys v0.14.7 (file:///E:/workspace/v8-rs/v8-sys)`
process didn't exit successfully: `E:\workspace\evermore\target\debug\build\v8-sys-007f98133f25141e\build-script-build` (exit code: 3221225477)
--- stderr
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:186:10: warning: '__int_least32_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:112:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:187:10: warning: '__uint_least32_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:113:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:188:10: warning: '__int_least16_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:114:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:189:10: warning: '__uint_least16_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:115:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:190:10: warning: '__int_least8_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:116:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:191:10: warning: '__uint_least8_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:117:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:219:10: warning: '__int_least16_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:188:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:220:10: warning: '__uint_least16_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:189:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:221:10: warning: '__int_least8_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:190:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:222:10: warning: '__uint_least8_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:191:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:238:10: warning: '__int_least8_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:221:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:239:10: warning: '__uint_least8_t' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:222:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:379:11: warning: '__int32_c_suffix' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:304:11: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:380:11: warning: '__int16_c_suffix' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:305:11: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:381:11: warning: '__int8_c_suffix' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:306:12: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:417:11: warning: '__int16_c_suffix' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:380:11: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:418:11: warning: '__int8_c_suffix' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:381:11: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:438:11: warning: '__int8_c_suffix' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:418:11: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:572:10: warning: '__INT_LEAST32_MIN' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:481:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:573:10: warning: '__INT_LEAST32_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:482:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:574:10: warning: '__UINT_LEAST32_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:483:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:575:10: warning: '__INT_LEAST16_MIN' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:484:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:576:10: warning: '__INT_LEAST16_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:485:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:577:10: warning: '__UINT_LEAST16_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:486:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:578:10: warning: '__INT_LEAST8_MIN' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:487:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:579:10: warning: '__INT_LEAST8_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:488:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:580:10: warning: '__UINT_LEAST8_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:489:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:616:10: warning: '__INT_LEAST16_MIN' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:575:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:617:10: warning: '__INT_LEAST16_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:576:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:618:10: warning: '__UINT_LEAST16_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:577:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:619:10: warning: '__INT_LEAST8_MIN' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:578:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:620:10: warning: '__INT_LEAST8_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:579:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:621:10: warning: '__UINT_LEAST8_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:580:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:638:10: warning: '__INT_LEAST8_MIN' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:619:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:639:10: warning: '__INT_LEAST8_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:620:10: note: previous definition is here
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:640:10: warning: '__UINT_LEAST8_MAX' macro redefined [-Wmacro-redefined]
C:\Program Files\LLVM\bin\..\lib\clang\4.0.1\include\stdint.h:621:10: note: previous definition is here
E:\workspace\evermore\libs\v8\include\v8.h:20:10: fatal error: 'stdio.h' file not found
thread 'main' panicked at '

Internal error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\Hostx64\\x64\\cl.exe" "/nologo" "/MD" "/Z7" "/I" "E:\\workspace\\evermore\\libs\\v8\\include" "/I" "src" "/I"
 "E:\\workspace\\evermore\\target\\debug\\build\\v8-sys-8c5b088a7461ffe4\\out" "-std=c++11" "-Wall" "/W4" "/FoE:\\workspace\\evermore\\target\\debug\\build\\v8-sys-8c5b088a7461ffe4\\out\\src\\v8-glue.o" "/c" "src/v8-glue.cc" with args "cl.exe" d
id not execute successfully (status code exit code: 2).

', C:\Users\gojira\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.54\src\lib.rs:1670:4
stack backtrace:
   0: std::sys_common::backtrace::_print
             at C:\projects\rust\src\libstd\sys_common\backtrace.rs:92
   1: std::panicking::default_hook::{{closure}}
             at C:\projects\rust\src\libstd\panicking.rs:380
   2: std::panicking::default_hook
             at C:\projects\rust\src\libstd\panicking.rs:397
   3: std::panicking::rust_panic_with_hook
             at C:\projects\rust\src\libstd\panicking.rs:577
   4: std::panicking::begin_panic<alloc::string::String>
             at C:\projects\rust\src\libstd\panicking.rs:538
   5: std::panicking::begin_panic_fmt
             at C:\projects\rust\src\libstd\panicking.rs:522
   6: gcc::fail
             at C:\Users\gojira\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.54\src\lib.rs:1670
   7: gcc::Build::compile
             at C:\Users\gojira\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.54\src\lib.rs:783
   8: build_script_build::build_glue
             at .\build.rs:241
   9: build_script_build::main
             at .\build.rs:51
  10: panic_unwind::__rust_maybe_catch_panic
             at C:\projects\rust\src\libpanic_unwind\lib.rs:99
  11: std::rt::lang_start
             at C:\projects\rust\src\libstd\rt.rs:52
  12: main
  13: __scrt_common_main_seh
             at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283
  14: BaseThreadInitThunk

@Neurrone
Copy link

@Void-Dragon did you have any luck with getting this to work with recent V8 versions?

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

1 participant