[Botan-devel] configure: mingw compilation

Zbigniew Zagórski z.zagorski at gmail.com
Tue May 11 17:08:58 EDT 2010


For some time botan doesn't build correctly in MinGW environment.

First, currently build script cannot setup correct DLL build.
--disable-shared works, How shall can i instruct "configure.py" and
it's friends that on mingw DLL build is not possible ?

Second, "make install" doesn't work because all paths in generated
makefile use \ as path separator. In some cases it works, in some not.

Currently at least "docs" can't be installed because of following error:

$ make install
Installing Botan into /mingw...
for i in readme.txt doc\api.pdf doc\tutorial.pdf doc\api.tex
doc\tutorial.tex doc\fips140.tex doc\credits.txt doc\license.txt
doc\log.txt do
c\thanks.txt doc\pgpkeys.asc; do \
           install -m 644 $i /mingw/share/doc/botan-1.9.7; \
install: cannot stat `docapi.pdf': No such file or directory
install: cannot stat `docpgpkeys.asc': No such file or directory

Not sure what is "the best" fix, but my bet is that all paths are
rendered in "unix" makefile shall be separated by "/" regardless of
platform python is running ... so here is patch for that. It simply
_ensures_ that every \ is replaced with / when creating path-like
variables in create_template_vars function.

I know it's rather ugly solution but at least it solves the problem -
make & make install

(patch: botan-configure-on-mingw-fix.patch )


Third: MSVC is selected blindly on windows even if gcc is on PATH and cl not.

Second patch, correctly (IMHO) chooses between MSVC and GCC on
windows: if cl.exe is on path, selects "msvc", if g++.exe is on path
selects "gcc" otherwise defaults to "msvc".

(patch: botan-correcly-detect-mingw2.patch)

Both patches generated against 1.97 (a5f25a3b954f24c5d07fa0dab6c4d76f63767165)


Zbigniew Zagórski
/ software developer / geek / http://zbigg.blogspot.com /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: botan-correctly-detect-mingw2.patch
Type: application/octet-stream
Size: 1638 bytes
Desc: not available
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20100511/574ae956/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: botan-configure-on-mingw-fix.patch
Type: application/octet-stream
Size: 5657 bytes
Desc: not available
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20100511/574ae956/attachment-0001.obj>

More information about the botan-devel mailing list