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