GNU bug report logs - #19777
Cross compiling grep for Mingw-w64 and wildcards don't work

Previous Next

Package: grep;

Reported by: Guitar Hero <guitarhero683 <at> gmail.com>

Date: Thu, 5 Feb 2015 02:09:01 UTC

Severity: minor

Tags: moreinfo

Merged with 16444

Full log


View this message in rfc822 format

From: Guitar Hero <guitarhero683 <at> gmail.com>
To: 19777 <at> debbugs.gnu.org
Subject: bug#19777: Cross compiling grep for Mingw-w64 and wildcards don't work
Date: Wed, 4 Feb 2015 19:24:34 -0500
[Message part 1 (text/plain, inline)]
Hello I have cross-compiled grep for Windows using the mingw-w64 32-bit
toolchain. I have some problems with it on Windows and I had some problems
building. The steps I took in Ubuntu were:

sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tool
sudo apt-get install autopoint bison libbison-dev gperf texinfo

Clone the grep repo; currently at master 846e7ee.

./bootstrap
./configure --host=i686-w64-mingw32

There were errors because Werror is enabled. I edited the lib/Makefile
directly to remove -Werror from WERROR_CFLAGS. I built again and got
warnings like "cast from function call of type 'intptr_t' to non-matching
type 'void *'". A list of the warnings is attached.

Now I have a grep.exe but wild cards aren't working from the command
prompt. And from the msys bash shell directories are bad file descriptor.

grep -r a *
grep: *: Invalid argument

From bash I get bad file descriptors for directories:

$ /c/grep -r a *
c:\grep.exe: dir: Bad file descriptor

I really would like to use grep on windows, primarily from the command
prompt. I don't know if I've done anything that is wrong or maybe there is
a bug somewhere. Unfortunately I don't think I'll be able to fix what is
happening. Can you help?
[Message part 2 (text/html, inline)]
[grep build warnings.txt (text/plain, attachment)]

This bug report was last modified 10 years and 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.