[xmlsec] Problem with xmlsec configure

Roumen Petrov xmlsec at roumenpetrov.info
Tue Dec 11 15:51:22 PST 2012


Mike Peat wrote:
> Hi
>
> I am trying to build xmlsec using MinGW/MSys. I have built (I think) 
> all of the underlying libraries OK:
>
>    OpenSSL: ALL TESTS SUCCESSFUL
>    LibXML2: 10 errors over 2,874 tests... but: "those ebcdic tests 
> have never worked on Windows"
Ignore this. It is out of scope
>    LibXSLT: Tests seemed mostly successful - there didn't seem to be a 
> summary
>
> I am using the following configure (after a "make clean"):
>
> ./configure --prefix=/projects/xmlsec/xmlsec1-1.2.18 \
>             --with-libxml-src=/projects/xmlsec/libxml2-2.9.0 \
>             --with-libxslt-src=/projects/xmlsec/libxslt-1.1.27 \
>             --with-openssl=/projects/xmlsec/openssl-1.0.1c \
>             --host=i686-pc-winnt
>
> Note that if I do not use the --host-i686-pc-winnt option I get a 
> rather strange error from ./configure:
You host triplet has to be resolved to prefix of cross compiler and 
--host= is option . Review you output from configure command. For instance
lest see argument i686-mingw32 . Why with this - just because name of my 
cross-compiler is i686-mingw32-gcc.
$ ./config.sub i686-mingw32
i686-pc-mingw32

$ /configure ..... --host=i686-mingw32
checking build system type... x86_64-gnu-linux-gnu
checking host system type... i686-pc-mingw32
...
checking whether make sets $(MAKE)... yes
checking for i686-mingw32-gcc... i686-mingw32-gcc
checking whether the C compiler works... yes
....


> configure: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details
Please see config.log !

>
> Anyway, that completes OK, then I do:
>
[SNIP]

> Followed shortly by:
>
> xmlsec.o: In function `xmlSecAppSignFile':
> E:\MinGW\msys\1.0\projects\xmlsec\xmlsec1-1.2.18\apps/xmlsec.c:1250: 
> undefined r
> eference to `_imp__xmlSecDSigNs'
So you build is native. Error is not expected .
Skip --host argument. Ensure that you build use mingw compiler not msys 
one.


[SNIP]

> Now I have built openssl-1.0.1c with the "shared" option passed to its 
> "./config" and all appeared to be OK with that.
Not all platforms support mixing static and dynamic libraries.

> Adding the --enable-static-linking flag to my ./configure doesn't seem 
> to make any difference.
>
> Basically... what am I doing wrong here?

Try to build in apps directory (after make clean !) with following :
$ make CPPFLAGS='<YOU_CPPFLAGS> -DXMLSEC_EXPORT_VAR=extern'
Get <YOU_CPPFLAGS> from Makefile.
If xmlsec binary work fine build system could be improved. I mean 
configuration with --enable-static-linking flag. May be binary will be 
linked with static xmlsec libraries and all other as shared .

> Thanks in advance.
> Mike

Regards,
Roumen



More information about the xmlsec mailing list