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

Ruby3 - Link error due to mistmached MSVC runtime with unf_ext via json_schemer #72

Open
jmarrec opened this issue Feb 13, 2024 · 3 comments

Comments

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 13, 2024

[ 50%][1/2] Linking CXX shared module Products\rubyengine.dll
FAILED: Products/rubyengine.dll
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=ruby\engine\CMakeFiles\rubyengine.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\rubyengine.rsp  /out:Products\rubyengine.dll /implib:Products\rubyengine.lib /pdb:Products\rubyengine.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  /NODEFAULTLIB:MSVCRT  && cd ."
LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\rubyengine.rsp /out:Products\rubyengine.dll /implib:Products\rubyengine.lib /pdb:Products\rubyengine.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /NODEFAULTLIB:MSVCRT /MANIFEST /MANIFESTFILE:ruby\engine\CMakeFiles\rubyengine.dir/intermediate.manifest ruby\engine\CMakeFiles\rubyengine.dir/manifest.res" failed (exit code 1319) with the following output:
extinit.obj : warning LNK4099: PDB '' was not found with 'extinit.obj' or at ''; linking object as if no debug info
encinit.obj : warning LNK4099: PDB '' was not found with 'encinit.obj' or at ''; linking object as if no debug info
unf_ext.lib(unf.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in InitRubyBindings.cpp.obj
unf_ext.lib(unf.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in InitRubyBindings.cpp.obj
@jmarrec
Copy link
Collaborator Author

jmarrec commented Feb 13, 2024

C:\src\OS-build-debug-v2\openstudio-gems\ruby\3.2.0\gems>dumpbin /nologo /directives unf_ext-0.0.9.1\ext\unf_ext\unf_ext.lib

Dump of file unf_ext-0.0.9.1\ext\unf_ext\unf_ext.lib

File Type: LIBRARY

   Linker Directives
   -----------------
   /FAILIFMISMATCH:_CRT_STDIO_ISO_WIDE_SPECIFIERS=0
   /FAILIFMISMATCH:_MSC_VER=1900
   /FAILIFMISMATCH:_ITERATOR_DEBUG_LEVEL=0
   /FAILIFMISMATCH:RuntimeLibrary=MD_DynamicRelease
   /DEFAULTLIB:msvcprt
   /FAILIFMISMATCH:annotate_string=0
   /FAILIFMISMATCH:annotate_vector=0
   /DEFAULTLIB:uuid.lib
   /DEFAULTLIB:uuid.lib
   /DEFAULTLIB:MSVCRT
   /DEFAULTLIB:OLDNAMES

compared to

C:\src\OS-build-debug-v2\openstudio-gems\ruby\3.2.0\gems>dumpbin /nologo /directives oga-3.2\ext\c\liboga.lib

Dump of file oga-3.2\ext\c\liboga.lib

File Type: LIBRARY

   Linker Directives
   -----------------
   /DEFAULTLIB:uuid.lib
   /DEFAULTLIB:uuid.lib
   /DEFAULTLIB:MSVCRT
   /DEFAULTLIB:OLDNAMES

   Linker Directives
   -----------------
   /DEFAULTLIB:uuid.lib
   /DEFAULTLIB:uuid.lib
   /DEFAULTLIB:MSVCRT
   /DEFAULTLIB:OLDNAMES

@jmarrec
Copy link
Collaborator Author

jmarrec commented Feb 14, 2024

$ bundle viz

gem_graph

@jmarrec
Copy link
Collaborator Author

jmarrec commented Feb 14, 2024

bundle viz --format svg -R

gem_graph

jmarrec added a commit to jmarrec/openstudio-gems that referenced this issue Feb 14, 2024
jmarrec added a commit to jmarrec/openstudio-gems that referenced this issue Feb 14, 2024
@jmarrec jmarrec changed the title Ruby3 - Link error due to mistmached MSVC runtime Ruby3 - Link error due to mistmached MSVC runtime with unf_ext via json_schemer May 2, 2024
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