[Open-scap] Building on Windows
Daniel Kopecek
dkopecek at redhat.com
Fri Oct 18 09:55:20 UTC 2013
Hi Chris,
On Fri, 11 Oct 2013 08:42:54 -0500
Chris Grahlmann <Chris.Grahlmann at ultra-ats.com> wrote:
> Simon,
> Thanks for the info. I grabbed an old version and it gets past the
> probes but fails and puts me in header file hell. I googled around
> and see that other people are having the same issue. I'll see if I
> can resolve it.
I'm currently working on a portable branch of the OpenSCAP sources.
I've reintroduced the --disable-probes option. You might want to give
it a try instead of working with an older revision of the sources.
We have an easy to setup cross-compilation environment on Fedora and
I'm using that to compile OpenSCAP for Windows. Here's the recipe:
1) Install the cross-compiler & dependencies
# yum install mingw32-gcc mingw32-binutils mingw32-libxml2 \
mingw32-libgcrypt mingw32-pthreads mingw32-libxslt \
mingw32-curl mingw32-pcre \
automake autoconf libtool
2. Checkout the portable branch of the OpenSCAP repository
$ git clone -b portable git://git.fedorahosted.org/git/openscap.git \
openscap-portable.git
$ cd openscap-portable.git/
3. Prepare the build
$ ./autogen.sh
$ mingw32-configure --disable-probes --disable-python
4. Build!
$ make -k 2> build-errors.log
5. Inspect build-errors.log for problems
$ grep -E '(error:|implicit)' build-errors.log
oscap_acquire.c:32:17: fatal error: ftw.h: No such file or directory
rbt_i32.c:36:9: warning: implicit declaration of function 'posix_memalign'
rbt_i64.c:35:9: warning: implicit declaration of function 'posix_memalign'
rbt_str.c:39:9: warning: implicit declaration of function 'posix_memalign'
tailoring.c:200:2: warning: implicit declaration of function 'strverscmp'
oscap-tool.c:37:17: fatal error: ftw.h: No such file or directory
oscap-oval.c:37:17: fatal error: ftw.h: No such file or directory
oscap-info.c:37:26: fatal error: linux/limits.h: No such file or directory
So this is basically the list of current problems. If we fix them, then
OpenSCAP will compile on Windows (without probes). I'm working on a
patch to replace the posix_memalign call on win32 platforms.
Any ideas for replacing the ftw.h API on Windows?
Dan K.
> -----Original Message-----
> From: Simon Lukasik [mailto:slukasik at redhat.com]
> Sent: Thursday, October 10, 2013 5:10 AM
> To: Chris Grahlmann
> Cc: open-scap-list at redhat.com
> Subject: Re: [Open-scap] Building on Windows
>
> On 10/09/2013 05:33 PM, Chris Grahlmann wrote:
> >
> >
> > Has anybody had any luck getting this to build on Windows from the
> > following ( http://www.open-scap.org/page/Windows ) ? I tried to
> > get it to work without the probes using both configure
> > --disable-probes and configure --enable-probes-independent=no
> > -enable-probes-unix=no.
> >
> > Both times the output from the config shows it with the probes
> > enabled:
> >
> >
> >
> > === probes ===
> >
> > system_info: yes
> >
> > family: yes
> >
> > textfilecontent: yes
> >
> > textfilecontent54: yes
> >
> > variable: yes
> >
> > xmlfilecontent: yes
> >
> > filehash: yes
> >
> > filehash58: yes
> >
> > environmentvariable: yes
> >
> > environmentvariable58: yes
> >
> >
> >
> > So then when I run the make I get:
> >
> >
> >
> > probes/fsdev.c:56:3: error: #error "Sorry, your OS isn't supported."
> >
> > probes/fsdev.c: In function 'fsdev_init':
> >
> >
>
> Hello Chris,
>
> It seems that these windows instructions are dated. The
> --disable-probes option of ./configure command has been dropped by
> ad723e1cf5b5014095a3f2f5743384239a903d3b.
>
> Reading through code, I guess you will not be able to build master
> without fsdev.c support or makefile changes. And the fsdev.c seems to
> be currently implemented only for posix like systems.
>
> You can try to rebuild older sources (without that breaking patch).
>
> I remember that there were some users who managed to compile on
> windows, but I am not sure if they were able to contribute patches
> back to the community.
>
> We will happily review your patches!
>
> Best regards,
>
> --
> Simon Lukasik
> Security Technologies
>
> Disclaimer
> The information contained in this communication from
> chris.grahlmann at ultra-ats.com sent at 2013-10-11 09:42:58 is
> confidential and may be legally privileged. It is intended solely for
> use by open-scap-list at redhat.com and others authorized to receive it.
> If you are not open-scap-list at redhat.com you are hereby notified that
> any disclosure, copying, distribution or taking action in reliance of
> the contents of this information is strictly prohibited and may be
> unlawful.
More information about the Open-scap-list
mailing list