On Mon, Jan 21, 2008 at 05:01:31PM +0000, Philip Hazel wrote:
> On Mon, 21 Jan 2008, Bob Rossi wrote:
>
> > OK, it seems like things have deteriorated a little on msys with
> > autotools. When I build with --disable-shared, I get this compile error,
> > g++ -O2 -o pcre_stringpiece_unittest.exe pcre_stringpiece_unittest.o ./.libs/libpcrecpp.a /home/bob/downloads/prcre/build/.libs/libpcre.a
> > gcc -DHAVE_CONFIG_H -I. -I../pcre-7.6-RC1 -O2 -MT pcredemo.o -MD -MP -MF .deps/pcredemo.Tpo -c -o pcredemo.o ../pcre-7.6-RC1/pcredemo.c
> > mv -f .deps/pcredemo.Tpo .deps/pcredemo.Po
> > /bin/sh ./libtool --tag=CC --mode=link gcc -O2 -o pcredemo.exe pcredemo.o libpcre.la
> > gcc -O2 -o pcredemo.exe pcredemo.o ./.libs/libpcre.a
> > pcredemo.o:pcredemo.c:(.text+0xde): undefined reference to `_imp__pcre_compile'
> > pcredemo.o:pcredemo.c:(.text+0x139): undefined reference to `_imp__pcre_exec'
> > pcredemo.o:pcredemo.c:(.text+0x1a4): undefined reference to `_imp__pcre_fullinfo'
> > pcredemo.o:pcredemo.c:(.text+0x2f8): undefined reference to `_imp__pcre_exec'
> > pcredemo.o:pcredemo.c:(.text+0x450): undefined reference to `_imp__pcre_free'
> > pcredemo.o:pcredemo.c:(.text+0x4a0): undefined reference to `_imp__pcre_free'
> > collect2: ld returned 1 exit status
> > make[1]: *** [pcredemo.exe] Error 1
> > make[1]: Leaving directory `/home/bob/downloads/prcre/build'
> > make: *** [all] Error 2
> >
> > If I add -DPCRE_STATIC to the compile command. Things work. Do you need
> > a patch or do you know how to fix this?
>
> I need a patch, I'm afraid. I have no idea how to fix this. It works
> fine on Linux.
OK, in pcredemo.c, simply add '#include <config.h>' above the rest of
the defines. (Seemed easier to say this than create a patch.
> > When I run the testsuite I get
> > ===================
> > 2 of 5 tests failed
> > ===================
> > Test 2: API and error handling (not Perl compatible)
> > FAIL: RunTest
> > FAIL: RunGrepTest
> >
> > Do you need more info on this?
>
> Yes, please.
Attached is the output of the 'make test' command.
Bob Rossi
make
make[1]: Entering directory `/home/rrossi/downloads/prcre/build-static'
make all-am
make[2]: Entering directory `/home/rrossi/downloads/prcre/build-static'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/rrossi/downloads/prcre/build-static'
make[1]: Leaving directory `/home/rrossi/downloads/prcre/build-static'
make check-TESTS
make[1]: Entering directory `/home/rrossi/downloads/prcre/build-static'
Testing FullMatch
Testing PartialMatch
Testing hex
Testing octal
Testing decimal
Testing Replace
Testing Extract
Testing Consume
Testing FindAndConsume
Testing QuoteMeta
Testing match-number peculiaraity
Testing error reporting
Testing recursion
Testing Options
Testing Option <CASELESS (class)>
Testing Option <CASELESS (class2)>
Testing Option <CASELESS (class)>
Testing Option <CASELESS (function)>
Testing Option <CASELESS (function)>
Testing Option <no CASELESS>
Testing Option <MULTILINE (class)>
Testing Option <MULTILINE (class2)>
Testing Option <MULTILINE (function)>
Testing Option <no MULTILINE>
Testing Option <DOTALL (class)>
Testing Option <DOTALL (class2)>
Testing Option <DOTALL (function)>
Testing Option <no DOTALL>
Testing Option <no DOLLAR_ENDONLY>
Testing Option <DOLLAR_ENDONLY 1>
Testing Option <DOLLAR_ENDONLY 2>
Testing Option <EXTENDED (class)>
Testing Option <EXTENDED (class2)>
Testing Option <EXTENDED (class)>
Testing Option <EXTENDED (function)>
Testing Option <EXTENDED (function)>
Testing Option <no EXTENDED>
Testing Option <no NO_AUTO_CAPTURE>
testing Option <NO_AUTO_CAPTURE>
Testing Option <UNGREEDY 1>
Testing Option <UNGREEDY 2>
Testing Option <UNGREEDY>
Testing Option <no UNGREEDY>
Testing Option <no UNGREEDY>
Testing Option <EXTRA 1>
Testing Option <EXTRA 2>
Testing Option <no EXTRA>
Testing Option <all_options (CASELESS|DOTALL)>
Testing Option <all_options (0)>
Testing Option <all_options (MULTILINE|EXTENDED)>
Testing Option <all_options (MULTILINE|EXTENDED) with constructor>
Testing Option <all_options (MULTILINE|EXTENDED) with concatenation>
Testing Option <all_options (0)>
Testing constructors
OK
PASS: pcrecpp_unittest.exe
OK
PASS: pcre_scanner_unittest.exe
OK
PASS: pcre_stringpiece_unittest.exe
PCRE C library tests
PCRE version 7.6-RC1 2008-01-21
Test 1: main functionality (Perl compatible)
OK
Test 2: API and error handling (not Perl compatible)
FAIL: RunTest
Testing pcregrep
pcregrep version 7.6-RC1 2008-01-21
Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library
Testing pcregrep newline settings
--- ../pcre-7.6-RC1/testdata/grepoutputN Tue May 1 06:21:45 2007
+++ testtry Tue Jan 22 21:53:14 2008
@@ -1,12 +1,15 @@
---------------------------- Test N1 ------------------------------
-1:abc
2:def
---------------------------- Test N2 ------------------------------
+1:abc
2:def
+ghi
+jkl---------------------------- Test N2 ------------------------------
1:abc
def
-2:ghi
+ghi
jkl---------------------------- Test N3 ------------------------------
-2:def
3:
+2:def
ghi
jkl---------------------------- Test N4 ------------------------------
-2:ghi
+1:abc
def
+ghi
jkl---------------------------- Test N5 ------------------------------
1:abc
2:def
3:ghi
FAIL: RunGrepTest
===================
2 of 5 tests failed
===================
make[1]: *** [check-TESTS] Error 1
make[1]: Leaving directory `/home/rrossi/downloads/prcre/build-static'
make: *** [check-am] Error 2