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

Error while building static_h for Windows #1627

Open
louisvangeldrop opened this issue Feb 20, 2025 · 6 comments
Open

Error while building static_h for Windows #1627

louisvangeldrop opened this issue Feb 20, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@louisvangeldrop
Copy link

louisvangeldrop commented Feb 20, 2025

Bug Description

I try to build a Windows version using the following commands:

  1. cmake -S hermes -B build_release -G "Visual Studio 17 2022" -T ClangCL -A x64 -DCMAKE_BUILD_TYPE=Release
  2. cmake --build ./build_release

The first step runs without any error.
The second step returns the following error:

C:\Users\louis\projecten\hermes\hermes\external\boost\boost_1_86_0\libs\context\src\asm\make_x86_64_ms_pe_masm.asm(90): error A2008: syntax error :
 FRAME [C:\Users\louis\projecten\hermes\build_release\external\boost\boost_1_86_0\libs\context\boost_context_obj.vcxproj]
C:\Users\louis\projecten\hermes\hermes\external\boost\boost_1_86_0\libs\context\src\asm\make_x86_64_ms_pe_masm.asm(92): warning A4020: directive ig
nored outside a procedure [C:\Users\louis\projecten\hermes\build_release\external\boost\boost_1_86_0\libs\context\boost_context_obj.vcxproj]
C:\Users\louis\projecten\hermes\hermes\external\boost\boost_1_86_0\libs\context\src\asm\make_x86_64_ms_pe_masm.asm(162): fatal error A1010: unmatch
ed block nesting : hoost_make_fcontext [C:\Users\louis\projecten\hermes\build_release\external\boost\boost_1_86_0\libs\context\boost_context_obj.vc
xproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations\masm.targets(70,5): error MSB3721: de
opdracht ml64.exe /c /nologo /Fo"boost_context_obj.dir\Debug\make_x86_64_ms_pe_masm.obj" /D"WIN32" /D"_WINDOWS" /D"_CRT_SECURE_NO_DEPRECATE" /D"_CR
T_SECURE_NO_WARNINGS" /D"_CRT_NONSTDC_NO_DEPRECATE" /D"_CRT_NONSTDC_NO_WARNINGS" /D"_SCL_SECURE_NO_DEPRECATE" /D"_SCL_SECURE_NO_WARNINGS" /D"STATIC
_HERMES" /D"HERMES_RELEASE_VERSION="0.12.0"" /D"HERMESVM_GC_HADES" /D"HERMESVM_INDIRECT_THREADING" /D"HERMESVM_LOG_HEAP_SEGMENT_SIZE=22" /D"HERMESV
M_ALLOW_CONCURRENT_GC" /D"HERMESVM_ALLOW_INLINE_ASM" /D"HERMES_ENABLE_UNICODE_REGEXP_PROPERTY_ESCAPES" /D"HERMES_SLOW_DEBUG" /D"HERMES_USE_BOOST_CO
NTEXT=1" /D"USE_WIN10_ICU" /D"CMAKE_INTDIR="Debug"" /I "C:\Users\louis\projecten\hermes\hermes\external" /I "C:\Users\louis\projecten\hermes\hermes
\include" /I "C:\Users\louis\projecten\hermes\build_release\include" /I "C:\Users\louis\projecten\hermes\build_release\lib\config" /I "C:\Users\lou
is\projecten\hermes\hermes\external\icu_decls" /I "C:\Users\louis\projecten\hermes\hermes\external\llvh\include" /I "C:\Users\louis\projecten\herme
s\hermes\external\llvh\gen\include" /I "C:\Users\louis\projecten\hermes\build_release\external\llvh\include" /I "C:\Users\louis\projecten\hermes\he
rmes\external\boost\boost_1_86_0" /W3 /errorReport:prompt  -fno-exceptions -fno-rtti /TaC:\Users\louis\projecten\hermes\hermes\external\boost\boost
_1_86_0\libs\context\src\asm\make_x86_64_ms_pe_masm.asm is afgesloten met code 1. [C:\Users\louis\projecten\hermes\build_release\external\boost\boo
st_1_86_0\libs\context\boost_context_obj.vcxproj]
@louisvangeldrop louisvangeldrop added the bug Something isn't working label Feb 20, 2025
@davedets
Copy link

Thanks! We're working on trying to repro locally. We'll get back to you.

@tmikov
Copy link
Contributor

tmikov commented Feb 24, 2025

We actually don't support compiling static_h with MSVC at the moment. But PRs with fixes are always welcome.

@tmikov tmikov closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2025
@tmikov
Copy link
Contributor

tmikov commented Feb 24, 2025

Wait, this is not MSVC

@tmikov tmikov reopened this Feb 24, 2025
@tmikov
Copy link
Contributor

tmikov commented Feb 24, 2025

Try setting HERMES_ALLOW_BOOST_CONTEXT to 0

@louisvangeldrop
Copy link
Author

I tried your suggestion and it probably solved the problem. I am not 100% sure. I now do get the following error:

C:\Users\louis\projecten\hermes\hermes\tools\shermes\compile.cpp(20,10): fatal error : 'dlfcn.h' file not found [C:\Users\louis\projecten\hermes\build
_release\tools\shermes\shermes.vcxproj]

@tmikov
Copy link
Contributor

tmikov commented Feb 25, 2025

That is expected, shermes using Unix functions to load the compiled .so for the "-exec" option. That can work on Windows, but would require different APIs. You can comment that code out or add a Windows version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants