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

Debug build fails for Fasttrack component when using VS CMake generator #53

Open
philip-harr opened this issue Jan 28, 2020 · 1 comment
Assignees
Labels
known-limitation This problem is known and will unlikely be fixed module:fasttrack os:windows

Comments

@philip-harr
Copy link
Collaborator

error in fasttrack generic
error LNK2038
ITERATOR_DEBUG_LEVEL mismatch

drace.detector.fasttrack.generic.lib(stacktrace.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrac
k\drace.detector.fasttrack.vcxproj]
drace.detector.fasttrack.generic.lib(stacktrace.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-cli
ent\detectors\fasttrack\drace.detector.fasttrack.vcxproj]
drace.detector.fasttrack.generic.lib(threadstate.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttra
ck\drace.detector.fasttrack.vcxproj]
drace.detector.fasttrack.generic.lib(threadstate.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-cl
ient\detectors\fasttrack\drace.detector.fasttrack.vcxproj]
drace.detector.fasttrack.generic.lib(varstate.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\
drace.detector.fasttrack.vcxproj]
drace.detector.fasttrack.generic.lib(varstate.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-clien
t\detectors\fasttrack\drace.detector.fasttrack.vcxproj]
libcpmtd.lib(ppltasks.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\drace.detector.fasttrack
.vcxproj]
libcpmtd.lib(ppltasks.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\dr
ace.detector.fasttrack.vcxproj]
libcpmtd.lib(excptptr.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\drace.detector.fasttrack
.vcxproj]
libcpmtd.lib(excptptr.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\dr
ace.detector.fasttrack.vcxproj]
libcpmtd.lib(thread0.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\drace.detector.fasttrack.
vcxproj]
libcpmtd.lib(thread0.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in fasttrack_dr.obj [C:\Users\z00435hk\dev\drace\build\drace-client\detectors\fasttrack\dra
ce.detector.fasttrack.vcxproj]
@fmoessbauer
Copy link
Member

fmoessbauer commented Jan 28, 2020

This is related to DynamoRIO/dynamorio#1392 and boils down to the usage of CMAKE_BUILD_TYPE in the configuration step. The hack which is done in the DynamoRIO cmake script clashes with our generator expression based build-type handling.

We keep that as a known limitation, as it only affects the following scenario:

  • Use of Visual Studio generator
  • and building in Debug mode (all other modes are not affected).
  • and build-type is not set at configure time (or is set to other type than used at compile time)

Workaround

  • Use Ninja generator (cmake -GNinja ..)
  • Use VS generator and set CMAKE_BUILD_TYPE to the same as used at compile time.

@fmoessbauer fmoessbauer added known-limitation This problem is known and will unlikely be fixed os:windows module:fasttrack labels Jan 28, 2020
@fmoessbauer fmoessbauer changed the title Fasttrack component cannot be built in Dbg mode with VS CMake Generator Debug build fails for Fasttrack component when using VS CMake generator Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
known-limitation This problem is known and will unlikely be fixed module:fasttrack os:windows
Projects
None yet
Development

No branches or pull requests

2 participants