Unexpected failures in Visual Studio projects

342 views
Skip to first unread message

Jeffrey Walton

unread,
Jul 3, 2015, 7:15:41 PM7/3/15
to cryptop...@googlegroups.com
Hi Everyone,

I have not worked in Visual Studio in quite some time, but I don't seem to recall the issues seen below. The Cryptlib and Cryptest projects look OK, but some of the other less frequently used projects are having troubles.

I know there's been a flurry of check-ins, but I also know they did not fiddle with Windows linker setting (re: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86').

Could this be due to a bad VS2010 Upgrade/Conversion?

Or is anyone aware of their history? Is this something that just needs a good cleaning up?

Jeff

**********

------ Build started: Project: cryptlib, Configuration: Release x64 ------
Build started 7/3/2015 7:06:12 PM.
InitializeBuildStatus:
  Creating "x64\cryptlib\Release\cryptlib.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\x64\Output\Release\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "x64\cryptlib\Release\cryptlib.unsuccessfulbuild".
  Touching "x64\cryptlib\Release\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:27.64
------ Build started: Project: cryptlib, Configuration: Release Win32 ------
Build started 7/3/2015 7:06:40 PM.
InitializeBuildStatus:
  Creating "Win32\cryptlib\Release\cryptlib.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\Win32\Output\Release\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "Win32\cryptlib\Release\cryptlib.unsuccessfulbuild".
  Touching "Win32\cryptlib\Release\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:22.65
------ Build started: Project: cryptlib, Configuration: DLL-Import Release x64 ------
Build started 7/3/2015 7:07:03 PM.
InitializeBuildStatus:
  Touching "x64\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\x64\DLL_Output\Release\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "x64\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
  Touching "x64\cryptlib\DLL-Import Release\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:14.66
------ Build started: Project: cryptlib, Configuration: DLL-Import Release Win32 ------
Build started 7/3/2015 7:07:18 PM.
InitializeBuildStatus:
  Touching "Win32\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\Win32\DLL_Output\Release\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "Win32\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
  Touching "Win32\cryptlib\DLL-Import Release\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:13.94
------ Build started: Project: cryptlib, Configuration: DLL-Import Debug x64 ------
Build started 7/3/2015 7:07:32 PM.
InitializeBuildStatus:
  Touching "x64\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
  All outputs are up-to-date.
rw.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
rsa.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
emsa2.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
  cryptlib.vcxproj -> ...\cryptopp\x64\DLL_Output\Debug\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "x64\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
  Touching "x64\cryptlib\DLL-Import Debug\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:16.00
------ Build started: Project: cryptlib, Configuration: DLL-Import Debug Win32 ------
Build started 7/3/2015 7:07:48 PM.
InitializeBuildStatus:
  Touching "Win32\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
...\cryptopp\hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
...\cryptopp\hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
  All outputs are up-to-date.
rw.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
rsa.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
emsa2.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
  cryptlib.vcxproj -> ...\cryptopp\Win32\DLL_Output\Debug\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "Win32\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
  Touching "Win32\cryptlib\DLL-Import Debug\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:13.16
------ Build started: Project: cryptlib, Configuration: Debug x64 ------
Build started 7/3/2015 7:08:01 PM.
InitializeBuildStatus:
  Creating "x64\cryptlib\Debug\cryptlib.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\x64\Output\Debug\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "x64\cryptlib\Debug\cryptlib.unsuccessfulbuild".
  Touching "x64\cryptlib\Debug\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:18.51
------ Build started: Project: cryptlib, Configuration: Debug Win32 ------
Build started 7/3/2015 7:08:20 PM.
InitializeBuildStatus:
  Creating "Win32\cryptlib\Debug\cryptlib.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\Win32\Output\Debug\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "Win32\cryptlib\Debug\cryptlib.unsuccessfulbuild".
  Touching "Win32\cryptlib\Debug\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:28.44
------ Build started: Project: cryptest, Configuration: Release x64 ------
Build started 7/3/2015 7:08:49 PM.
InitializeBuildStatus:
  Touching "x64\cryptest\Release\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
validat1.obj : error LNK2001: unresolved external symbol "bool __cdecl ValidateHKDF(void)" (?ValidateHKDF@@YA_NXZ)
x64\Output\Release\cryptest.exe : fatal error LNK1120: 1 unresolved externals

Build FAILED.

Time Elapsed 00:00:12.47
------ Build started: Project: cryptest, Configuration: Release Win32 ------
Build started 7/3/2015 7:09:02 PM.
InitializeBuildStatus:
  Touching "Win32\cryptest\Release\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
LINK : fatal error LNK1257: code generation failed

Build FAILED.

Time Elapsed 00:00:02.38
------ Build started: Project: cryptest, Configuration: DLL-Import Release x64 ------
Build started 7/3/2015 7:09:04 PM.
InitializeBuildStatus:
  Touching "x64\cryptest\DLL-Import Release\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
PreLinkEvent:
  This configuration requires cryptopp.dll.
  You can build it yourself using the cryptdll project, or
  obtain a pre-built, FIPS 140-2 validated DLL. If you build it yourself
  the resulting DLL will not be considered FIPS validated
  unless it undergoes FIPS validation.
cryptopp.lib(cryptopp.dll) : error LNK2005: "void __cdecl CryptoPP::UnalignedDeallocate(void *)" (?UnalignedDeallocate@CryptoPP@@YAXPEAX@Z) already defined in cryptlib.lib(misc.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "void __cdecl CryptoPP::AlignedDeallocate(void *)" (?AlignedDeallocate@CryptoPP@@YAXPEAX@Z) already defined in cryptlib.lib(misc.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "void * __cdecl CryptoPP::AlignedAllocate(unsigned __int64)" (?AlignedAllocate@CryptoPP@@YAPEAX_K@Z) already defined in cryptlib.lib(misc.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "void __cdecl CryptoPP::DetectX86Features(void)" (?DetectX86Features@CryptoPP@@YAXXZ) already defined in cryptlib.lib(cpu.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: void __cdecl CryptoPP::AuthenticatedSymmetricCipher::SpecifyDataLengths(unsigned __int64,unsigned __int64,unsigned __int64)" (?SpecifyDataLengths@AuthenticatedSymmetricCipher@CryptoPP@@QEAAX_K00@Z) already defined in cryptlib.lib(cryptlib.obj)
...
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: __cdecl CryptoPP::BERSequenceDecoder::BERSequenceDecoder(class CryptoPP::BufferedTransformation &,unsigned char)" (??0BERSequenceDecoder@CryptoPP@@QEAA@AEAVBufferedTransformation@1@E@Z) already defined in cryptlib.lib(luc.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: __cdecl CryptoPP::OID::OID(void)" (??0OID@CryptoPP@@QEAA@XZ) already defined in cryptlib.lib(dll.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: double __cdecl CryptoPP::TimerBase::ElapsedTimeAsDouble(void)" (?ElapsedTimeAsDouble@TimerBase@CryptoPP@@QEAANXZ) already defined in cryptlib.lib(hrtimer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: void __cdecl CryptoPP::TimerBase::StartTimer(void)" (?StartTimer@TimerBase@CryptoPP@@QEAAXXZ) already defined in cryptlib.lib(hrtimer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: class CryptoPP::Integer & __cdecl CryptoPP::Integer::operator++(void)" (??EInteger@CryptoPP@@QEAAAEAV01@XZ) already defined in cryptlib.lib(integer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: __cdecl CryptoPP::TimerBase::TimerBase(enum CryptoPP::TimerBase::Unit,bool)" (??0TimerBase@CryptoPP@@QEAA@W4Unit@01@_N@Z) already defined in cryptlib.lib(network.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: unsigned __int64 __cdecl CryptoPP::BufferedTransformation::Put(unsigned char,bool)" (?Put@BufferedTransformation@CryptoPP@@QEAA_KE_N@Z) already defined in cryptlib.lib(gzip.obj)
     Creating library x64\DLL_Output\Release\cryptest.lib and object x64\DLL_Output\Release\cryptest.exp
validat1.obj : error LNK2001: unresolved external symbol "bool __cdecl ValidateHKDF(void)" (?ValidateHKDF@@YA_NXZ)
x64\DLL_Output\Release\cryptest.exe : fatal error LNK1120: 1 unresolved externals

Build FAILED.

Time Elapsed 00:00:09.03
------ Build started: Project: cryptest, Configuration: DLL-Import Release Win32 ------
Build started 7/3/2015 7:09:13 PM.
InitializeBuildStatus:
  Touching "Win32\cryptest\DLL-Import Release\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
PreLinkEvent:
  This configuration requires cryptopp.dll.
  You can build it yourself using the cryptdll project, or
  obtain a pre-built, FIPS 140-2 validated DLL. If you build it yourself
  the resulting DLL will not be considered FIPS validated
  unless it undergoes FIPS validation.
LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
LINK : fatal error LNK1257: code generation failed

Build FAILED.

Time Elapsed 00:00:05.99
------ Build started: Project: cryptest, Configuration: DLL-Import Debug x64 ------
Build started 7/3/2015 7:09:19 PM.
InitializeBuildStatus:
  Touching "x64\cryptest\DLL-Import Debug\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
PreLinkEvent:
  This configuration requires cryptopp.dll.
  You can build it yourself using the cryptdll project, or
  obtain a pre-built, FIPS 140-2 validated DLL. If you build it yourself
  the resulting DLL will not be considered FIPS validated
  unless it undergoes FIPS validation.
Link:
  cryptlib.lib(zlib.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
cryptlib.lib(zlib.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(integer.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(zdeflate.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(xtrcrypt.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
...
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: virtual bool __cdecl CryptoPP::HashTransformation::VerifyDigest(unsigned char const *,unsigned char const *,unsigned __int64)" (?VerifyDigest@HashTransformation@CryptoPP@@UEAA_NPEBE0_K@Z) already defined in cryptlib.lib(zlib.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: unsigned __int64 __cdecl CryptoPP::BufferedTransformation::Put(unsigned char,bool)" (?Put@BufferedTransformation@CryptoPP@@QEAA_KE_N@Z) already defined in cryptlib.lib(integer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: class CryptoPP::Integer & __cdecl CryptoPP::Integer::operator++(void)" (??EInteger@CryptoPP@@QEAAAEAV01@XZ) already defined in cryptlib.lib(integer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: double __cdecl CryptoPP::TimerBase::ElapsedTimeAsDouble(void)" (?ElapsedTimeAsDouble@TimerBase@CryptoPP@@QEAANXZ) already defined in cryptlib.lib(hrtimer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: void __cdecl CryptoPP::TimerBase::StartTimer(void)" (?StartTimer@TimerBase@CryptoPP@@QEAAXXZ) already defined in cryptlib.lib(hrtimer.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: virtual void __cdecl CryptoPP::HashTransformation::CalculateDigest(unsigned char *,unsigned char const *,unsigned __int64)" (?CalculateDigest@HashTransformation@CryptoPP@@UEAAXPEAEPEBE_K@Z) already defined in cryptlib.lib(zlib.obj)
cryptopp.lib(cryptopp.dll) : error LNK2005: "public: virtual unsigned int __cdecl CryptoPP::HMAC_Base::DigestSize(void)const " (?DigestSize@HMAC_Base@CryptoPP@@UEBAIXZ) already defined in cryptlib.lib(gfpcrypt.obj)
     Creating library x64\DLL_Output\Debug\cryptest.lib and object x64\DLL_Output\Debug\cryptest.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
validat1.obj : error LNK2001: unresolved external symbol "bool __cdecl ValidateHKDF(void)" (?ValidateHKDF@@YA_NXZ)
x64\DLL_Output\Debug\cryptest.exe : fatal error LNK1120: 1 unresolved externals

Build FAILED.

Time Elapsed 00:00:04.39
------ Build started: Project: cryptest, Configuration: DLL-Import Debug Win32 ------
Build started 7/3/2015 7:09:24 PM.
InitializeBuildStatus:
  Touching "Win32\cryptest\DLL-Import Debug\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
PreLinkEvent:
  This configuration requires cryptopp.dll.
  You can build it yourself using the cryptdll project, or
  obtain a pre-built, FIPS 140-2 validated DLL. If you build it yourself
  the resulting DLL will not be considered FIPS validated
  unless it undergoes FIPS validation.
LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
LINK : fatal error LNK1257: code generation failed

Build FAILED.

Time Elapsed 00:00:01.46
------ Build started: Project: cryptest, Configuration: Debug x64 ------
Build started 7/3/2015 7:09:25 PM.
InitializeBuildStatus:
  Touching "x64\cryptest\Debug\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
Link:
  cryptlib.lib(cryptlib.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
cryptlib.lib(cryptlib.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(cpu.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(misc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(algparam.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
...
cryptlib.lib(gf2_32.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(zinflate.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(winpipes.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(gf256.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(sharkbox.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
cryptlib.lib(squaretb.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in adhoc.obj
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
validat1.obj : error LNK2001: unresolved external symbol "bool __cdecl ValidateHKDF(void)" (?ValidateHKDF@@YA_NXZ)
x64\Output\Debug\cryptest.exe : fatal error LNK1120: 1 unresolved externals

Build FAILED.

Time Elapsed 00:00:05.21
------ Build started: Project: cryptest, Configuration: Debug Win32 ------
Build started 7/3/2015 7:09:31 PM.
InitializeBuildStatus:
  Touching "Win32\cryptest\Debug\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
LINK : fatal error LNK1257: code generation failed

Build FAILED.

Time Elapsed 00:00:04.08
------ Build started: Project: cryptopp, Configuration: Release x64 ------
Build started 7/3/2015 7:09:35 PM.
InitializeBuildStatus:
  Creating "x64\cryptopp\Release\cryptopp.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
ResourceCompile:
  All outputs are up-to-date.
Link:
     Creating library ...\cryptopp\x64\DLL_Output\Release\cryptopp.lib and object ...\cryptopp\x64\DLL_Output\Release\cryptopp.exp
  Generating code
  Finished generating code
  cryptdll.vcxproj -> ...\cryptopp\x64\DLL_Output\Release\cryptopp.dll
CustomBuildStep:
Skipping target "CustomBuildStep" because all output files are up-to-date with respect to the input files.
FinalizeBuildStatus:
  Deleting file "x64\cryptopp\Release\cryptopp.unsuccessfulbuild".
  Touching "x64\cryptopp\Release\cryptopp.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:30.07
------ Build started: Project: cryptopp, Configuration: Release Win32 ------
Build started 7/3/2015 7:10:06 PM.
InitializeBuildStatus:
  Touching "Win32\cryptopp\Release\cryptopp.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
ResourceCompile:
  All outputs are up-to-date.
Link:
     Creating library ...\cryptopp\Win32\DLL_Output\Release\cryptopp.lib and object ...\cryptopp\Win32\DLL_Output\Release\cryptopp.exp
  Generating code
  Finished generating code
  cryptdll.vcxproj -> ...\cryptopp\Win32\DLL_Output\Release\cryptopp.dll
CustomBuildStep:
Skipping target "CustomBuildStep" because all output files are up-to-date with respect to the input files.
FinalizeBuildStatus:
  Deleting file "Win32\cryptopp\Release\cryptopp.unsuccessfulbuild".
  Touching "Win32\cryptopp\Release\cryptopp.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:21.69
------ Build started: Project: cryptopp, Configuration: Debug x64 ------
Build started 7/3/2015 7:10:27 PM.
InitializeBuildStatus:
  Touching "x64\cryptopp\Debug\cryptopp.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
ResourceCompile:
  All outputs are up-to-date.
Link:
     Creating library ...\cryptopp\x64\DLL_Output\Debug\cryptopp.lib and object ...\cryptopp\x64\DLL_Output\Debug\cryptopp.exp
  cryptdll.vcxproj -> ...\cryptopp\x64\DLL_Output\Debug\cryptopp.dll
CustomBuildStep:
Skipping target "CustomBuildStep" because all output files are up-to-date with respect to the input files.
FinalizeBuildStatus:
  Deleting file "x64\cryptopp\Debug\cryptopp.unsuccessfulbuild".
  Touching "x64\cryptopp\Debug\cryptopp.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:12.13
------ Build started: Project: cryptopp, Configuration: Debug Win32 ------
Build started 7/3/2015 7:10:39 PM.
InitializeBuildStatus:
  Touching "Win32\cryptopp\Debug\cryptopp.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
  hrtimer.cpp
  All outputs are up-to-date.
ResourceCompile:
  All outputs are up-to-date.
Link:
     Creating library ...\cryptopp\Win32\DLL_Output\Debug\cryptopp.lib and object ...\cryptopp\Win32\DLL_Output\Debug\cryptopp.exp
  cryptdll.vcxproj -> ...\cryptopp\Win32\DLL_Output\Debug\cryptopp.dll
CustomBuildStep:
Skipping target "CustomBuildStep" because all output files are up-to-date with respect to the input files.
FinalizeBuildStatus:
  Deleting file "Win32\cryptopp\Debug\cryptopp.unsuccessfulbuild".
  Touching "Win32\cryptopp\Debug\cryptopp.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:18.40
------ Build started: Project: dlltest, Configuration: Release x64 ------
Build started 7/3/2015 7:10:58 PM.
InitializeBuildStatus:
  Creating "x64\dlltest\Release\dlltest.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  All outputs are up-to-date.
Link:
     Creating library x64\DLL_Output\Release\dlltest.lib and object x64\DLL_Output\Release\dlltest.exp
  Generating code
  Finished generating code
  dlltest.vcxproj -> ...\cryptopp\x64\DLL_Output\Release\dlltest.exe
FinalizeBuildStatus:
  Deleting file "x64\dlltest\Release\dlltest.unsuccessfulbuild".
  Touching "x64\dlltest\Release\dlltest.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:02.38
------ Build started: Project: dlltest, Configuration: Release Win32 ------
Build started 7/3/2015 7:11:01 PM.
InitializeBuildStatus:
  Touching "Win32\dlltest\Release\dlltest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
cryptopp.lib(cryptopp.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Build FAILED.

Time Elapsed 00:00:00.70
------ Build started: Project: dlltest, Configuration: Debug x64 ------
Build started 7/3/2015 7:11:01 PM.
InitializeBuildStatus:
  Creating "x64\dlltest\Debug\dlltest.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  All outputs are up-to-date.
Link:
  LINK : x64\DLL_Output\Debug\dlltest.exe not found or not built by the last incremental link; performing full link
     Creating library x64\DLL_Output\Debug\dlltest.lib and object x64\DLL_Output\Debug\dlltest.exp
  dlltest.vcxproj -> ...\cryptopp\x64\DLL_Output\Debug\dlltest.exe
FinalizeBuildStatus:
  Deleting file "x64\dlltest\Debug\dlltest.unsuccessfulbuild".
  Touching "x64\dlltest\Debug\dlltest.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:01.20
------ Build started: Project: dlltest, Configuration: Debug Win32 ------
Build started 7/3/2015 7:11:03 PM.
InitializeBuildStatus:
  Touching "Win32\dlltest\Debug\dlltest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
cryptopp.lib(cryptopp.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Build FAILED.

Time Elapsed 00:00:00.29
========== Build: 14 succeeded, 10 failed, 0 up-to-date, 0 skipped ==========

Jean-Pierre Münch

unread,
Jul 4, 2015, 6:35:49 AM7/4/15
to cryptop...@googlegroups.com


Am 04.07.2015 um 01:15 schrieb Jeffrey Walton:
Hi Everyone,

I have not worked in Visual Studio in quite some time, but I don't seem to recall the issues seen below. The Cryptlib and Cryptest projects look OK, but some of the other less frequently used projects are having troubles.

I know there's been a flurry of check-ins, but I also know they did not fiddle with Windows linker setting (re: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86').

Could this be due to a bad VS2010 Upgrade/Conversion?
Theoretically VS2010 compability was introduced by 5.6.1 and extended to VS2012 with 5.6.2.

And of course you can try and google for the solution, the MSDN usually has at least a description of what is happening.
This looks like it was caused by your edit 26 days ago, you added CRYPTOPP_DLL to the class declaration.
I'm not sure if this actually breaks something, we'd have to try if we can use these two function in a DLL-build (which I actually never use)

  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\x64\DLL_Output\Release\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "x64\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
  Touching "x64\cryptlib\DLL-Import Release\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:14.66
------ Build started: Project: cryptlib, Configuration: DLL-Import Release Win32 ------
Build started 7/3/2015 7:07:18 PM.
InitializeBuildStatus:
  Touching "Win32\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
Same as above.

  All outputs are up-to-date.
Lib:
  cryptlib.vcxproj -> ...\cryptopp\Win32\DLL_Output\Release\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "Win32\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
  Touching "Win32\cryptlib\DLL-Import Release\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:13.94
------ Build started: Project: cryptlib, Configuration: DLL-Import Debug x64 ------
Build started 7/3/2015 7:07:32 PM.
InitializeBuildStatus:
  Touching "x64\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
same as above.

  All outputs are up-to-date.
rw.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
rsa.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
emsa2.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
That is indeed looking strange...
Maybe ask somewhere with real VS experts why these warnings are emitted? (f.ex. SO)

  cryptlib.vcxproj -> ...\cryptopp\x64\DLL_Output\Debug\cryptlib.lib
FinalizeBuildStatus:
  Deleting file "x64\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
  Touching "x64\cryptlib\DLL-Import Debug\cryptlib.lastbuildstate".

Build succeeded.

Time Elapsed 00:00:16.00
------ Build started: Project: cryptlib, Configuration: DLL-Import Debug Win32 ------
Build started 7/3/2015 7:07:48 PM.
InitializeBuildStatus:
  Touching "Win32\cryptlib\DLL-Import Debug\cryptlib.unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
ClCompile:
  All outputs are up-to-date.
  hrtimer.cpp
...\cryptopp\hrtimer.cpp(98): warning C4273: 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(46) : see previous definition of 'GetCurrentTimerValue'
...\cryptopp\hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond' : inconsistent dll linkage
          ...\cryptopp\hrtimer.h(47) : see previous definition of 'TicksPerSecond'
same as above

  All outputs are up-to-date.
rw.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
rsa.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
emsa2.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
same as above
Does Cryptest build against DLL or static library?
Common source for this one: You've used this function in the source, added it to the header, but didn't define it anywhere (yet).

Build FAILED.

Time Elapsed 00:00:12.47
------ Build started: Project: cryptest, Configuration: Release Win32 ------
Build started 7/3/2015 7:09:02 PM.
InitializeBuildStatus:
  Touching "Win32\cryptest\Release\cryptest.unsuccessfulbuild".
ClCompile:
  All outputs are up-to-date.
  All outputs are up-to-date.
LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
Did you link against the 64-bit library here?
Concerning the LNK2005 errors: Did you link this against the static library? This would cause these errors.
Same validat error as above.
Try the recommended thing: exclude LIBCMT. This may resolve the LNK2038 ones. Did you link against release library in debug build?

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-user...@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeffrey Walton

unread,
Jul 5, 2015, 11:23:07 PM7/5/15
to Jean-Pierre Münch, Crypto++ Users List
> ...
> ------ Build started: Project: cryptlib, Configuration: DLL-Import Release
> x64 ------
> Build started 7/3/2015 7:07:03 PM.
> InitializeBuildStatus:
> Touching "x64\cryptlib\DLL-Import Release\cryptlib.unsuccessfulbuild".
> CustomBuild:
> All outputs are up-to-date.
> ClCompile:
> All outputs are up-to-date.
> hrtimer.cpp
> hrtimer.cpp(98): warning C4273:
> 'CryptoPP::ThreadUserTimer::GetCurrentTimerValue' : inconsistent dll linkage
> ...\cryptopp\hrtimer.h(46) : see previous definition of
> 'GetCurrentTimerValue'
> hrtimer.cpp(128): warning C4273: 'CryptoPP::ThreadUserTimer::TicksPerSecond'
> : inconsistent dll linkage
> ...\cryptopp\hrtimer.h(47) : see previous definition of
> 'TicksPerSecond'
>
> This looks like it was caused by your edit 26 days ago, you added
> CRYPTOPP_DLL to the class declaration.
> I'm not sure if this actually breaks something, we'd have to try if we can
> use these two function in a DLL-build (which I actually never use)
>

Ah, OK. I'm working on sorting this out now.

The issue here is the Crypto++ DLL *is not* a DLL version of the
static library. The DLL is a purpose-built DLL used for FIPS. That's
why the DLL is missing so many things - it has to provide a security
boundary.

I'm thinking part of the solution is to have 2 DLLs in the solution.
One is for non-FIPS (i.e., behaves like users expect - it mirrors the
static library), and the other is to have FIPS DLL (i.e., provides the
security boundary and validated cryptography).

> ------ Build started: Project: cryptest, Configuration: Release Win32 ------
> Build started 7/3/2015 7:09:02 PM.
> InitializeBuildStatus:
> Touching "Win32\cryptest\Release\cryptest.unsuccessfulbuild".
> ClCompile:
> All outputs are up-to-date.
> All outputs are up-to-date.
> LINK : fatal error C1905: Front end and back end not compatible (must target
> same processor).
>
> Did you link against the 64-bit library here?

Well, I did not do any thing other than a fresh checkout, Visual
Studio 2008 -> 2010 conversion, and then Build -> Batch Build -> All.

We are also going to address the gaps in the engineering process in a
separate thread (its already been started with the question on CI).

Jeff

Jean-Pierre Münch

unread,
Jul 6, 2015, 4:27:51 PM7/6/15
to cryptop...@googlegroups.com
The FIPS validated one would only include FIPS validated algorithms and
the other would include everything?
Sounds good, although it may not be trivial to do this.
Personally I'd still not use the DLL, as static libs are still better,
but there may be users having a different opinion than me.
As a bonus we could include it in our installer (the latest FIPS
validated DLL (?), the current "FIPS"-DLL, the current Full-DLL and the
current static Lib, making it 200MB+ :) )
>> ------ Build started: Project: cryptest, Configuration: Release Win32 ------
>> Build started 7/3/2015 7:09:02 PM.
>> InitializeBuildStatus:
>> Touching "Win32\cryptest\Release\cryptest.unsuccessfulbuild".
>> ClCompile:
>> All outputs are up-to-date.
>> All outputs are up-to-date.
>> LINK : fatal error C1905: Front end and back end not compatible (must target
>> same processor).
>>
>> Did you link against the 64-bit library here?
> Well, I did not do any thing other than a fresh checkout, Visual
> Studio 2008 -> 2010 conversion, and then Build -> Batch Build -> All.
Strange... This shouldn't happen...
I've just downloaded the current sources from GitHub and ran it through
VS2010 Professional and it built perfectly (with some warnings we have
to fix...) -> No trivial repro :(

BR

JPM

Jean-Pierre Münch

unread,
Jul 6, 2015, 5:01:39 PM7/6/15
to cryptop...@googlegroups.com
Sorry, found this just after hitting the "send" button:

Could you please download the current GitHub master branch, select
Win32|Release, right-click on "cryptest" and hit "build"? (-> no batch
build)

I also just tried the batch build and also failed in the same way...

Strange...

I also just built 5.6.2 from source and it worked just fine (without any
warnings :) ), at least for the most part.

I've also found the exact same errors you've found - even with 5.6.2 .
So it's probably not something we have introduced, although we have to
fix it now.

BR

JPM

Jeffrey Walton

unread,
Jul 6, 2015, 9:54:04 PM7/6/15
to cryptop...@googlegroups.com


On Monday, July 6, 2015 at 5:01:39 PM UTC-4, jean-pierre.muench wrote:
Sorry, found this just after hitting the "send" button:

Could you please download the current GitHub master branch, select
Win32|Release, right-click on "cryptest" and hit "build"? (-> no batch
build)

I also just tried the batch build and also failed in the same way...
Yep, it sounds like you were doing what I was doing - build all the variants of Cryptlib (4x) and Cryptest (4x), but not the others (another 12x or so).
 
I've also found the exact same errors you've found - even with 5.6.2 .
So it's probably not something we have introduced, although we have to
fix it now.

Yes, agreed.

So there are two problems here. First is the immediate break/fix, which includes the UserThreadTimer I broke. We will get to that in turn. If anyone feels overwhelmed, I can back-out that check-in.

The second is a bigger problem and it is, why has issue has manifested so long undetected? I'm more interested in the second problem because that indicates problems in our processes. We need solid processes in place to help us avoids these breaks in the first place.

As a matter of philosophy, breaks/fixes don't bother me. You can't make an omelet without breaking eggs... Shit happens... Etc... But I do expect them to be detected and fixed in a timely manner.

Jeff
Reply all
Reply to author
Forward
0 new messages