Hi Stefan,
thank you very much for the prompt reply!
Honestly I don't understand all you wrote although I'll do my best in order to do it.
In the meantime I'm digging the matter having find some answers to my questions, but seems to me too complicated for me, out of my capabilities.
OK, I can turn off libusb, but then the program that I'll get will be working?
I guess it will be.
Now I understand why nobody provide Windows version of flashrom each time there is an upgrade.
Only Linux version that it is more easily obtainable.
You wrote about cross-compiling flashrom for Windows, maybe that is more easy than compiling on a Windows system, which could be one solution.
By reading http://flashrom.org/Windows page seems to me cross-compiling on Linux for Windows is more complicated though.
If it isn't too much trouble could you please describe how do the job?
I mean a description of your MinGW installation and the exact commands issued.
Instructions on the site say
$ cd flashrom
$ make
are enough in order to compile under Windows.
Instead on Linux for Windows you need
$ make CC=i586-mingw32msvc-gcc CPPFLAGS="-I.../libusb-headers/ -I.../libftdi-headers/" LDFLAGS="-L.../libusb-static/ -L.../libftdi-static/"
If it could be possible to see a real life example I think it would be of much help.
Another thing.
In your example you compile with "i686" option while in the instructions on the flashrom Windows site it's used the "i586".
Compiling by
$ cd flashrom
$ make
there isn't any of the two options, so which option will be used in order to compile?
My purpose is to get a flahrom executable which will be able to run on any generic Windows machine.
Snapshots on http://ra.openbios.org/~idwer/flashrom/mingw/ I guess have been compiled in that way, apart from the mingw32-w64-flashrom-r1781.exe of course.
Thanks again Stefan,

Mit Freundlichen Grüßen,

Topolinux


Il Lunedì 16 Marzo 2015 12:00, "flashrom-request@flashrom.org" <flashrom-request@flashrom.org> ha scritto:


Send flashrom mailing list submissions to
    flashrom@flashrom.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://www.flashrom.org/mailman/listinfo/flashrom
or, via email, send a message with subject or body 'help' to
    flashrom-request@flashrom.org

You can reach the person managing the list at
    flashrom-owner@flashrom.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of flashrom digest..."


Today's Topics:

  1. Re: Compile under MinGW32, how? (Stefan Tauner)


----------------------------------------------------------------------

Message: 1
Date: Sun, 15 Mar 2015 23:14:51 +0100
From: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
To: Topolinux <mailing_l1st@yahoo.it>
Cc: flashrom@flashrom.org
Subject: Re: [flashrom] Compile under MinGW32, how?
Message-ID: <201503152214.t2FMEqKP009468@mail2.student.tuwien.ac.at>
Content-Type: text/plain; charset=UTF-8

On Sun, 15 Mar 2015 20:41:22 +0000 (UTC)
Topolinux <mailing_l1st@yahoo.it> wrote:

> Hi guys,
> sorry to disturb you.
> Based on instructions I saw here:
> http://flashrom.org/Windows
> I installed MinGW32 on my Windows XP machine in order to try to compile the latest flashrom release which I need.
> Sadly I'm unable to compile anything because I get the errors as follow:
>
> **************************************************************************************
> $ make
> Files don't seem to be under version control. Replacing all version templates wi
> th 0.9.8-r1888.
> Package libftdi was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libftdi.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libftdi' found
> Package libusb was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libusb.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libusb' found
> Checking for a C compiler... found.
> Target arch is x86
> Target OS is MinGW
> Checking for libusb-0.1/libusb-compat headers... .test.c:3:23: fatal error: lusb
> 0_usb.h: No such file or directory
> ?#include <lusb0_usb.h>
> ?????????????????????? ^
> compilation terminated.
> not found.
>
> Please install libusb-0.1 headers or libusb-compat headers.
> See README for more information.
>
> make: *** [hwlibs] Error 1
> **************************************************************************************
>
> A weird thing is that I had to manually install the pkg-config package, that isn't listed in the instructions.
> Anyway I'm pretty sure I have all the files in the right places and I guess my fault is due the fact I'm not able to figure how and where edit the PKG_CONFIG_PATH that indeed I haven't in nowhere.
> I wonder where I can see an example of PKG_CONFIG_PATH, any suggestions?
> Thanks.
> I need compile flashrom for Bus Pirate, so is there any mandatory flag that have to be set?
> Honestly I didn't know it was so complicated to compile for Windows, by read of the instructions it seemed to me pretty easy, but it isn't.
> Is perhaps there any documentations that explain clearly how do the job?
> I think that a description of the folders and the files inside them can be enough in order to understand, sadly I have seen nothing like that.
> Last but not least.
> Maybe I'm wrong, though seems to me that the way as MinGW is installed allows to move the installation easily, almost like an portable application.
> Am I wrong?
> If I'm not wrong this means that should be possible achieve a running environment if someone would provide one.
> Anyway I'm pretty sure that being be able to see a working installation would help to settle the matter.
> Thanks for reading!

The documentation is not up to date. flashrom requires libusb now at
build time because of the inclusion of a libusb-based programmer. You
can turn it off (and thus enable compilation without libusb) by adding
CONFIG_PICKIT2_SPI=no to the command line (for now).

I am only cross-compiling flashrom for windows so I am not sure if that
helps you, but there I am using the newly introduced LIBS_BASE make
parameter to indicate the path containing the include and lib
directories with the respective header and library files like so:

make LIBS_BASE=/home/flashrom/cross-libs/i686-w64-mingw32

The layout within that directory should look like the common unix
layout, i.e. /lib containing *.a, /bin with *.dll and /include with *.h
files.

The PKG_CONFIG_PATH message can be ignored usually. The default will
probably work anyway.

--
Kind regards/Mit freundlichen Gr??en, Stefan Tauner



------------------------------

Subject: Digest Footer

_______________________________________________
flashrom mailing list
flashrom@flashrom.org
http://www.flashrom.org/mailman/listinfo/flashrom

------------------------------

End of flashrom Digest, Vol 70, Issue 28
****************************************