delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/18/15:18:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3C715FF7.5050702@ece.gatech.edu>
Date: Mon, 18 Feb 2002 15:11:35 -0500
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Stephano Mariani <sk DOT mail AT btinternet DOT com>
CC: cygwin AT cygwin DOT com, libtool AT gnu DOT org
Subject: Re: Specifying a .def file for use with libtools libraries
References: <007601c1b8b3$292127a0$01000001 AT sknet01>

You do know that there are TWO (or more) different versions of libtool 
in the cygwin distribution, right?  One is based on libtool-1.4.2 and 
uses dlltool to generate the DLL.

The other is based on libtool-cvs(2002-02-02) and uses gcc/ld directly 
to build the DLLs.  (Note that there are TWO commands to generate DLLs: 
"archive_cmds" and "archive_expsym_cmds".  Which one is used depends on 
a bunch of stuff).

Finally, there's whatever version of libtool was used in the package you 
are working on: most libtoolized packages ship with a ltmain.sh file 
already.

If you didn't explicitly re-libtoolize the package, then you are using 
whatever version of libtool the upstream maintainer used.  If you DID 
explicitly relibtoolize, then you are EITHER using 1.4.2 or 2002-02-02, 
depending on what the wrapper script detects from your configure.in/ac file.

If you didn't understand that (what's all this about wrapper scripts??), 
then you REALLY need to read /usr/doc/Cygwin/auto*.README, 
/usr/doc/Cygwin/libtool*.README and check out THIS email message:
http://cygwin.com/ml/cygwin-announce/2001/msg00177.html

Now, which version of libtool are you REALLY using?

--chuck

P.S. with respect to the cygwin "devel" libtool, it is a work in 
progress.  It works for everything *I've* tried so far: "normal" C and 
C++ dlls.  I haven't attempted to hide symbols (as you are doing) so I 
can neither confirm nor deny that it works/breaks.  Of course, I don't 
know if even the OLD libtool-1.4.2 method *really* allows that, so this 
may not be a "regression" per se.  Also, Ralf Habacker *previously* 
problems wrt KDE DLLs using the 20010531 cygwin "devel" libtool, but I 
don't know whether the 20020202 cygwin "devel" libtool fixes those 
problems for him.  (Again, this is not a regression because 1.4.2 can't 
build the KDE DLLs at all, so...)

Stephano Mariani wrote:

> Yes, I have, and unfortunately, it does not work!
> 
> I have been looking through the source code of the libtool generated by
> configure... it seems that it generates an .exp file using the following
> command:
> 
> /usr/bin/nm -B  .libs/libfile_somefile.o  | sed -n -e 's/^.*[
> ]\([ABCDGISTW][ABCDGISTW]*\)[   ][
> ]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | sed 's/.* //' | sort
> | uniq > .libs/libfile.exp
> 
> And passes it to ld via gcc using -Wl,-retain-symbols-file
> -Wl,.libs/libfile.exp
> 
> This seems flawed to me since ld simply ignores it as far as I can see!
> 
> Stephano Mariani
> 
> 
>>-----Original Message-----
>>From: Charles Wilson [mailto:cwilson AT ece DOT gatech DOT edu]
>>Sent: Monday, 18 February 2002 7 14
>>To: Stephano Mariani
>>Cc: cygwin AT cygwin DOT com
>>Subject: Re: Specifying a .def file for use with libtools libraries
>>
>>This is kindof a kluge, but try this:
>>
>>libname_la_LDFLAGS = foo.def <-no-undefined and other link flags>
>>
>>--chuck
>>
>>Stephano Mariani wrote:
>>
>>
>>>Hello,
>>>
>>>Is there a way to use something similar to .def files with libtool.
>>>
> I
> 
>>>have no way of limiting the export list, and the -export-symbols
>>>
> <file>
> 
>>>directive in the libname_la_LDFLAGS seems not to work.
>>>
>>>I could go and rename all the symbols to avoid conflicts, but I
>>>
> would
> 
>>>rather not... there has to be a way to do this using libtool.
>>>
>>>Please help! I am fast getting desperate enough to drop libtool
>>>altogether.
>>>
>>>Thanks in advance,
>>>
>>>Stephano Mariani
>>>
>>>
>>>--
>>>Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>>>Bug reporting:         http://cygwin.com/bugs.html
>>>Documentation:         http://cygwin.com/docs.html
>>>FAQ:                   http://cygwin.com/faq/
>>>
>>>
>>>
> 
> 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019