3

I am trying to build xmlsec on Windows... I am not an experienced C/C++ developer and not really familiar with the build process if something along the lines of "make ... make install" doesn't do the trick.

xmlsec comes with a Win32 subdirectory, a nice ECMAScript configure.js that takes an optional bunch of parameters and a readme which explains that after running the configure, "nmake ... nmake install" should do the trick. (Obviously it isn't quite that easy or I wouldn't be posting here!)

xmlsec also depends on a number of other libraries (see here for a graphic). I have downloaded the sources for those libraries.

My problem is that I don't know how to arrange those sources, or what to tell the configure.js script, in order to get a build to work.

For instance, the nmake process complains that it can't find "iconv.h" (iconv is one of the required libraries), which is not surprising because there isn't one. Instead there is an "iconv.h.in" and an "iconv.h.build.in"... which I don't know what to do with to produce the required 'iconv.h".

(I am using MS Visual Studio 2010 at the command prompt (which I think is the recommended approach.)

Does anybody out there know how to do this? Any help at all would be very much appreciated.

TIA

Mike Peat

Mike Peat
  • 445
  • 1
  • 6
  • 14

3 Answers3

1

You don't need to build xmlsec, you can directly download the wheel file from this link https://github.com/mehcode/python-xmlsec/releases

It has all the dependencies installed with it.

Shivam_kira
  • 109
  • 3
0

have you tried the Msys with Mingw32 compiler? In Msys, you can do make and make install trick. I have successful with Msys in compile xmlsec. If you want to use Msys and have difficulties, I can help.

Anyway, in general, there must be a iconv.h file in the pre-compile folder provided by Zlatkovic (i.e C:\iconv\include\iconv.h). You may want to download again the folder. After figure out where all the dependencies are, put the path in environment path. For your information, I once tried with the configure.js but not successful. Hope that you are luckier than me :D

Kristine T
  • 101
  • 8
  • Hi Kristine - I used MS Visual Studio at the command prompt. I found a version of iconv.h that did the job somewhere (on the web I think... or maybe in one of the many zip files I had downloaded). I did go through the configure.js route, using a modified version of Aleksey's mycfg.bat, followed by nmake. I was heading down the Mingw32 route (to the point of having installed both that and Cygwin), but then I tripped over the mycfg.bat file and things started to get clearer... once I had all the right bits in the right places it all just worked. Thank you for your offer though. – Mike Peat Oct 04 '12 at 13:00
  • Hi again Kristine - it turns out that my approach using Visual Studio had a small flaw: it linked to the wrong runtime DLL (it needed msvcrt.dll & after trying numerous versions of VS I couldn't get one that linked to that). So I am now using MinGW in MSys, but I am having problems. Can you give me any idea about how you set things up to get a clean build? TIA. Mike – Mike Peat Oct 21 '12 at 16:33
  • Could you describe the problems that you got? Did you try to run "make clean" to clear all the previous "build"? – Kristine T Oct 23 '12 at 02:26
  • Kristine - see below... this reply box seemed to run out of characters (annoyingly it is OK now though). – Mike Peat Oct 24 '12 at 13:07
  • Last time, I also have to use the src of libxslt while the libxml2 and openssl is OK for the configure part. But I did not see the dl.c error. Sometimes, the download process make something in your package fail. Just try and good luck :D – Kristine T Oct 26 '12 at 04:07
0

Hi Kristine (@Kristine T) - (and thanks for getting back to me!)

I had not been doing "make clean", but have now done so ("make clean", followed by "make" - no change in the result though).

The problem I get with the "make" is that it throws an error on compiling "dl.c" saying that "PACKAGE" is undefined (line 295).

I have also had problems using the compiled version of libxml2 - "configure" always says it can't find it (it is there, but...), so I have been using the --with-libxml-src=... parameter to configure, giving it the full source of libxml2 to work with, getting configure to at least finish OK.

I don't have the same problems with openssl or libxslt where I can either tell configure about the compiled version (using --with-XXX={path-to-dir}, or just omit ={path} bit, in which case it seems to find MinGW's own versions, but that doesn't work with libxml2.

Mike

Mike Peat
  • 445
  • 1
  • 6
  • 14