Re: [pcre-dev] A test for the memory mismatch problem

Pàgina inicial
Delete this message
Autor: Bob Rossi
Data:  
A: pcre-dev
Assumpte: Re: [pcre-dev] A test for the memory mismatch problem
On Mon, Apr 02, 2007 at 11:43:06AM -0400, Sheri wrote:
> Bob Rossi wrote:
> >On Mon, Apr 02, 2007 at 11:00:13AM -0400, Sheri wrote:
> >
> >>Philip Hazel wrote:
> >>
> >>>The URL wasn't particularly helpful, but I did find
> >>>
> >>>http://msdn2.microsoft.com/en-us/library/28d6s79h.aspx
> >>>
> >>>which talks about .def files. However, I find from there this:
> >>>
> >>> In newer compiler versions, you can export data, functions, classes,
> >>> or class member functions from a DLL using the __declspec(dllexport)
> >>> keyword. __declspec(dllexport) adds the export directive to the
> >>> object file so you do not need to use a .def file.
> >>>
> >>>and I note that pcre.h does have the --declspec magic.
> >>>
> >>>I am learning more about Win32 that I really want do. :-)
> >>>
> >>>
> >>I know how exactly how you feel :D
> >>
> >>It sounds like it will be awhile yet before the Cmake approach supports
> >>shared dlls for Windows. I hope (but never expect) anything new to go
> >>smoothly.
> >>
> >
> >Sheri,
> >
> >Just curious, what environment are you in that is causing you all of
> >this trouble? (compiler, shell, ...)
> >
> >Bob Rossi
> >
> >
> Hi Bob,
>
> Thought you knew, Msys, mingw. Mingw uses gcc as compiler. Msys is a
> bash-like shell I'm running on Windows XP Pro, my sole use of it has
> been to make pcre dlls.


Well, I also am building pcre in mingw/msys. I was able to build rc3
out of the box. So now the question is, what's wrong with your msys
setup? :) No seriously, lets figure out what the difference is.

> After the libraries are produced, I run pcretest.exe via the RunTest.bat
> file (have to first copy RunTest.bat and the testdata dir into .libs --
> or sometimes I move pcretest.exe, *.dll, RunTest.bat and the testdata
> dir into a separate pcretestdir). My environment for running the tests
> is Windows XP Pro SP2 command prompt. If I type ver at the command
> prompt it says Microsoft Windows XP [Version 5.1.2600]
>
> The dll is ultimately used in a standard Windows environment.


With rc3, do this in the msys shell,

$ tar -zxf pcre-7.1-RC3.tar.gz               
$ mkdir build                                
$ cd build                                   
$ ../pcre-7.1-RC3/configure --prefix=$PWD/../prefix --disable-shared
--enable-static
$ make
$ make install
$ make check


Does that verify that building pcre with mingw/msys works when building
pcre statically?

Now, lets try to understand how far you get when building a dll.

$ cd ..
$ mkdir build-shared
$ cd build-shared
$ ../pcre-7.1-RC3/configure --prefix=$PWD/../prefix-shared
--enable-shared --disable-static
$ make
$ make install

Now does that build all of pcre successfully as a shared library? When I
run 'make check' with the a shared version of the pcre build, it just
hangs. I didn't ever take the time to figure out why. Is this the issue
that you are having?

The output of msysinfo,

$ msysinfo                                                       
msysinfo-1.3: Send this to the MSYS support list:                


  MSYS 1.0.11(0.46/3/2) 2004-04-30 18:55 i686 unknown; targ=MINGW32
  GNU bash, version 2.04.0(1)-release (i686-pc-msys); ENV=.profile
  GNU Make version 3.79.1,Built for i686-pc-msys; MAKE_MODE=unix   
  gcc.exe (GCC) 3.4.2 (mingw-special); targ=MINGW32
  GNU ld version 2.15.91 20040904
    5927498 Fri Apr 30 23:15:08 2004 /bin/msys-1.0.dll
      52064 Thu Jan 02 08:05:27 2003 /bin/msysltdl-3.dll
     135680 Fri Apr 30 23:15:05 2004 /bin/make.exe
      88064 Tue Sep 21 05:15:22 2004 /mingw/bin/gcc.exe            
     642048 Sat Sep 04 20:45:43 2004 /mingw/bin/ld.exe
  HOME=/home/bobbybrasko                 
  Sysname=MINGW32_NT-5.1  OSTYPE=msys  TERM=vt100
  PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/windows/system32:/c/win 
  dows:/bin:/c/Program Files/Subversion/bin:/c/python25



Thanks,
Bob Rossi