Showing posts with label gnu. Show all posts
Showing posts with label gnu. Show all posts

Sunday, July 12, 2009

MinGW, Cygwin: Building GNU Bash 4

Using MinGW and Cygwin in Windows ME, I kept getting the same errors:


[main] sh fork: child -1 died waiting for longjmp before initialization

sh fork: resource temporarily unavailable

I have no clue what causes this problem. I just hope that building GNU bash myself would solve this problem. So I downloaded the source for GNU Bash 4.0. Before beginning bash compilation, I made sure zlib, libiconv and gettext were all installed. To see how I compiled these 3 libraries, read the beginning of this post.



Then, I configured bash:


./configure --prefix=/ --enable-alias --enable-arith-for-command --enable-array-variables --enable-brace-expansion --enable-casemod-attributes --enable-casemod-expansions --enable-command-timing --enable-help-builtin --enable-history --enable-job-control --enable-multibyte --enable-prompt-string-decoding --enable-readline --disable-nls

make

make install

Friday, July 3, 2009

MinGW: Porting GNU Regex to Windows

I am not sure if this regex thing is really necessary. Because it was mentioned in README.xmingw, I'll compile it just in case. I downloaded regex-0.12.tar.gz from http://ftp.gnu.org/old-gnu/regex/ and compiled it as follows:


cd $HOME
tar xzvf regex-0.12.tar.gz
cd regex-0.12/
gcc -DSTDC_HEADERS -DHAVE_STRING_H=1 -I. -c regex.c
ar ru libregex.a regex.o
cp libregex.a /mingw/lib
cp regex.h /mingw/include/


Using the PCRE library instead


The Perl Compatible Regular Expressions (PCRE) library can be used as replacement for the POSIX regex functions. Download the latest pcre library from here and compile it as follows:


./configure --prefix=/mingw --enable-pcre16 --enable-unicode-properties
make
make install

Rename some files so that programs requiring regex can be linked with pcre library.


cd /mingw/include
cp pcreposix.h regex.h

And,
cd /mingw/lib
cp libpcreposix.a libregex.a
cp libpcreposix.dll.a libregex.dll.a

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger