Closed KarelGGIT closed 8 years ago
Very strange, I thought the _umul128
intrinsic was available on all even semi recent MSVC versions under x86-64. I'm not sure what is happening here - this works on CI in 2013+2015.
The build as you've set it up will be targeted specifically for x86-64 (due to use of 64 bit instructions such as the 64-bit multiply instruction causing problems here). You could use an x86-32 build under x86-64, albeit leaving some significant optimizations on the table.
this kind of error occurs if you try to build botan x64 using the VS x86 command prompt or botan x86 using the x64 command prompt.
@neusdan , can you clarify your answer a bit more ? Do you mean that the python script guessed the environment incorrectly ? Should i tell the script to generate a 64 bit version ?
you will find different visual studio command prompts in your start menu. For example one for building x86 applications and one for x64.
So if you use the x86 prompt, I think that's the default prompt, you have to tell the configure.py that you wan't to build botan in x86 mode by specifying --cpu x86
Neusdan, you were correct. So this issue may be closed.
Can we easily detect this mismatch between the configuration target and what the compiler is doing with a macro check? Since in practice it never makes sense to compile a 32-bit build with a 64-bit compiler (it would probably work, but isn't useful) or compile for a 64-bit target with a 32-bit compiler (which would result in build problems like this issue), it would be best to notice and #error
out fast.
In GCC/Clang these would be __i386__
and __x86_64__
macros, hopefully MSVC defines something similar. Even just checking x86-32 vs x86-64 and maybe arm vs aarch64 would catch most of the times this trips people up.
If i recall it right, msvc can use a predefined macro, _WIN64
, to detect a 64 bit compile.
I have downloaded the tarball of botan, which has the next version: botan-1.11.28 (tested this too at 1.11.29 - see edit here below). To build the library, i have used the instructions outlined here.
I have issued the following commands on the developer console (Visual Studio 2015 CE 64 bit)
This ran without problems. But when i issue
nmake
after that, I get an error.EDIT 1: The same problem occurs at the recent build, botan-1.11.29
Is this a known issue ? Is there a way to solve this ?
Oh, an other small question, is the build suitable for both 32 and 64 bit applications or 64 bit only ? It is not clear for me atm. Thank you.
Appendix: Here below is an outline of the output after running the python script (see the first code fragment here above). If you aren't interested in this, feel free to ignore it. It's just for those who wants to get more information.