1 From nobody Tue Oct 7 19:29:17 1997
2 X-From-Line: gord@gnu.org Wed Oct 08 00:03:13 1997
3 Return-Path: <gord@gnu.org>
4 Delivered-To: gord@trick.profitpress.com
5 Received: (qmail 13926 invoked from network); 8 Oct 1997 00:03:12 -0000
6 Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1)
7 by localhost with SMTP; 8 Oct 1997 00:03:12 -0000
8 X-POP3-Rcpt: gord@bambam
9 Received: from mescaline.gnu.org (root@mescaline.gnu.org [158.121.106.21]) by m-tech.ab.ca (8.6.12/8.6.9) with ESMTP id LAA01054 for <gord@m-tech.ab.ca>; Tue, 7 Oct 1997 11:58:02 -0600
10 Received: from listserv.ucalgary.ca by mescaline.gnu.org (8.8.5/8.6.12GNU) with SMTP id NAA18464 for <bug-libtool@gnu.ai.mit.edu>; Tue, 7 Oct 1997 13:53:36 -0400
11 Received: from ts3-port-52.acs.ucalgary.ca by listserv.ucalgary.ca (AIX 3.2/UCB 5.64/4.03)
12 id AA15145; Tue, 7 Oct 1997 11:53:10 -0600
13 Received: (qmail 11153 invoked by uid 1001); 7 Oct 1997 17:52:59 -0000
14 Sender: gord@trick.profitpress.com
15 To: Akim Demaille <demaille@inf.enst.fr>
16 Cc: bug-libtool@gnu.org
17 Subject: Re: Shared libs before installation
18 References: <qylg1qstg1o.fsf@gargantua.enst.fr>
20 Mime-Version: 1.0 (generated by tm-edit 7.92)
21 Content-Type: text/plain; charset=US-ASCII
22 From: Gordon Matzigkeit <gord@m-tech.ab.ca>
23 Date: 07 Oct 1997 11:52:59 -0600
24 In-Reply-To: Akim Demaille's message of 26 Sep 1997 14:28:51 +0200
25 Message-Id: <86201xcves.fsf@trick.profitpress.com>
26 X-Mailer: Gnus v5.4.42/Emacs 19.34
27 Xref: trick.profitpress.com mail.libtool:570
29 X-Gnus-Article-Number: 4 Mon Nov 2 17:16:26 1998
33 >>>>> Akim Demaille writes:
35 AD> We once talked about this, but let's do it again :)
39 AD> I know this is the kind of things version numbers should
40 AD> solve. Nevertheless, to avoid having quickly too big a version
41 AD> number, the version should be set right before a _public_
42 AD> distribution (correct?). Not when sharing with
43 AD> testers/maintainers.
45 AD> But then they are most likely to link with an old installed
46 AD> version of the .so, failing to compile correctly.
48 Actually, you may consider having *huge* version numbers for testers,
49 and using tiny ones for public releases.
51 For testing releases use a major version corresponding with the
52 current date: -version-info 19971007
54 Then for the public release, figure out what has actually changed
55 since last time: -version-info 3:0:1
57 The huge test release major numbers will guarantee that every new test
58 release will require relinking, but the public versions will be
59 smarter and possibly backwards-compatible.
61 AD> I am no system guy, so I may say stupid things :)
63 Nothing stupid. These are legitimate questions that I will have to
64 answer eventually in the documentation.
66 Thanks for your questions,
69 Gord Matzigkeit | Proudly running pieces of the GNU operating system.
70 gord@m-tech.ab.ca | Jacques Cousteau loved programming in assembler.
72 From nobody Wed Oct 15 00:04:31 1997
73 X-From-Line: coolo@itm.mu-luebeck.de Wed Oct 15 00:11:44 1997
74 Return-Path: <coolo@itm.mu-luebeck.de>
75 Delivered-To: gord@trick.profitpress.com
76 Received: (qmail 4396 invoked from network); 15 Oct 1997 00:11:42 -0000
77 Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1)
78 by localhost with SMTP; 15 Oct 1997 00:11:42 -0000
79 X-POP3-Rcpt: gord@bambam
80 Received: from itm.mu-luebeck.de (wotan.itm.mu-luebeck.de [141.83.21.121]) by m-tech.ab.ca (8.6.12/8.6.9) with ESMTP id MAA12037 for <gord@m-tech.ab.ca>; Tue, 14 Oct 1997 12:59:53 -0600
81 Received: from buri.itm.mu-luebeck.de (coolo@buri [141.83.21.130]) by itm.mu-luebeck.de (8.8.7/8.7.1) with ESMTP id UAA12900 for <gord@m-tech.ab.ca>; Tue, 14 Oct 1997 20:54:08 +0200 (MET DST)
82 From: Stephan Kulow <coolo@itm.mu-luebeck.de>
83 Received: (from coolo@localhost)
84 by buri.itm.mu-luebeck.de (8.8.4/8.8.4)
85 id UAA01692 for gord@m-tech.ab.ca; Tue, 14 Oct 1997 20:55:19 +0200
86 Message-Id: <199710141855.UAA01692@buri.itm.mu-luebeck.de>
87 Subject: Re: dlopen [was: libs dependencies]
88 To: gord@m-tech.ab.ca (Gordon Matzigkeit)
89 Date: Tue, 14 Oct 1997 20:55:19 +0200 (MET DST)
90 In-Reply-To: <86wwjg1av8.fsf@trick.profitpress.com> from "Gordon Matzigkeit" at Oct 14, 97 12:02:35 pm
92 Xref: trick.profitpress.com mail.libtool:589
94 X-Gnus-Article-Number: 5 Mon Nov 2 17:16:26 1998
99 > >>>>> Stephan Kulow writes:
101 > I think we've adequately discussed your library dependencies, but I
102 > wanted to comment on the dlopen support that you mention below:
104 > SK> BTW: I made some efforts to use the dlopen support in libtool. I
105 > SK> think, it works the way I tried it. I link staticly, if dlfcn.h
106 > SK> or libdl is not supported. For this I patched libtool.m4 to
107 > SK> support this. I had to remove the --enable-shared/static options
108 > SK> and replaced it with --disable-dlopen option, since it looks
109 > SK> somewhat strange, if you have --enable-shared in a package, where
110 > SK> you do not expect libs.
112 > Yes, you are right. When I fully support dlopen emulation, I will
113 > need to make a configure flag that can turn things on and off.
115 > SK> We create a binary, that loads libraries, that contain C++
116 > SK> classes derived from a specific class. So, it's not necessary,
117 > SK> that the binary knows, which "applets" are there while compile
120 > Okay, this makes sense. This is why I generate the `symbol file' when
121 > -export-dynamic is given, which contains a list of symbols mapped to
122 > pointers in a C source file.
124 > Your solution is acceptable, and if it works for your application,
125 > congratulations! As I've said before, my eventual solution will be
126 > generic and application-independent: I will write a true dlopen
127 > implementation that uses a libtool `symbol file' to resolve pointers
128 > rather than dynamic loading of code.
130 > The C++ portion of this will need to understand name mangling, which
131 > is probably why you chose the easier way, of making your dlopening
132 > application-specific.
133 You say, you will write code? I tried to imagine a solution without
134 new code, but I failed. So you write a new linker or just a library,
135 that I can use in my own code?
137 > SK> This is somewhat a problem and I don't know a solution, how to
138 > SK> solve this. So, I added a header file, that contains all
139 > SK> currently known modules and this is only used, if no dlopen is
142 > Okay, I think I understand. You are saying that when dlopen is not
143 > available, you emulate it by knowing in advance which modules have
144 > been linked into the executable (SANE calls this `preloading'), and
145 > changing your application to refer to specific C++ modules.
146 Yes. I have to know while compilation time of the binary, which libraries
149 > As I've said above, when I release DLD 4.0 I'll let you know, but
150 > until then, your application-specific preloading is acceptable, and
151 > the Right Thing To Do.
152 Thanks, it's a pleasure to hear such comments ;)
154 > SK> Thanks for writing libtool, Stephan
156 > My pleasure! Thanks for using it, :)
157 BTW: Perhaps you remember, I once contacted you because of some problems
158 with C++ and static objects in shared libs. I found out (or read in a
159 news group), that most compilers on such plattforms do some magic before
160 calling the linker. So, what libtool have to do to support such plattforms
161 (Solaris, FreeBSD and perhaps some more), is to call the compiler and not
162 the linker to create C++ shared libs.
163 CC (under Solaris) has the same options then the linker, but should create
165 Currently I set CC to CXX before I run AM_PROG_LIBTOOL to let libtool
166 find the correct linker options for the C++ compiler instead of the C
169 I just wanted to let you know, what I found out. I thought about patching
170 libtool to have better support for C++, but this would mean some drastic
171 changes, so I left it up to you ;)
176 Stephan Kulow (coolo@kde.org)
177 Student of medical CS
178 Medical University of Luebeck
180 GCS/M/MD d-x s++: a-- C+++$ ULS+++ P--- L++ E W- N- o? K--? w
181 !O-- !M !V PS++ !PE Y PGP++ t+ 5 X+ !R tv+ b+ DI? D- G e+>$
185 From nobody Thu Aug 20 09:31:03 1998
186 X-From-Line: gord@gnu.org Wed Aug 05 11:02:23 1998
187 Return-Path: <gord@gnu.org>
188 Delivered-To: gord@trick.fig.org
189 Received: (qmail 6829 invoked from network); 5 Aug 1998 11:02:23 -0000
190 Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34)
191 by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 5 Aug 1998 11:02:23 -0000
192 Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id EAA09526 for <gord@m-tech.ab.ca>; Wed, 5 Aug 1998 04:59:58 -0600
193 Received: from uranus.ubs.com by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id HAA22473 for <bug-libtool@gnu.org>; Wed, 5 Aug 1998 07:00:29 -0400
194 From: alois.camenzind@ubs.com
195 Received: by uranus.ubs.com; id MAA10838; Wed, 5 Aug 1998 12:56:10 +0200 (MET DST)
196 Received: from <alois.camenzind@ubs.com> (svscan [192.168.85.11]) by uranus via smap (V2.1)
197 id xma010753; Wed, 5 Aug 98 12:55:53 +0200
198 Received: from localhost by svscan.ubinet.ubs.com (SMI-8.6/SMI-SVR4)
199 id MAA01005; Wed, 5 Aug 1998 12:58:25 +0200
200 Received: from localhost (root@localhost)
201 by svcastor.flur.zuerich.ubs.ch (8.8.6 (PHNE_12836)/8.8.6) with SMTP id MAA21146
202 for bug-libtool@gnu.org; Wed, 5 Aug 1998 12:58:23 +0200 (METDST)
204 Date: Wed, 5 Aug 1998 12:58:13 +0200
205 Message-Id: <5499F13A@MHS>
206 Subject: libtool bug/problem
208 TO: bug-libtool@gnu.org
209 Content-Type: multipart/mixed; boundary="MimeMultipartBoundary"
210 Xref: trick.fig.org libtool:1548
212 X-Gnus-Article-Number: 6 Mon Nov 2 17:16:26 1998
214 --MimeMultipartBoundary
215 Content-Type: text/plain; charset=US-ASCII; name="PUBLIC:"
216 Content-Disposition: inline; filename="PUBLIC:"
217 Content-Transfer-Encoding: 7bit
221 I'd like to use libtool (ltmain.sh (GNU libtool) 1.2 togheter with the SUN C++
222 compiler (CC: WorkShop Compilers 4.2 30 Oct 1996 C++ 4.2) on Solaris 5.5.1.
224 Everything works good except if I'm trying to use C++ templates in my code and
225 put this in a shared library. The linker is afterwards always complaining
226 about missing references. The problem occurs because libtool renames
228 files from xxx.o to xxx.lo. The SUN C++ compiler builds for himself a
230 and this somehow doens't match anymore with the object file.
232 Have you ever heard of this problem and do you eventually allready have
235 I search in Deja News but couldn't find anything.
236 A solution I could think of would be to rename the xxx.lo file back to
240 Thanks for any hints.
245 --MimeMultipartBoundary--
246 From nobody Wed Oct 14 17:08:59 1998
247 X-From-Line: gord@mescaline.gnu.org Mon Oct 05 20:10:38 1998
248 Return-Path: <gord@mescaline.gnu.org>
249 Delivered-To: gord@trick.fig.org
250 Received: (qmail 2026 invoked from network); 5 Oct 1998 20:10:30 -0000
251 Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34)
252 by ip223.net247210.cr.sk.ca with SMTP; 5 Oct 1998 20:10:30 -0000
253 Received: from mescaline.gnu.org (gateway [10.0.0.1])
254 by bambam.m-tech.ab.ca (8.8.7/8.8.7) with ESMTP id OAA31749
255 for <gord@m-tech.ab.ca>; Mon, 5 Oct 1998 14:13:57 -0600
256 Received: from proxy.grad.kiev.ua (grad-UTC-28k8.ukrtel.net [195.5.25.54])
257 by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id PAA26247
258 for <bug-libtool@gnu.org>; Mon, 5 Oct 1998 15:57:59 -0400
259 Received: from Shevchenko.Kiev.UA (cam [10.0.0.50])
260 by proxy.grad.kiev.ua (8.8.8/8.8.7) with ESMTP id WAA07178
261 for <bug-libtool@gnu.org>; Mon, 5 Oct 1998 22:56:50 +0300 (EEST)
262 (envelope-from Ruslan@Shevchenko.Kiev.UA)
263 Sender: rssh@proxy.grad.kiev.ua
264 Message-ID: <3619242C.C441DA29@Shevchenko.Kiev.UA>
265 Date: Mon, 05 Oct 1998 22:55:24 +0300
266 From: Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA>
267 Reply-To: rssh@grad.kiev.ua
268 X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.5-STABLE i386)
270 To: bug-libtool@gnu.org
271 Subject: C++ libs on Solaris 2.6 with Sun CC 4.2
272 Content-Type: multipart/mixed; boundary="------------48AE685394F01B5105112CF0"
274 Xref: trick.fig.org libtool:1646
276 This is a multi-part message in MIME format.
277 --------------48AE685394F01B5105112CF0
278 Content-Type: text/plain; charset=us-ascii
279 Content-Transfer-Encoding: 7bit
285 SunOS satory 5.6 Generic_105181-06 sun4u sparc SUNW,Ultra-4
293 building of shared libraries not supported.
294 (output of simple conffigure is attached.)
296 and in reality, the process of linking CC library is different,
297 becouse generation of templates can be doing on stage of linking.
299 In general, command for linking is
300 CC -xar -o$(LIBNAME) $(CXXFLAGS) $(OBJECTS)
302 If anybody will tell me, from what I must begin, I will help to
311 mailto:Ruslan@Shevchenko.Kiev.UA
313 CORBA in Ukraine & ex-USSR: http://www.corbadev.kiev.ua
314 --------------48AE685394F01B5105112CF0
315 Content-Type: text/plain; charset=us-ascii; name="errs"
316 Content-Transfer-Encoding: 7bit
317 Content-Disposition: inline; filename="errs"
319 creating cache ./config.cache
320 checking host system type... sparc-sun-solaris2.6
321 checking target system type... sparc-sun-solaris2.6
322 checking build system type... sparc-sun-solaris2.6
323 checking for a BSD compatible install... config/install-sh -c
324 checking whether build environment is sane... yes
325 checking whether make sets ${MAKE}... yes
326 checking for working aclocal... found
327 checking for working autoconf... found
328 checking for working automake... found
329 checking for working autoheader... found
330 checking for working makeinfo... missing
331 checking for c++... no
332 checking for g++... no
333 checking for gcc... no
334 checking for CC... CC
335 checking whether the C++ compiler (CC ) works... yes
336 checking whether the C++ compiler (CC ) is a cross-compiler... no
337 checking whether we are using GNU C++... no
338 checking how to run the C++ preprocessor... CC -E
339 checking for ranlib... ranlib
340 checking for gcc... no
341 checking for cc... cc
342 checking whether the C compiler (cc ) works... yes
343 checking whether the C compiler (cc ) is a cross-compiler... no
344 checking whether we are using GNU C... no
345 checking for non-GNU ld... /usr/ucb/ld
346 checking if the linker (/usr/ucb/ld) is GNU ld... no
347 checking for BSD-compatible nm... /usr/ccs/bin/nm -p
348 checking whether ln -s works... yes
349 checking whether we are using GNU C... no
350 checking for cc option to produce PIC... -KPIC
351 checking if cc PIC flag -KPIC works... no
352 checking if cc static flag -Bstatic works... -Bstatic
353 checking if the linker (/usr/ucb/ld) is GNU ld... no
354 checking whether the linker (/usr/ucb/ld) supports shared libraries... yes
355 checking command to parse /usr/ccs/bin/nm -p output... yes
356 checking how to hardcode library paths into programs... immediate
357 checking for /usr/ucb/ld option to reload object files... -r
358 checking dynamic linker characteristics... solaris2.6 ld.so
359 checking if libtool supports shared libraries... no
360 checking whether to build shared libraries... no
361 checking whether to build static libraries... yes
362 checking for objdir... .libs
364 checking for a BSD compatible install... config/install-sh -c
365 CPPFLAGS= -I/usr/local/include
366 checking for OB/CORBA.h... yes
368 checking for JTC/JTC.h... yes
369 checking for OB/CosNaming.h... yes
370 checking for nanosleep in -lposix4... yes
372 checking for socket in -lsocket... yes
373 updating cache ./config.cache
374 creating ./config.status
376 creating src/Makefile
377 creating include/Makefile
378 creating tests/Makefile
379 creating tests/naming/Makefile
380 creating include/SyntaxShugarConfig.h
381 include/SyntaxShugarConfig.h is unchanged
383 --------------48AE685394F01B5105112CF0--
385 From nobody Wed Oct 14 17:11:47 1998
386 X-From-Line: gord@mescaline.gnu.org Tue Oct 13 18:11:55 1998
387 Return-Path: <gord@mescaline.gnu.org>
388 Delivered-To: gord@trick.fig.org
389 Received: (qmail 694 invoked from network); 13 Oct 1998 18:11:25 -0000
390 Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34)
391 by ip223.net247210.cr.sk.ca with SMTP; 13 Oct 1998 18:11:25 -0000
392 Received: from mescaline.gnu.org (gateway [10.0.0.1])
393 by bambam.m-tech.ab.ca (8.8.7/8.8.7) with ESMTP id MAA30151
394 for <gord@m-tech.ab.ca>; Tue, 13 Oct 1998 12:14:55 -0600
395 Received: from proxy.grad.kiev.ua (grad-UTC-28k8.ukrtel.net [195.5.25.54])
396 by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id NAA14314
397 for <bug-libtool@gnu.org>; Tue, 13 Oct 1998 13:56:26 -0400
398 Received: from Shevchenko.Kiev.UA (cam [10.0.0.50])
399 by proxy.grad.kiev.ua (8.8.8/8.8.7) with ESMTP id UAA04080
400 for <bug-libtool@gnu.org>; Tue, 13 Oct 1998 20:54:29 +0300 (EEST)
401 (envelope-from Ruslan@Shevchenko.Kiev.UA)
402 Sender: rssh@proxy.grad.kiev.ua
403 Message-ID: <3623937C.7E903DF8@Shevchenko.Kiev.UA>
404 Date: Tue, 13 Oct 1998 20:53:00 +0300
405 From: Ruslan Shevchenko <Ruslan@shevchenko.kiev.ua>
406 Reply-To: rssh@grad.kiev.ua
407 X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.5-STABLE i386)
409 To: bug-libtool@gnu.org
410 Subject: overriding ARFLAGS.
411 Content-Type: multipart/mixed; boundary="------------E06156B73BE5D4D4AD2BF900"
412 Xref: trick.fig.org libtool:1683
414 X-Gnus-Article-Number: 7 Mon Nov 2 17:16:26 1998
416 This is a multi-part message in MIME format.
417 --------------E06156B73BE5D4D4AD2BF900
418 Content-Type: text/plain; charset=koi8-r
419 Content-Transfer-Encoding: 7bit
421 As I noted few days ago, the process of building a library (static or
423 with C++ can include addition steps, such as template instaniation.
425 In libtool AR can be overrided from configure ${AR}, but ${ARFLAGS}
427 is hardcoded into ltconfig.sh
429 setting ${ARFLAGS} as variable (or cru if "$ARFLAGS" is empty ) actually
431 building of templated C++ variables (static only yet) by overriding AR
435 So, I attached to this messages diff, which change cru to ${ARFLAGS} in
436 ltconfig.in (and therefore in ltconfig)
438 Also, I think somewhere in documentation must exists the next note
440 Sun Solaris Workshop:
442 When you want build libraries with implicit templates instaniated in,
443 You must puss to ltconfig next envirowmnent variables:
445 ARFLAGS=$CXXFLAGS -xar -o
458 mailto:Ruslan@Shevchenko.Kiev.UA
460 CORBA in Ukraine & ex-USSR: http://www.corbadev.kiev.ua
461 --------------E06156B73BE5D4D4AD2BF900
462 Content-Type: text/plain; charset=koi8-r; name="libtool.diff"
463 Content-Transfer-Encoding: 7bit
464 Content-Disposition: inline; filename="libtool.diff"
466 Only in libtool-1.2-patched: Makefile
467 Only in libtool-1.2-patched: config.cache
468 Only in libtool-1.2-patched: config.log
469 Only in libtool-1.2-patched: config.status
470 Common subdirectories: libtool-1.2/demo and libtool-1.2-patched/demo
471 Common subdirectories: libtool-1.2/doc and libtool-1.2-patched/doc
472 Only in libtool-1.2-patched: libtool
473 Only in libtool-1.2-patched: libtoolize
474 diff -c libtool-1.2/ltconfig libtool-1.2-patched/ltconfig
475 *** libtool-1.2/ltconfig Fri Mar 20 10:00:29 1998
476 --- libtool-1.2-patched/ltconfig Tue Oct 13 20:01:31 1998
483 + if test "x$ARFLAGS" = x
489 + old_ARFLAGS="$ARFLAGS"
492 old_CPPFLAGS="$CPPFLAGS"
497 # Determine commands to create old-style static archives.
498 ! old_archive_cmds='$AR cru $oldlib$oldobjs'
499 old_postinstall_cmds='chmod 644 $oldlib'
500 old_postuninstall_cmds=
505 # Determine commands to create old-style static archives.
506 ! old_archive_cmds='$AR $ARFLAGS $oldlib$oldobjs'
507 old_postinstall_cmds='chmod 644 $oldlib'
508 old_postuninstall_cmds=
514 allow_undefined_flag=unsupported
515 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
516 # Note: this linker hardcodes the directories in LIBPATH if there
517 # are no directories specified by -L.
522 allow_undefined_flag=unsupported
523 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR $ARFLAGS $lib $objdir/$soname'
524 # Note: this linker hardcodes the directories in LIBPATH if there
525 # are no directories specified by -L.
531 allow_undefined_flag=unsupported
532 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname'
538 ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
539 hardcode_libdir_flag_spec='-L$libdir'
545 allow_undefined_flag=unsupported
546 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR $ARFLAGS $lib $objdir/$soname'
552 ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR $ARFLAGS $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
553 hardcode_libdir_flag_spec='-L$libdir'
556 diff -c libtool-1.2/ltconfig.in libtool-1.2-patched/ltconfig.in
557 *** libtool-1.2/ltconfig.in Wed Mar 11 18:10:51 1998
558 --- libtool-1.2-patched/ltconfig.in Tue Oct 13 20:44:56 1998
563 # Determine commands to create old-style static archives.
564 ! old_archive_cmds='$AR cru $oldlib$oldobjs'
565 old_postinstall_cmds='chmod 644 $oldlib'
566 old_postuninstall_cmds=
568 # Set a sane default for `AR'.
569 test -z "$AR" && AR=ar
571 # If RANLIB is not set, then run the test.
572 if test "${RANLIB+set}" != "set"; then
576 # Determine commands to create old-style static archives.
577 ! old_archive_cmds='$AR $ARFLAGS $oldlib$oldobjs'
578 old_postinstall_cmds='chmod 644 $oldlib'
579 old_postuninstall_cmds=
581 # Set a sane default for `AR'.
582 test -z "$AR" && AR=ar
583 + test -z "$ARFLAGS" && ARFLAGS=cru
585 # If RANLIB is not set, then run the test.
586 if test "${RANLIB+set}" != "set"; then
591 allow_undefined_flag=unsupported
592 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
593 # Note: this linker hardcodes the directories in LIBPATH if there
594 # are no directories specified by -L.
599 allow_undefined_flag=unsupported
600 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR $ARFLAGS $lib $objdir/$soname'
601 # Note: this linker hardcodes the directories in LIBPATH if there
602 # are no directories specified by -L.
608 allow_undefined_flag=unsupported
609 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname'
615 ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
616 hardcode_libdir_flag_spec='-L$libdir'
622 allow_undefined_flag=unsupported
623 ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR $ARFLAGS $lib $objdir/$soname'
629 ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR $ARFLAGS $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
630 hardcode_libdir_flag_spec='-L$libdir'
633 Common subdirectories: libtool-1.2/tests and libtool-1.2-patched/tests
635 --------------E06156B73BE5D4D4AD2BF900--
637 From nobody Wed Oct 14 16:56:33 1998
638 X-From-Line: gord@gnu.org Thu Aug 06 20:23:55 1998
639 Return-Path: <gord@gnu.org>
640 Delivered-To: gord@trick.fig.org
641 Received: (qmail 1251 invoked from network); 6 Aug 1998 20:23:54 -0000
642 Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34)
643 by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 6 Aug 1998 20:23:54 -0000
644 Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id OAA21853 for <gord@m-tech.ab.ca>; Thu, 6 Aug 1998 14:21:27 -0600
645 Received: from juliet.wcom.com by mescaline.gnu.org (8.8.5/8.6.12GNU) with SMTP id QAA20365 for <bug-libtool@gnu.org>; Thu, 6 Aug 1998 16:21:44 -0400
646 Received: from moloko.wcom.com by juliet with ESMTP; Thu, 6 Aug 1998 15:17:19 -0500
647 Received: from pinebilly.wcom.com (pinebilly.wcom.com [159.98.206.11]) by moloko.wcom.com (8.8.8/8.8.8)
648 with SMTP id PAA27920 for <bug-libtool@gnu.org>; Thu, 6 Aug 1998 15:17:18 -0500 (CDT)
649 X-Report-Problems-With-Moloko-To: brandon.black@wcom.com
650 X-If-you-can-read-this-you-are-too-close: :)
651 Date: Thu, 6 Aug 1998 15:17:11 -0500 (CDT)
652 From: Ron Romero <ron.romero@wcom.com>
653 Sender: rdromero@pinebilly.wcom.com
654 Reply-To: ron.romero@wcom.com
655 To: bug-libtool@gnu.org
656 Subject: libtool Doesn't Export C++ Methods on AIX
657 Message-ID: <Pine.A41.3.96.980806150532.36284A-100000@pinebilly.wcom.com>
659 Content-Type: TEXT/PLAIN; charset=US-ASCII
660 Xref: araguaia.dcc.unicamp.br libtool-cxx:8
662 X-Gnus-Article-Number: 8 Wed Nov 4 08:08:35 1998
664 I'm trying to use libtool with C++ programs, and found that libtool
665 wouldn't put any C++ methods into the shared library. When I looked
666 into it, I found that the nm command used to create the export list
667 doesn't pass a -C flag. On AIX, the -C flag says to leave C++ names
668 mangled. Since the function names weren't mangled, the sed line
669 didn't recognize them as functions, so they weren't put into the .exp
670 file. I found that I could fix the problem by adding a -C flag to
671 ac_cv_path_NM in config.guess. I suppose the configure script should
672 check for that and do it automatically.
674 I'm running libtool version 1.2 on an AIX 4.2 box
675 (powerpc-ibm-aix4.2.1.0).
677 I have some test files that I can give to anyone who wants to test
678 this. And I can test potential fixes on my machine.
688 From libtool-request@gnu.org Wed Jun 9 13:20 EST 1999
689 Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8])
690 by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id NAA03816
691 for <oliva@amazonas.dcc.unicamp.br>; Wed, 9 Jun 1999 13:20:28 -0300 (EST)
692 Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21])
693 by grande.dcc.unicamp.br (8.9.1/8.9.1) with ESMTP id NAA01398
694 for <oliva@dcc.unicamp.br>; Wed, 9 Jun 1999 13:19:57 -0300 (EST)
695 Received: (from slist@localhost)
696 by mescaline.gnu.org (8.9.1a/8.9.1) id MAA06914
697 for oliva@dcc.unicamp.br; Wed, 9 Jun 1999 12:23:06 -0400
698 Received: from pen.sentuny.com.au (pen.sentuny.com.au [203.12.98.6])
699 by mescaline.gnu.org (8.9.1a/8.9.1) with SMTP id MAA05773
700 for <libtool@gnu.org>; Wed, 9 Jun 1999 12:16:37 -0400
701 Received: (qmail 6298 invoked by uid 1000); 9 Jun 1999 16:16:33 -0000
702 Received: from localhost (sendmail-bs@127.0.0.1)
703 by localhost with SMTP; 9 Jun 1999 16:16:32 -0000
704 Resent-Date: Wed, 9 Jun 1999 12:23:06 -0400
705 Date: Thu, 10 Jun 1999 02:16:32 +1000 (EST)
706 From: "Ron O'Hara" <rono@sentuny.com.au>
708 Subject: AIX, C++, shared multi-thread libraries and libtool
709 X-Gnus-Mail-Source: file:/n/mail.spool/oliva
710 Message-ID: <Pine.LNX.3.96.990610004224.22907O-100000@pen.sentuny.com.au>
712 Resent-Message-ID: <"MVHQY2.0.OQ1.hDfNt"@mescaline.gnu.org>
713 Resent-From: libtool@gnu.org
714 X-Mailing-List: <libtool@gnu.org> archive/latest/1500
715 X-Loop: libtool@gnu.org
717 Resent-Sender: libtool-request@gnu.org
718 Content-Type: TEXT/PLAIN; charset=US-ASCII
719 X-Content-Length: 857
720 Xref: saci.lsd.dcc.unicamp.br libtool-cxx:9
722 X-Gnus-Article-Number: 9 Fri Jun 25 20:06:59 1999
725 AIX, C++, shared multi-thread libraries and libtool
727 Ughh ... what a combination
729 Anyway... it appears that for AIX4.2.1.0 creating shared libraries is very
730 tricky. You must use the 'makeC++SharedLib_r' script that IBM supplies.
731 Not the xlC_r compiler as libtool does.
733 In addition, I kept getting unresolved symbols when linking against my own
734 libraries. I needed to set 'always_export_symbols=yes' even though the
735 -bexpall flag is supposed to fix that..
737 To do that I had to edit 'ltconfig.in' (about line 1262 for libtool-1.3.2)
738 and set it always on - regardless of the host_os version.
740 I can now get it all to link, but this is sure an ugly monster !! and the
741 executable files are definitely HUGE
746 ------------------------------------------------------------------
747 email: rono@sentuny.com.au
748 BH: (GMT) +353 21 281469
749 Mobile: +61 419 873 801
751 From marcusd@cathcart.sysc.pdx.edu Fri Jun 18 17:46 EST 1999
752 Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8])
753 by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id RAA19966
754 for <oliva@amazonas.dcc.unicamp.br>; Fri, 18 Jun 1999 17:46:53 -0300 (EST)
755 Received: from cathcart.sysc.pdx.edu (cathcart.sysc.pdx.edu [131.252.30.67])
756 by grande.dcc.unicamp.br (8.9.1/8.9.1) with ESMTP id RAA20228
757 for <oliva@dcc.unicamp.br>; Fri, 18 Jun 1999 17:46:47 -0300 (EST)
758 Received: (from marcusd@localhost)
759 by cathcart.sysc.pdx.edu (8.9.3/8.9.3/Debian/GNU) id NAA30172;
760 Fri, 18 Jun 1999 13:50:02 -0700
761 To: Alexandre Oliva <oliva@dcc.unicamp.br>
763 Subject: Re: constructors in HPUX/SOM shared libraries
764 References: <199905161700.LAA01572@pojoaque.santafe.edu> <ord7zsc7h1.fsf@lua.lbi.dcc.unicamp.br>
765 From: marcusd@cathcart.sysc.pdx.edu (Marcus G. Daniels)
766 Date: 18 Jun 1999 13:50:01 -0700
767 In-Reply-To: Alexandre Oliva's message of "23 May 1999 09:10:18 -0300"
768 X-Gnus-Mail-Source: file:/n/mail.spool/oliva
769 Message-ID: <rfik8t1mdxi.fsf@cathcart.sysc.pdx.edu>
770 User-Agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3.10
772 Content-Type: text/plain; charset=us-ascii
773 X-Content-Length: 1653
774 Xref: saci.lsd.dcc.unicamp.br libtool-cxx:10
776 X-Gnus-Article-Number: 10 Fri Jun 25 20:06:59 1999
778 >>>>> "AO" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:
780 AO> IMO, the way to go is to try to use gcc -shared to create shared
781 AO> libraries, because then gcc's collect2 will (is supposed to?) take
782 AO> care of the magic for constructors to run.
784 Unfortunately, it doesn't. Of course, with glibc or Solaris, a GNU
785 as/ld equipped GCC will do the job:
787 marcusd@cathcart[~] $ cat constructor.c
788 void tryme (void) __attribute__ ((constructor));
793 printf ("constructor\n");
796 marcusd@cathcart[~] $ cat test-constructor.c
801 void *handle = dlopen ("./libconstructor.so", RTLD_GLOBAL | RTLD_LAZY);
802 printf ("%p\n", handle);
806 marcusd@cathcart[~] $ gcc -fPIC -c constructor.c
807 marcusd@cathcart[~] $ gcc -shared constructor.o -o libconstructor.so
808 marcusd@cathcart[~] $ gcc test-constructor.c -ldl
809 marcusd@cathcart[~] $ ./a.out
814 However, the equivalent on HPsUX fails:
816 mgd@pajarito[~] $ cat test-constructor.c
818 #define SHL_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH)
823 handle = shl_load ("./libconstructor.sl", SHL_FLAGS, 0L);
824 printf ("%x\n", handle);
829 mgd@pajarito[~] $ gcc -c -fPIC constructor.c
830 mgd@pajarito[~] $ gcc -fPIC -shared constructor.o -o libconstructor.sl
831 mgd@pajarito[~] $ gcc test-constructor.c -ldld
832 mgd@pajarito[~] $ ./a.out
836 However, there is a flag to the HP linker that provides the needed
839 mgd@pajarito[~] $ gcc -Wl,+I,tryme -fPIC -shared constructor.o -o libconstructor.sl
840 mgd@pajarito[~] $ ./a.out