_stati64 patch (Was: [PATCH] Fix include path separator)
Joshua Watt
jpewhacker@gmail.com
Tue Jan 1 00:00:00 GMT 2019
On 7/14/19 4:23 PM, Mark Wielaard wrote:
> Hi Joshua,
>
> On Tue, 2019-07-09 at 16:59 -0500, Joshua Watt wrote:
>>> BTW. I don't know much about windows, and I assume it doesn't ship with
>>> bash. But maybe you could take a peek at the bzip2-tests repository and
>>> see if you could somehow make that work on Windows?
>>> https://sourceware.org/git/bzip2-tests.git
>> Windows isn't really my preferred OS either; I'm tasked with maintaining
>> an embedded Linux cross compiling environment for Windows as part of my
>> day job, so I end up dealing with it more that I would perhaps like :)
>>
>> Anyway, the good news is that you don't really need to make any changes
>> to the bzip2-tests repo; it works fine on Windows as is. As previously
>> stated, I compiled bzip2 using MinGW (http://www.mingw.org/). There is
>> also a related project called msys (http://www.mingw.org/wiki/MSYS) that
>> will give you a traditional bash shell (as well as most other standard
>> utilities) in Windows. The run-tests.sh script works just fine there and
>> all the tests pass, using a build of bzip2 from b07b105 ("Accept as many
>> selectors as the file format allows.").
> That is really awesome. Thanks so much for testing that out.
> Can a cross build bzip2 using MinGw (and msys) be run under Wine?
> That might give us a build CI pipeline for testing bzip2 using the
> buildbot. It might not be identical to running under actual Windows.
> But it might be scripted/automated.
We do something similar to that to test our MinGW SDKs for the Yocto
Project. We cross compile the SDK using the MinGW toolchain on Linux
(note that MSYS is not required; the Linux system already has all the
POSIX tools), then run a set of automated tests under Wine.
You might be able to take this approach also. It wouldn't verify that
you can actually compile under Windows (as stated, it is a cross compile
from Linux), but it would give some amount of confidence that you can
actually run the cross compiled bzip2 on Windows and it will pass the
tests. You are correct that Wine isn't a fully faithful reproduction of
Windows; I've found a few things that just refuse to run properly under
wine, but do fine on actual Windows.
Most distros have a ready-made MinGW GCC compiler that can be installed.
The harder part is getting any additional dependencies. Most of the
distros I've seen don't have very many of the MinGW cross compiled
library (why would they?) so if your trying to cross compile a large
codebase, you can easily get into trouble with missing dependencies. The
Yocto project has an advantage in this regard because we are already
compiling everything from source anyway, so cross compiling the
requisite dependencies for MinGW isn't any additional work. I think that
bzip2 might also be able to be cross compiled easily because it doesn't
have very many dependencies.
If you want to verify that you can compile under Windows, you might be
able to install MSVC in wine and use it to build bzip2. You *might* also
be able to install the Windows version of MinGW and MSYS in wine. I
don't know how stable this would be or if it would work at all.
> Thanks,
>
> Mark
More information about the Bzip2-devel
mailing list