[botan-devel] Building Botan trunk on Windows

Marcel lists at nightsoul.org
Tue Feb 11 13:33:32 EST 2014

Okay, I did some more testing. With the boost-filesystem fix, here's the next un-#ifdef-ed include:
botan_all.cpp:55992: boost/algorithm/string.hpp

There's tlhelp32.h included in botan_all.cpp:24366, that results in some missing windows types. Including windows.h before fixed it but I'm not sure if thats the 'right' fix. After all, windows.h is conditionally included far earlier if BOTAN_TARGET_OS_HAS_QUERY_PERF_COUNTER.

Furthermore, with --disable-avx2 there's another instruction that needs -mpclmul to compile (sse4.1 is not necessary):
botan_all.cpp:38115: T0 = _mm_clmulepi64_si128(a, b, 0x00);
Is there a switch to disable that piece of code, too?


Am 11.02.2014 um 03:13 schrieb Uri Blumenthal <uri at MIT.EDU>:

> One possibility why AVX2 intrinsics fail is that some compilers (GCC and CLANG to name a couple) may need the following flags: “-maes -mpclmul -msse2 -mssse3 -msse4.2”. 
> Jack, configure.py does not take care of this. IMHO it should.
> Marcel, try to hack the generated Makefile, adding those flags by hand, and see whether it improves the situation.
> On Feb 10, 2014, at 17:50 , Jack Lloyd <lloyd at randombit.net> wrote:
>> On Mon, Feb 10, 2014 at 06:19:24PM +0100, Marcel wrote:
>>> First, the configure.py script seems to recognize --without-boost, but doesn't act accordingly. There is still <boost/filesystem.hpp> included in cert/x509/certstor.cpp:9.
>> Thank you for pointing this out; the use of Boost in the library is
>> very new and still has some sharp edges. I've fixed this problem for
>> future releases.
>>> Second, after I built boost-filesystem I couldn't figure out a way to tell
>>> configure.py where to find it (to build a shared lib).
>> At the moment configure.py doesn't know how to deal with this at all, something
>> which affects the use of any of the 3rd party libs (zlib, etc). I plan to have
>> better support for this in the future but at the moment having libs in
>> 'unexpected' (ie outside of the normal compiler search path) requires directly
>> hacking the generated makefile to add the appropriate -L/path/to/lib flags.
>>> I fixed that by including boost through the qmake project config. Now g++
>>> gives me exactly 2677 errors. The first few look like this:
>>> http://pastebin.com/RzTN7VBw
>> All of the errors in the paste come from the use of AVX2 intrinsics. I'm not
>> sure why this would fail, perhaps the current MinGW GCC doesn't support them?
>> Or there may well be a problem in the code or build config; the use of AVX2 is
>> also very new and not well tested. In any case, you can work around by passing
>> `--disable-avx2` to configure. The only thing you lose by doing this, at least
>> at the moment, is the AVX2 Threefish implementation.
>> Hope this helps,
>> Jack
>> _______________________________________________
>> botan-devel mailing list
>> botan-devel at randombit.net
>> http://lists.randombit.net/mailman/listinfo/botan-devel
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel

More information about the botan-devel mailing list