This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PCRE package for consideration


On Mon, 28 Apr 2003, Gerrit P. Haase wrote:
> Am Montag, 28. April 2003 um 16:27 schriebst du:
> > On Mon, 28 Apr 2003, Gareth Pearce wrote:
> >>>> [1] = relibtoolizing et.al. with the included reconf-cygwin.sh
> >>>>       shellscript
> >>> The Cygwin/Windows part doesn't use Libtool for a reason: DLLs don't get
> >>> created properly with the current libtool (as you have apparently found
> >>> out in another mail).
> >> I'm confused, wasnt the point of libtool 1.5 being that dll's Did finally
> >> work with cygwin?
> > AFAIK, yes, but as Gerrit found out, when linking pcreposix, the DLL gets 
> > linked to the installed cygpcre.dll. Libtool does, therefore, make a DLL, 
> > but not a correct one.
> Hmmm, I *guess* this problem is because the Makefile.in is handcrafted,
> I encountered similar problems with expat which also doesn't use
> Automake for generating the Makefile.in.  So there are probably just the
> right flags missing.
The Libtool-generated gcc command looks like this:

gcc -shared  .libs/pcreposix.o  -L/home/RLandheer/pcre-cygwin/pcre-4.2 
/home/RLandheer/pcre-cygwin/pcre-4.2/.libs/libpcre.dll.a  -o 
.libs/cygpcreposix-0.dll -Wl,--image-base=0x10000000 
-Wl,--out-implib,.libs/libpcreposix.dll.a

This means it uses the proper import library - the one generated earlier 
by this gcc command:

gcc -shared  .libs/maketables.o .libs/get.o .libs/study.o .libs/pcre.o   
-o .libs/cygpcre-0.dll -Wl,--image-base=0x10000000 
-Wl,--out-implib,.libs/libpcre.dll.a

When taking a look at the generated cygpcreposix-0.dll, you'll see that 
the link is OK: the DLL depends on the local cygpcre-0.dll

It's the relink during the install that breaks the library:

/bin/bash ./libtool --mode=install /usr/bin/install -c libpcreposix.la 
/home/RLandheer/pcre-cygwin/pcre-4.2/.inst/usr/lib/libpcreposix.la
libtool: install: warning: relinking `libpcreposix.la'
(cd /home/RLandheer/pcre-cygwin/pcre-4.2/.build; /bin/bash ./libtool 
--mode=relink gcc -O2 -I. -I/home/RLandheer/pcre-cygwin/pcre-4.2 -rpath 
/usr/lib -L. -lpcre -no-undefined -version-info 0:0:0 -o libpcreposix.la 
pcreposix.lo -inst-prefix-dir /home/RLandheer/pcre-cygwin/pcre-4.2/.inst)

So, if we really want to use Libtool, would doing a 
libtool --finish /usr/lib 
in a postinstall script fix this?

rlc



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]