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
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
|
<!-- $Id$ -->
<HTML>
<HEAD>
<TITLE>Building and Installing ACE and Its Auxiliary Libraries and Services</TITLE>
<link rev=made href="mailto:schmidt@uci.edu">
</HEAD>
<BODY text = "#000000"
link = "#000fff"
vlink = "#ff0f0f"
bgcolor = "#ffffff">
<HR>
<H3>Building and Installing ACE and Its Auxiliary Libraries and Services</H3>
<H4>Synopsis</H4>
The file explains how to build and install ACE and its Network
Services on the various OS platforms and compilers that it has been
ported to. Please consult the <A HREF="ChangeLog">ChangeLog</A> file
to see whether any recent changes to the release will affect your
code. In addition, you should check out our <A
HREF="docs/ACE-development-process.html">development
process</A>. As you start working with ACE, we suggest you get copies
of the <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE/book1/">C++NPv1</A> and <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE/book2/">C++NPv2</A> books
to help guide you after you've built and installed ACE. You should
also consult the <a href="docs/ACE-FMM.html">ACE Frequently Made
Mistakes page</a>. If you encounter any problems or would like to
request an enhancement, then use our <a
href="docs/usage-bugzilla.html">bug tracking system</a> to submit a
report in accordance with our <A
HREF="docs/ACE-bug-process.html">bug
report process</a>.<P>
<H4>Document Index</H4>
<UL>
<LI><A HREF="#platforms">Supported Platforms and C++ Compilers</A>
<LI><A HREF="#installnotes">Installation Notes</A>
<LI><A HREF="#g++">Compiling ACE with GNU g++</A>
<LI><A HREF="#egcs">Compiling ACE with egcs</A>
<LI><A HREF="#aceinstall">Building and Installing ACE</A>
<LI><A HREF="#svcsinstall">Building and Installing ACE Network Services</A>
<LI><A HREF="#sslinstall">Building and Installing The ACE_SSL Library</A>
<LI><A HREF="#minimum_build">What Do I Need to Build for TAO?</A>
<LI><A HREF="#resource_requirements">System Resource Requirements</A>
<LI><A HREF="#advanced">Advanced Topics</A>
</UL>
<P><HR><P>
<H3><A NAME="platforms">Platforms, C++ Compilers, and Support</A></H3>
<p>ACE has been ported to a large number of <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE-versions-i.html">platforms</A>,
using many different compilers over the years. The <A
HREF="http://www.cs.wustl.edu/~doc/">DOC group</A>, <A
HREF="http://www.riverace.com/">Riverace</A>, <A
HREF="http://www.theaceorb.com">OCI</A>, and members of the ACE user
community have all contributed ports to make ACE the successful and
far-reaching toolkit it is today. Any UNIX/POSIX/Win32 variation is a
potential target platform for ACE. If you have <A
HREF="docs/ACE-porting.html">porting questions</A> or have a problem
compiling the ACE source distribution, please contact one of the
commercial support companies, or send a copy of the
PROBLEM-REPORT-FORM to either the <A HREF="news:comp.soft-sys.ace">ACE
Newsgroup</A> or the <A HREF="mailto:ace-users@cs.wustl.edu">ACE
mailing list</A> and someone will try to help you fix the problems.
<p>The responsibility for maintaining ACE across this wide range of
platforms is divided among a few different groups: the DOC group,
Riverace, OCI, and the ACE user community itself.
The table below summarizes each group's role
and where you can get more detailed information.
For information on TAO's platform coverage and support, please also see
<A HREF="TAO/TAO-INSTALL.html">TAO's install document</A>.<P>
<table width="75%" border=1>
<caption><b>Groups Involved in ACE Development and Support<BR></B></caption>
<thead>
<tr valign=top>
<th>Group
<th>Platforms
<th>For more information
</tr>
<tbody>
<tr>
<th>DOC Group</th>
<td><A HREF="http://ringil.ece.uci.edu/scoreboard/">Tested</A> and used
daily by the DOC group:
Solaris 2.5, 2.6, 7 and 8 (many compilers excluding SunC++ 4.x)<BR>
Windows NT 4.0 and Windows 2000 (MSVC++ 5.x, 6.x, and 7.x, and
Borland C++ Builder 5.0)<BR>
Linux/Intel (many compilers), Linux/IA64 (GCC).
</td>
<td>DOC sites at <A HREF="http://doc.ece.uci.edu/">UCI</A> and
<A HREF="http://tao.doc.wustl.edu/">Washington University</A>
</td>
</tr>
<tr>
<th>Riverace</th>
<td>Offers support services for many platforms including those
above, HP-UX, and AIX.
</td>
<td>Riverace's <A HREF="http://www.riverace.com/">web site</A></td>
</tr>
<tr>
<th>OCI</th>
<td>Maintains ACE on certain platforms required for their TAO
software and service offerings.
</td>
<td>OCI's <A HREF="http://www.theaceorb.com">web site</A> and
the TAO <A HREF="TAO/TAO-INSTALL.html">install document</A></td>
</tr>
<tr>
<th>ACE user community</th>
<td>Responsible for continued maintenance and testing of platforms
to which ACE has been ported, but aren't supported by the
above groups. These include
Windows 95/98/CE using Borland C++ Builder 4.0 and later, IBM VisualAge C++,
and GNU g++ on MinGW;
Digital UNIX (Compaq Tru64) 4.0 and 5.0;
IRIX 6.x; UnixWare 7.1.0; SunOS 4.x and Solaris with SunC++ 4.x;
Linux on Alpha and PPC; OpenMVS;
Tandem; SCO; FreeBSD; NetBSD; OpenBSD;
Chorus; OS/9; PharLap TNT Embedded ToolSuite 9.1;
QNX RTP and Neutrino 2.0; VxWorks; LynxOS; RTEMS
</td>
<td></td>
</tr>
</table><P>
<p>Although the DOC group has provided outstanding, world-class
support for ACE over the years, ACE's success has greatly increased
the amount of effort required to keep up with its maintenance, answer
users' questions, and give design guidance. Riverace offers
world-class commercial services to support ACE users and OCI offers
similar services for TAO, allowing the DOC group's primary focus to
shift back to their main goal: <EM>research</EM>. The DOC group is
fundamentally focused on (and <A
HREF="http://www.cs.wustl.edu/~schmidt/resume-grants.html">funded
by</A>) advanced R&D projects. The group continues to be intimately
involved in ACE+TAO development and maintenance, but with revised
priorities for maintenance. The <A
HREF="docs/ACE-bug-process.html">bug fixing policies</A> followed by
the DOC group are designed to strike a balance between their many <A
HREF="http://www.cs.wustl.edu/~schmidt/research.html">research
projects</A> and their commitment to the ACE+TAO <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE-users.html">user
community</A>. Naturally, we will be happy to accept well-tested
patches from the ACE+TAO user community for any platforms that aren't
supported by the DOC group, Riverace, or OCI. <P>
<P><HR><P>
<H3><A NAME="installnotes">Installation Notes</A></H3>
<UL>
<LI><B>Win32 (Windows NT, Windows 2000 and Windows '9x/ME) </B><P>
All of ACE has been ported to the Win32 API (which includes
Windows NT, Windows 2000, and Windows '95/98/ME). The entire
release now compiles using the Microsoft Visual C++ 5.0, and
6.0 compilers. ACE can be built as both a static (LIB) and
dynamic (DLL) library, using the Win32 installation process
described below.<P>
Please see the <A HREF="#Non-static Object Manager">Non-static
ACE_Object_Manager</A> discussion below.<p>
We've also added some support for
<A HREF="#mingw">GNU g++ with Mingw</A>,
Borland C++ Builder 4.0 and later, and IBM's VisualAge C++ compiler.
Since we don't have these compilers we rely on the ACE+TAO users
community to maintain these ports. Therefore, please send email
to the ACE mailing list if you run into problems. <P>
<li><b>Windows CE</b><p>
Take a look at (<a href="docs/CE-status.txt">CE-status.txt</a>) for
up-to-date information about ACE on CE. <P>
<LI><B> SunOS 4.x, Solaris 2.x, 7 and 8 using Sun
Sun C++ 4.2 and 5.x, Forte 6, Centerline C++ 2.x, GNU gcc 2.7.x
and later (except 2.8.x), and KAI C++ 3.3/3.4.</B><P>
All the source code and tests should build and run without any
problems on Solaris 2.5.1, 2.6, 7, and 8 platforms using the Sun C++
compilers. For Sun C++ 4.2, we recomend using this patch version
at a minimum:<p> <pre>
CC: WorkShop Compilers 4.2 21 Apr 1997 C++ 4.2 patch 104631-02
</pre><p>
There are likely to be build problems with older versions or
different patchlevels of Sun C++. Likewise, on
Solaris with g++ you may need to use GNU as instead of
/usr/ccs/bin/as, if you want -gstabs+ and -pipe support.
Thanks to Susan Liebeskind <shl@janis.gtri.gatech.edu>
for providing the following useful information:<p>
The home page for Sun technical patches is <a
href="http://access1.sun.com">http://access1.sun.com</a>.
Searching for 104631 will bring you to a page allowing you to
access the latest version of the C++ 4.2 patches.<p>
By default, ACE uses both the Solaris and POSIX thread
interface. To disable use of the Solaris thread interface, add
<code>-D_POSIX_PTHREAD_SEMANTICS</code> to the
<code>CFLAGS</code> in your
<code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code>.
See the Solaris Intro (3) man page for more information.<p>
To disable ACE thread support completely, build with the
<code>threads=0</code> make flag. See the <a
href="#flags">Makefile Flags</a> section below for more
information on make flags.<p>
If you use g++ or egcs on Solaris 7, you might need to rebuild
it on a SunOS 5.7 (Solaris 7) host. Some versions of g++ and
egcs provide replacements for system header files. The
replacements on older SunOS systems are not compatible with the
SunOS 5.7 system headers. See <a
href="http://www.cs.wustl.edu/~levine/Hints.html">David Levine's
Hints page</a> for instructions on how to build egcs on a SunOS
5.7 host, using a g++ or egcs that was built on an older SunOS
host. <P>
The Sun/C++ 5.0 compilers has several problems with templates,
we have worked around most of them but this is not a compiler
that we test very often. Hopefully as new patches for the
compiler show up we will be able to make that our compiler of
choice on Solaris.</p>
<LI><B>Sun OS 4.1.x using Centerline C++ 2.x, Sun CC 3.x, and Lucid
Energize 3.2.</B><P>
Note that shared libraries do not interact very well with
Centerline C++ or Sun C++ on SunOS 4.1.x. This is due to odd
behavior of the SunOS 4.1.x linker, which (1) does not properly
call constructors of global objects within shared libraries and
(2) does not call the init() and fini() functions in shared
libraries, even though the manual claims that these functions
are called! In particular, this means that the tests in the
directory $ACE_ROOT/tests/Service_Configurator/IPC-tests/server/
will not work for statically linked services.<P>
Some versions of SunOS 4.1.x do not contain the
/usr/lib/libnsl.a library. This library seems to be optional
since System V Transport Layer Interface (TLI) support is
optional on SunOS 4.1.x (in contrast, it's the "preferred"
transport interface on Solaris).<P>
The best work-around for now is probably to either add a dummy
libnsl.a in /lib (which may not be feasible) or simply comment
out the line:<P>
LIBS += -lnsl<P>
in the
<CODE>$ACE_ROOT/include/makeinclude/wrapper_macros.GNU</CODE>
file. Naturally, any programs, e.g., the TLI_SAP tests, that
use the TLI wrappers aren't going to work!<P>
Note that on SunOS 4.x you may get warnings from the linker that
"archive has no table of contents; add one using ranlib(1)" for
certain libraries, e.g., libASX.a, libThreads.a, and libSPIPE.a.
This occurs since SunOS 4.x does not support these features.<P>
<LI><B>AIX</B><P>
The ACE port to AIX assumes that the user has installed the AIX
patch containing the dl*() APIs. To use these APIs, IBM has
created a separate product (free to AIX licensees) called shared
library hookable symbols (or slhs/6000). If you don't have this
patch, the sv* commands for compiling and linking will not be
present on the system.<P>
If you are using AIX 4.2.1 or later, this patch isn't needed;
the dynamic library APIs are included in the base operating
system.<p>
However, another patch may be needed. Thanks to
Susan Liebeskind <shl@janis.gtri.gatech.edu> for submitting
the following useful information:<p>
When building on AIX 4.2.1, using the xlC V3.1 compilers, you may
get the following error when building the ACE shared library.<p>
<pre>
makeC++SharedLib_r -p 0 -o libACE.so -bI:/lib/pse.exp -L/usr/local/src/ACE_wra
ppers/ace -L./ -ltli_r -ldl libACE.a
ld: 0711-317 ERROR: Undefined symbol: .__CurrentException
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: *** [libACE.so] Error 8
</pre>
To fix this error, you need a patch to the supporting xlC
related libraries. To obtain this patch, go to the <a
href="http://service.software.ibm.com/support/rs6000">IBM public
patch website</a>, and retrieve the patch PTF U453697, or its
successor, for xlC.<p>
You may wish to retrieve this patch with the fixdist tool, also
available at the website. Installation of this patch will
install patched versions of the C++ libraries, which correctly
define this symbol.<p>
To build ACE on AIX with Visual Age C++ 5 in incremental mode
(i.e. with the IDE), use the
$ACE_ROOT/ace/ace.icc configuration along with the appropriate
version-specific config file (e.g. config-aix-4.3.x.h). All of the
version-specific config files set the version number macros and
include the general config-aix-4.x.h file which has support for all
of the OS versions and compilers supported on AIX. Using the general
config file is the recommended practice for egcs, C Set++, IBM
C/C++, and Visual Age C++ 5 batch mode compilers.<p>
Visual Age C++ 4 has also been supported on ACE 5.1, but is no longer
supported. If you are still using this compiler, please use the
$ACE_ROOT/ace/ace-dll.icc configuration file, along with the
config-aix-4.3.x.h ACE config file. Beware, however, that it hasn't
been tested.
BTW, here's a technique from Rob Jordan <<A
HREF="mailto:jordan@hursley.ibm.com">jordan@hursley.ibm.com</A>>
that can reduce the size of the ACE libraries by about one
third, and can also be applied to applications. It works by
optimising the sharing of template functions, which are created
in an "unusual" way under AIX. It also speeds up
compilation.<P>
Here's how to optimise the ACE library generation:<P>
Look at the <A
HREF="ace/Makefile">Makefile</a>
in <CODE>$ACE_ROOT/ace</CODE>. Create a file called
<CODE>ACE_All_Src.cpp</CODE>, and add a line to #include
each of the source files
listed under <CODE>FILES=</CODE> in the Makefile. Create a
file called <CODE>ACE_All_Tmp.h</CODE>
and add a line to #include each of the .h files listed under
<CODE>TEMPLATE_FILES=</CODE> in the Makefile. Now update the Makefile so that
<CODE>FILES=ACE_All_Src</CODE> and <CODE>TEMPLATE_FILES=ACE_All_Tmp</CODE>.<P>
<LI><B><a name="Linux">Linux</a></B><P>
ACE has been ported to <A
HREF="http://www.cs.wustl.edu/~cleeland/ace/">Linux</A> on
Intel, Alpha, and PowerPC platforms. If you use a RedHat 5.x
distribution, it's best to use RedHat 5.1 or later. ACE works
without any modifications on RedHat 5.1 and later, and on
Debian 2.1 on both Intel and Alpha. Make <A
HREF="#unix">symbolic links</A> to the
<code>include/makeinclude/platform_linux.GNU</code>
and <code>ace/config-linux.h</code> as your
platform_macros.GNU and config.h files, respectively. The same
files can be used on PowerPC, with LinuxPPC
1999 (R5), with glibc 2.1.1.<p>
If you run out of memory, it's easy to add virtual memory on
Linux. Please see the <code>mkswap</code> man page. You'll
need at least 256 to 300 Mb of virtual memory (RAM + swap) to
compile all of ACE+TAO. The <a href="#resource_requirements">System
Resource Requirements section</a> has some suggestions on how
to reduce the memory requirement.<p>
The glibc 2.0 dynamic loader isn't thread safe. If you want to
use the Invocation API you'll have to set
<code>LD_BIND_NOW=true</code>. If you want to use
<code>dlopen</code>, you should use <code>RTLD_NOW</code>. The
dynamic loader in glibc 2.1 is thread safe.<p>
The ACE <code>Tokens_Test</code> hangs with egcs 1.1b on Linux.
It runs properly when built with egcs 1.0.2 and later. All other
ACE tests run properly with these egcs 1.0.2 and later.<p>
<strong>NOTE:</strong> The TAO NameService uses IP multicasting
by default, though it is not required. IP multicast on Linux
requires the following:<p>
<ul>
<li>Enable IP multicast in the Linux kernel. It is enabled in
the default RedHat 5.1 kernel. In older distributions, you
can enable it by rebuilding your kernel with CONFIG_IP_MULTICAST
enabled.<p>
<li>Enable IP multicast in ACE. It is enabled by default in
<code>ace/config-linux-common.h</code>. If you don't use
IP multicast, add <code>#define ACE_HAS_IP_MULTICAST 0</code>
to your <code>ace/config.h</code> before building ACE.<p>
<li>There must be a network interface that is up and supports
multicast. If you have linuxconf, it's easiest to use that
to add a network route for multicast (224.0.0.0) on one of
your network interfaces, such as <code>eth0</code>. If
you don't have or use linuxconf, try adding a multicast
routing table entry using something like this:<p>
<pre>
<code># route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0</code>
</pre><p>
</ul>
With RedHat 5.0, you'll need some <a
href="os-patches/linux-patches.html">updates and possibly some
patches</a> to get ACE working with LinuxThreads. Some of the
patches are necessary with Alpha CPUs and with some older
kernels. egcs 1.0.1 can also be used, but it may need patches,
described there, as well.<p>
<strong>NOTE:</strong> Be careful when installing egcs on RedHat
systems. If you don't remove your old gcc and libg++ RPMs, it's
best to install egcs in a different directory than
<code>/usr</code>, such as <code>/usr/local</code>, and set your
<code>PATH</code> and <code>LD_LIBRARY_PATH</code>
accordingly.<p>
Some of the ACE tests fail on older, pre-glibc2 Linux platforms,
such as RedHat 4.2. The problems are with threads and
thread-specific storage.<p>
<LI><B>SCO UNIX</B><P>
ACE has been ported to SCO UNIX using the GNU g++ 2.7.2
compiler. Arturo Montes <<A
HREF="mailto:mitosys@colomsat.net.co">mitosys@colomsat.net.co</A>>
maintains this code. In addition, he also maintains a version
of <A HREF="FSU-threads.tar.gz">FSU pthreads</A>.<P>
<LI><B>SGI IRIX 5.x and 6.x</B><P>
ACE used to build fine using the SGI C++ and GNU GCC compilers
for IRIX 5.x. It has been ported to IRIX 6.x using the SGI
MipsPro 7.1 C++ compiler; be aware that in IRIX 6.2 there is a
number of patches that have to be installed and exceptions
appear to fail with the O32 ABI. Please check the config files
for the details.<P>
<LI><B> HP-UX 9.x, 10.x, and 11.00 </B> <P>
HP sells 2 C++ compilers for HP-UX 10.x and 11.00. If you are
using 9.x, there's only the first one.
<UL>
<LI>HP C++ - this is CC, HP's cfront-based compiler. As of ACE 4.4, it
can be used, but some people have problems with templates.
Caveat emptor. It's been said that you should run version 10.24,
if not later.
<LI>HP aC++ - this is aCC, HP's new, ANSI compiler. It handles ACE
very well. You should use version A.01.27 (or higher) on
HP-UX 10.x and version A.03.27 (or higher) on HP-UX 11.00.
</UL>
<P>
On HP-UX 10.20, a patch is required to compile ACE. The exact patch
number depends on the platform - check with HP's patch database to
locate the exact patch or its successor. For 9000 700 series machines
it is PHKL_8693 (s700 10.20 sys/time.h fix for select(2)/C++ defects).<p>
Also see further notes on this platform at Riverace's
<A HREF="http://www.riverace.com/FAQ/faq.html">Frequently Asked
Questions</A> page.
<P>
<LI><B>OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0)</B> <P>
The Digital UNIX C++ 5.4 through 5.7 compilers have problems
with ACE's templates. They compile the lib and most of the test
programs, although they warn about template usage. Most tests
run, some dump core. If you use a 5.x version of cxx, be sure
to set the CXX_VER variable to CXX_5, either on your make
command line or in an environment variable. The ACE Makefiles
assume by default that the cxx version is 6.x or later.<P>
CXX 6.0 and 6.1 are much improved over 5.x: V6.0-020, V6.1-025,
and later build all of ACE cleanly. All of the tests in
ACE_wrappers/tests run successfully with CXX 6.0 and CXX 6.1.
Please note that problems have been reported with some versions
of CXX 6.1, notably versions -021 and earlier. It's best to use
V6.1-022 or later.<p>
NOTE: if you use Digital UNIX 4.0f or later, you <strong>must</strong>
use <code>ace/config-tru64.h</code> instead of
<code>ace/config-osf1-4.0.h</code>. <code>ace/config-tru64.h</code>
can be used for all supported compilers on any version of
Digital UNIX after and include 4.0. And, with 4.0f and later when
using Digital CXX, you <strong>must</strong> use
<code>include/makeinclude/platform_tru64_cxx.GNU</code> instead of
<code>include/makeinclude/platform_osf1_4.0.GNU</code>.
GNU gcc 2.7.2.1 compiles without problems. All tests run
(besides minor problems). Thanks to Thilo Kielmann <<A
HREF="mailto:kielmann@informatik.uni-siegen.de">kielmann@informatik.uni-siegen.de</A>>
and David Trumble <<A
HREF="mailto:trumble@cvg.enet.dec.com">trumble@cvg.enet.dec.com</A>>
for help with this port.<P>
<li><b> FreeBSD </b><p>
FreeBSD is a fast evolving platform. However, it has the
advantage of having standard releases. At this moment, ACE is
only perodically tested against -stable (3.1R) and we rely a lot
on FreeBSD users' feedbacks. <p>
Notice that on older FreeBSD, <code>ld.so</code> only looks for
so libraries with <b>version number</b> appended. ACE makefiles
create symlinks for most shared libraries if
<code>versioned_so</code> is defined to 1 in
<code>$ACE_ROOT/ace</code> with appropriate ACE version.
However, this does not work for libACE.so itself so you have to
create it manually (If you figure out how to do this, please let
us know) like this: <p>
<code>ln -sf $ACE_ROOT/ace/libACE.so $ACE_ROOT/ace/libACE.so.4.5</code><p>
On newer FreeBSD (3.0 or later,) this is no longer necessary.<p>
<li><b>NetBSD</b><p>
Like older FreeBSD, NetBSD's <code>ld.so</code> also requires
versioned .so files.<p>
<li><b>OpenBSD</b><p>
ACE has been ported to OpenBSD 3.1 and GNU g++ 2.95.3.<P>
As with FreeBSD and NetBSD, OpenBSD requires versioned .so
files. This is currently handled by the build files and no
additional work is needed.<P>
ACE has been ported to OpenBSD with and without pthreads
enabled. When using pthreads, though, C++ exceptions must be
disabled. This is a known problem with the current release of
OpenBSD (see www.openbsd.org, bug #1750). ACE emulated
exceptions work fine.<P>
Compiling TAO may require the user data segment size
restrictions and possibly other options to be increased. This
is done by modifying the default user class in /etc/login.conf
or by adding a new class and modifying the master passwer file
accordingly.<P>
<LI><B> UnixWare </B> <P>
Steve Huston <<A
HREF="mailto:shuston@riverace.com">shuston@riverace.com</A>>
has ported ACE to work with UnixWare 2.01 and g++.<P>
Ganesh Pai <<A
HREF="mailto:gpai@voicetek.com">gpai@voicetek.com</A>>
subsequently did the port for version 2.1.2, also with g++.<P>
Phil Mesnier <<A HREF="mailto:mesnier_p@ociweb.com">
mesnier_p@ociweb.com</A>> updated the port to support
UnixWare 7.1.0, with help from Michael Meissnitzer
<<A HREF="mailto:michael.meissnitzer@siemens.at">
michael.meissnitzer@siemens.at</A>>, Christian Klepp <
<A HREF="mailto:christian.klepp@siemens.at">christian.klepp@siemens.at
</A>> and Engelbert Staller <<A HREF="engelbert.staller@siemens.at">
engelbert.staller@siemens.at</A>>
Building ACE (and TAO) on Unixware 7.1.0 requires a very specific
g++ build environment. In particular, you must build and install
g++ 2.95.2, along with binutils 2.9.1. The order (and the declaration
of configuration) is extremely important. Using the gcc compiler
provided on the Skunkware CD on a pentium system, here is the recipe
I used to build a working environment (as root):<br>
<pre>
mkdir /usr/local/newgnu
< ftp and untar binutils-2.9.1 >
< ftp and untar gcc-2.95.2 >
mkdir -p build/binutils build/gcc
cd build/binutils
../../binutils-2.9.1/configure i386-sco-sysv4
gmake # takes a long time
gmake install # this creates /usr/local/i386-sco-sysv4/...
mkdir /usr/local/i486-pc-sysv5/bin
cd /usr/local/i486-pc-sysv5/bin
for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
#links all the newly installed utilities
cd /usr/local/newgnu/build/gcc
../../gcc-2.95.2/configure --with-gnu-as --with-gnu-ld
gmake bootstrap # takes a long time
gmake install
mkdir /usr/local/i586-UnixWare7.1.0-sysv5/bin
for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
</pre>
Once done, ACE and TAO will successfully build and link.<p>
<LI><B>Chorus</B> <P>
Wei Chiang <<A
HREF="mailto:chiang@tele.nokia.fi">chiang@tele.nokia.fi</A>>
has ported ACE to Chorus 3.1 using GNU g++ 2.7.2.<P>
<LI><B><a name="LynxOS">LynxOS</a></B><P>
ACE builds and runs properly on LynxOS 3.0.0 for Intel and
PowerPC targets.
ACE's Naming_Test fails; it is disabled in <a
href="tests/run_tests.sh"><code>ACE_wrappers/tests/run_tests.sh</code></a>.<p>
If you run out of memory on LynxOS, these might help:<p>
<ul>
<li>Increase the limits in <code>/etc/starttab</code>,
then logout and login again. We use these limits:
<pre>
# Data, stack, and core file limits (in Kbytes)
240000
80000
102400</pre><p>
<li>Enable or expand virtual memory, with something like:
<pre>
# mkcontig /swap 320
# prio 17 vmstart /swap</pre>
See the <code>mkcontig</code> and <code>vmstart</code>
man pages, and <code>/bin/rc</code>.<p>
</ul>
Please see the comments in the
<a href="include/makeinclude/platform_lynxos.GNU">ACE
platform_lynxos.GNU file</a> for information on, and an
example of, tailoring for your particular platform.<p>
We actively maintain ACE on LynxOS 3.0.0. It should build and
run on LynxOS 2.5, but we no longer test on that OS version.<p>
NOTE: if you want to use IP multicast on LynxOS, be sure to add
this line to your <code>/net/rc.network</code>, and reboot:<p>
<pre><code>
/bin/route add "224.0.0.0" "$my_name"
</code></pre>
Dave Mayerhoefer <<A
HREF="mailto:davem@lynx.com">davem@lynx.com</A>> has ported
ACE to LynxOS 2.5 using GNU g++ 2.7.2. However, you may need to
apply some <A HREF="os-patches/lynxos-patches.html">patches to
LynxOS</A> to get ACE working.<P>
<LI><STRONG>VxWorks</STRONG><P>
<A HREF="http://www.cs.wustl.edu/~levine/">David Levine</A>
<<A
HREF="mailto:levine@cs.wustl.edu">levine@cs.wustl.edu</A>> has
ported ACE to VxWorks 5.2/5.3/5.3.1/5.4 with the GreenHills
1.8.8/1.8.9 and g++ compilers that are distributed with
VxWorks/Tornado. An anonymous contributor has also
provided <a href="os-patches/vxworks-5.1.txt">notes for using
ACE with VxWorks 5.1.</a><P>
Tornado II/VxWorks 5.4 support IP multicast. That is not enabled
by default in ACE for VxWorks, because it probably depends on
kernel configuration. To enable it, add
<code>#define ACE_HAS_IP_MULTICAST</code> to your
<code>ace/config.h</code>.<p>
In addition to all of the other benefits of ACE, it helps work
around some deficiencies with VxWorks 5.3/5.3.1. Some of these
apply only with g++, at least thru version 2.7.2. That is the
version that is shipped with Tornado 1.0.1/ VxWorks 5.3.1. The
problems are:<P>
<OL>
<LI>The program entry point cannot be called "main" with g++. ACE
renames it to "ace_main" (configurable via ACE_MAIN) on VxWorks.
While this may seem trivial, it is important with legacy code.
ACE itself ran into this problem.<P>
<LI>argc/argv isn't used with VxWorks entry points. ACE provides
a wrapper function that transparently converts shell command
line arguments to argc/argv form. See <A HREF="#spa">below</a>
for details.<P>
<LI>Unsigned long long support is not available with the g++ that
is distributed with Tornado 1.0.1/VxWorks 5.3.1, or with
GreenHills 1.8.8. The documentation says that it is supported
by g++, but try using it :-) Wind River technical support verified
that it doesn't work. ACE provides its own 64-bit unsigned integer
type, ACE_hrtime_t, so you don't even have to worry about this
problem if you use it.<P>
<LI>There a gory problem with munch that is severely aggravated
by the presence of a static in the Wind River/g++ iostream.h.
ACE hides this and provides an easy-to-use workaround in the
very unlikely situation where it becomes a problem.
Please see ace/config-vxworks5.2-g++.h for more information.<P>
</OL>
In addition, as noted <A HREF="#g++">below</A> following the
discussion of the g++ -fno-implicit-templates option,
-fno-implicit-templates is broken for x86 targets. And, -O2
is not supported on some targets.<P>
Please note that ACE uses one of the spare fields in the Wind
River task control block, spare4, for thread- specific storage.
This field is specified in only one place, in ace/OS.i, so it
can easily be changed to one of the other spare fields, if
necessary.<P>
Versions of ACE from 4.3.3 and beyond destroy dynamically
allocated singletons in the ACE library. But, they may not
properly destroy some static objects. If you have trouble
running a program multiple times, it may be necessary to unload
the module, using unld, and reload it between runs.
Alternatively, you could try calling <code>cplusDtors</code> and
then <code>cplusCtors</code> between runs.<P>
<LI><B>MVS OpenEdition</B> <P>
All of ACE has been ported to OpenEdition by Chuck Gehr <<A
HREF="mailto:gehr@sweng.stortek.com">gehr@sweng.stortek.com</A>>.
The ACE library, all the tests and most of the examples and apps
build clean. There are still some problems that need to be
ironed out:<P>
MVS does not support the dynamic linking dl...() calls that the
Service Configurator uses to dynamically link services at run
time. As a result, all the examples and apps that use a svc.conf
file (for dynamically configuring service objects) do not work,
however, most of these apps can be built/run statically. Also,
the Svc_Conf_l.cpp and Svc_Conf_y.cpp files are generated using
flex and yacc on a ascii (not ebcdic) machine and as a result
they don't work very well with ebcdic svc.conf files. We should
be able to regenerate these files on MVS but MVS doesn't have
flex. This is something that needs to be done.<P>
Some of the tests do not execute properly. This is a minority
and over time the goal is to get to 100%.<P>
The make scheme for some of the apps still doesn't work
perfectly on MVS. This is mainly due to the way shared
libraries are handled on MVS. See <A HREF="#mvs">additional
build tips for MVS</A> for more on this.<P>
<li><strong>QNX Neutrino</strong><p>
ACE has been ported to <a
href="http://www.qnx.com/products/os/neutrino.html">QNX Neutrino
2.0</a>. We cross-compile for Neutrino on a QNX4 host using g++
2.8.1, using the <a
href="ace/config-qnx-neutrino.h">ace/config-qnx-neutrino.h</a>
and <a
href="include/makeinclude/platform_qnx_neutrino.GNU">include/makeinclude/platform_qnx_neutrino.GNU</a>
configuration files. Many of the ACE tests succeed, though some
fail. As the porting effort progresses, we hope to eliminate
these failures. If you know of fixes, please send them to
us.<p>
<li><strong>QNX RTP</strong><p>
ACE has been ported to <a
href="http://get.qnx.com/">QNX RTP
</a>. We compile for QNX RTP using the GCC compiler shipped with the
distribution, using the <a
href="ace/config-qnx-rtp.h">ace/config-qnx-neutrino.h</a>
and <a
href="include/makeinclude/platform_qnx_neutrino.GNU">include/makeinclude/platform_qnx_neutrino.GNU</a>
configuration files.
Many of the ACE tests succeed, though some
fail. As the porting effort progresses, we hope to eliminate
these failures. If you know of fixes, please send them to
us.<p>
<strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
Under the current version of QNX RTP ACE fails if compiled with
debug=1 (i.e. "-g" option in GCC). <p>
<li><strong>PharLap TNT Embedded ToolSuite (ETS)</strong><p>
ACE has been ported to <a
href="http://www.pharlap.com">PharLap's</a> TNT Embedded
ToolSuite (ETS) version 9.1. The port is being tested with
Microsoft Visual C++ 6.<p> To build for PharLap, use the
ace/config-pharlap.h configuration file, and the instructions
for building on Win32. Building the ACE library is the same as
for regular Win32 platforms, except you choose one of the PharLap
ETS configurations to build within Visual C++. Only static
library configurations are available for PharLap at this time.
For an example of how to build
binaries, see the tests directory. The tests_pharlap_msvc.lnk
file is a LinkLoc commands file that the ACE tests are built
with. It is likely that local sites may need to adjust this file
for their target environment. <p> If you have any fixes or
suggestions for improving this port, please contact <a
href="mailto:shuston@riverace.com">Steve Huston</a>. <P>
<li><strong>Mac OS X (10.0.x, not public beta)</strong><p>
The Mac OS X port of ACE is very much a work in progress. Some
of the examples build and run, some of them don't yet. Reactors
seem to work, while Proactors don't (Mac OS X doesn't use aio_*
calls for async i/o, it uses the OS X Event Queue instead, and
the ACE port doesn't take this into account yet). Also, on OS X,
you must set the DYLD_LIBRARY_PATH environment variable to
$ACE_ROOT/ace i.e. setenv DYLD_LIBRARY_PATH $ACE_ROOT/ace, or else
none of the examples will be able to find libACE.dylib.
John Zorko <<A
href="mailto:j.zorko@att.net">j.zorko@att.net</A>> began this port for
a work project, and basically only ported enough of ACE to be able to
do what we needed to with it on Mac OS X. If you would like
to continue the port, please contact John since he as
interested in seeing ACE run, lean, mean and fully supported,
on Mac OS X.
</UL>
<HR>
<H4><A NAME="g++">Compiling ACE with GNU g++</A></H4>
If you use the GNU GCC g++ compiler please note the following:
<UL>
<li>If you have problems building shared libraries with egcs 1.1 or 1.1.1
on SunOS 2.5 or 2.5.1 that look like this:
<pre>
/usr/ccs/lib/libgen.a(reg_compile.o): In function `_get_vars_storage':
reg_compile.o(.text+0x30): relocation truncated to fit: R_SPARC_GOT13 free
</pre>
the suggested workaround is to comment out the <code>ACE_HAS_REGEX</code>
<code>#define</code> in <code>ace/config-sunos5.5.h</code>.
Or better, create an <code>ace/config.h</code> that looks like:
<pre>
#ifndef ACE_CONFIG_H
// ACE_CONFIG_H is defined by the following #included header.
#include "ace/config-sunos5.5.h"
#undef ACE_HAS_REGEX
#endif /* ACE_CONFIG_H */
</pre>
We don't know what causes the link problem, though the
workaround solves it.<p>
<li>With g++ 2.8.0, an internal compiler error is raised when
trying to compile ACE_Map_Manager instantiations. One workaround
is to disable optimization. The easiest way to do that is:
<pre><code>% make optimize=0</code></pre>
Or, you can edit your include/makeinclude/platform_sunos5_g++.GNU,
and comment out the <code>OCFLAGS</code> line.<P>
<li>ACE/TAO don't seem to build well with g++ 2.8.1. We routinely
use g++ 2.95.x and g++ 3.x, and recommend those versions or better.<p>
<LI>Earlier (prior to 2.95.2) versions of g++ may not compile
certain parts of ACE correctly due to compiler bugs. Please
upgrade to g++ 2.95.2 or greater.<P>
<LI>Make sure to update your gcc <code>config.status</code>
file. This file is produced when installing gcc; it specifies
where to install the binary files that gcc uses. For example,
it specifies whether to use Solaris's <code>/usr/ccs/bin</code>
binary utils or GNU binary utils. The
<code>config.status</code> file is an output of the gcc
<code>configure</code> script; it is preferable to use the
<code>--prefix</code> option to <code>configure</code> instead
of hacking its output.<P>
<LI>If you are getting weird link errors when building libACE
on Solaris you are probably using the GNU linker. Try using the
Sun linker (/usr/ccs/bin/ld) instead. Note that gcc first looks
for the GNU linker if it is installed along with gcc. The only
way to not use the GNU linker is to delete it from the
installation or to build your own compiler with no linker. Be
aware that you still need the libraries and includes of gcc.<P>
NOTE: if you do use the GNU linker, you might need to change
the <code>-G</code> flag to <code>-shared</code> in
the <code>SOFLAGS</code> definition in your
<code>include/makeinclude/platform_macros.GNU</code>.<p>
<LI>Don't get too confused about contradictory statements in
the gcc documentation. It was written by different
people...<P>
<LI>Make sure that the linker invoked by gcc produces code
that initializes static objects. Please see gcc's
documentation for using <CODE>collect2</CODE>.<P>
<LI>By default, gcc (thru version 2.7.2, at least) uses
implicit template instantiation. Besides wasting space, this
breaks the use of ACE_Singleton: instead of one singleton
instance, there could be one instance per object (.o) file that
"sees" the template. Therefore, we have overridden this default
in ACE by enabling the -fno-implicit-templates option to CCFLAGS
in all include/makeinclude/platform_*.GNU files that set CXX to
g++.<P>
<LI>The disadvantage of this approach is that you must
add template specializations for all templates that your
application uses to your own code. (The ACE libraries are
self-contained: you don't need to add the templates that they
use internally.) Examples of template specializations occur in
quite a few ACE .cpp files; see the end of <A
HREF="apps/Gateway/Gateway/Connection_Handler.cpp">apps/Gateway/Gateway/Connection_Handler.cpp</A>
for one example. An easy way to figure out what template
instantiations are need is to try to build your executable and
pipe the output through c++filt. The linker will report the
missing instantiations as undefined symbols. Iteration may be
necessary, if the template instantiations themselves reference
other templates.<P>
<LI>Alternatively, you could use the <A NAME="repo">-frepo</A>
option available with
recent egcs versions (2.90 and later, I think) instead of
-fno-implicit-templates. (Patches for earlier g++ versions
might be available from
<a href="ftp://ftp.cygnus.com/pub/g++/">Cygnus</a>.)
ACE readily supports this option for
application code: to enable it just add <code>repo=1</code> to
your <code>make</code> invocation, or to your
<code>include/makeinclude/platform_macros.GNU</code>.<p>
The size of the ACE library is typically reduced by about
25 percent with repo=1, compared to the default with
-fno-implicit-templates. This savings results from not
instantiating unused classes, and from not instantiating
unused member functions of those template classes which are
instantiated.<p>
However, repo=1 requires care if your application creates libraries,
in order to avoid multiple instantiations. We avoid the problem
in ACE (and TAO) by including all of the ACE object files into
other ACE (and TAO) libraries. Please see the g++ FAQ and gcc
manual for more information on the -frepo option.<p>
Furthermore, it appears that g++ may have problems instantiating
all templates properly with -frepo. We have worked around these
problems (by using explicit instantiations even with ACE_HAS_GNU_REPO)
with egcs 1.1.2. A quick try with g++ 2.95 showed more problems,
so we don't support repo=1 with that g++ version, yet.<p>
<li>The implementation of templates for g++ version 2.8
eliminates the restriction against static data members in
template classes.<p>
<li>A final alternative is to
remove the <code>-fno-implicit-templates</code> option from the
CCFLAGS macro in your include/makeinclude/platform_macros.GNU,
and thereby use the default g++ implicit template
instantiation.<P>
<LI>Thanks to Thilo Kielmann <<A
HREF="mailto:kielmann@informatik.uni-siegen.de">kielmann@informatik.uni-siegen.de</A>>
for reporting the problem with ACE_Singleton on g++, and for
helping to find and implement these solutions.<P>
<LI>On VxWorks only, g++ (thru version 2.7.2, distributed
with Tornado 1.0.1/VxWorks 5.3.1), for x86 targets,
-fno-implicit-templates is broken. In addition, -O2
is not supported on some targets.<P>
</UL>
<P><HR>
<H4><A NAME="egcs">Compiling ACE with egcs</A></H4>
<ul>
<li>ACE transparently supports egcs, for the most part. Please see
<a href="#g++">Compiling ACE with g++</a> in this document. And,
please use the appropriate g++ config and platform files for the OS on
which you will use egcs.<p>
<li><strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
The default behavior of the ACE Makefiles is to enable native
exception support. To disable exception handling, add
<code>exceptions=0</code> to your <code>make</code> command line
invocation, or to your
<code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code> file.<p>
<li>egcs may have trouble linking some executables, such as the ACE
IOStream_Test, if its static libraries are used. Though
<a href="mailto:trose@bridgewatersys.com">Tim Rose</a> reports
that egcs 1.1.1 static libraries work just fine on Solaris 2.6
with patches: 105181-12, 105568-13, 105210-19, 105591-05, 105395-04,
and 105490-07.<p>
If you need or want to use egcs' shared libraries, build it
with the <code>--enable-shared</code> egcs config option. The
<code>--enable-shared</code> option is <strong>not</strong> an
egcs run-time option. Build egcs in a way similar to the
following example:
<pre><code>
$ ./configure --enable-shared
$ make bootstrap
</code></pre>
Be sure to set your <code>LD_LIBRARY_PATH</code> environment
variable, if necessary, to pick up those shared libraries.<p>
<li>On DEC Alpha, egcs through version 1.03a, at least, may fail
to build ACE if debugging (-g) is enabled. The fix is to
edit the egcs gcc/mips-file.c file, at line 976, and change
<code>PAGE_SIZE</code> to 8192. Then rebuild ACE. Thanks to
<a href="mailto:gpai@voicetek.com">Ganesh Pai</a> for this
information.<p>
<li>Sun OS 5.6 using egcs1.1.2/egcs 2.95 with
ld:Software Generation Utilities - Solaris/ELF (3.0)
as: WorkShop Compilers 4.X dev 18 Sep 1996<p>
You could come across weird external symbol linker errors.
Example:
<pre>
-I/opt/ace/SunOS-1.0 -DACE_HAS_EXCEPTIONS -o Cached_Accept_Conn_Test
.obj/Cached_Accept_Conn_Test.o -L/opt/ace/SunOS-1.0/ace -L./ -lACE
-lsocket -ldl -lgen -lnsl -lposix4 -lthread
ld: warning: relocation error: R_SPARC_32: file
.obj/Cached_Accept_Conn_Test.o: symbol
__t21ACE_Cache_Map_Manager7Zt30ACE_Refcounted_Hash_Recyclable1Z13
ACE_INET_AddrZP18Client_Svc_HandlerZt23ACE_Hash_Map_Manager_Ex5Zt
30ACE_Refcounted_Hash_Recyclable1Z13ACE_INET_AddrZt8ACE_Pair2ZP18
Client_Svc_HandlerZUiZt8ACE_Hash1Zt30...</pre>
external symbolic relocation against non-allocatable section .stab;
cannot be processed at runtime: relocation ignored<P>
Solution:<P>
Install the "binutils" package from GNU (www.gnu.org); specifically,
"as" and "ld".<P>
Conclusion:<P>
Perfect build stats:<P>
OS:
Kernel version: SunOS 5.6 Generic 105181-03 December 1999.<P>
compiler:
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)<P>
loader:
GNU ld version 2.9.1 (with BFD 2.9.1)
Supported emulations:
elf32_sparc<P>
assembler:
GNU assembler version 2.9.1 (sparc-sun-solaris2.6), using
BFD version 2.9.1<P>
Thanks to <a href="mailto:johng@keck.hawii.edu">John Gathright</a> for providing this
information.<P>
<li>Compiling using the <code>-fsquangle</code> option helps to shorten long
symbol names and is a boon to linkers and assemblers which cant
grok long names.
Thanks to <a href="mailto:ssweeney@sanders.com">Skye Sweeney</a> for trying it
out and <a href="mailto:ossama@uci.edu">Ossama Othman</a> for discovering the
option with egcs.<p>
Heres a note on how to go about this (contributed by Skye
Sweeney):<p>
1) -fsquangle the name is a combination of squash and mangle!<p>
2) -fsquangle compresses the mangled names.<p>
3) All libraries must be compiles with the option. You cannot simply
compile modules that have large names with it. This includes system
libraries and vendor libraries like RogueWave.<p>
4) The "simple" solution is not to add the option to each makefile,
but rather recompile the compiler to have the option on by default.
This is done by editing the file `gcc/cp/decl2.c', setting
`flag_do_squangling = 1', then rebuilding the compiler and
libraries.<p>
5) After many false starts and linking snafus, I can recompile my
ACE/TAO/RogueWave/Lex/Yacc 100 Meg application.<p>
</ul>
<P><HR>
<H3><A NAME="aceinstall">Building and Installing ACE</A></H3>
The following explains how to build ACE on <A HREF="#unix">UNIX</A>
and <A HREF="#win32">Win32</A>.
<h4>General Rules</h4>
<UL>
<li><p>Many features in ACE can be modified by defining some macros in
<code>$ACE_ROOT/ace/config.h</code>. These macros should
<em><b>always</b></em> appear <em><b>before</b></em> including
your platform specific config file.</p>
<li><p>However, if you want to undefine/redefine macros defined in the
platform specific config file, these <code>#undef</code> should
come <em><b>after</b></em> the config file.</p>
<LI> If you're planning to build ACE on multiple platforms, you may
want to consider <A HREF="#cloning">cloning the source tree</A>
before you start. <P>
</UL>
<hr align=left width="50%">
<H4><A NAME="unix">Building and Installing ACE on UNIX</A></H4>
Building and installing ACE on UNIX is relatively simple (the <A
HREF="#win32">process</A> for Win32 is different). Here's what you
need to do:<P>
<OL>
<LI>Install <A HREF="ftp://prep.ai.mit.edu/pub/gnu/make/">GNU make</A>
3.79.1 or greater on your system (available via
anonymous ftp from prep.ai.mit.edu in the pub/gnu/make/ directory).
You <EM>must</EM> use GNU make or ACE won't compile.<P>
<LI>Add an environment variable called ACE_ROOT that contains the
name of the root of the directory where you keep the ACE wrapper
source tree. The ACE recursive Makefile scheme needs this information.
There are several ways to set the ACE_ROOT variable. For
instance, in my .login file I have the following entry:<P>
<pre><code>
% setenv ACE_ROOT /home/cs/faculty/schmidt/ACE_wrappers
</code></pre><P>
However, if you're building a number of versions of ACE, e.g., for
different OS platforms or for different releases of ACE, you might use
the following approach:
<pre><code>
% setenv ACE_ROOT $cwd
</code></pre>
<LI>Edit the $ACE_ROOT/ace/OS.h file to update things like default
hostname and port numbers you'd like the programs in the
$ACE_ROOT/{apps,tests} directories to use by default. Note,
however that you can normally skip this step because the
defaults are typically fine for most systems. <P>
<LI>Create (via <code>ln -s</CODE> or <CODE>cp</CODE>) a
<code>$ACE_ROOT/ace/config.h</code>
file that contains the appropriate platform/compiler-specific
header configurations, e.g.,
<PRE><CODE>
% ln -s config-sunos5-sunc++-4.x.h config.h
</CODE></PRE>
This file
contains the #defines that are used throughout ACE to indicate
which features your system supports (see the
<code>$ACE_ROOT/ace/OS.h</code> file for many examples of how
the ACE build configuration is affected by these macro
settings). Make sure you settings are placed
<strong>before</strong> the inclusion of the platform-specific
header file.<P>
There are config files for most versions of UNIX. If there
isn't a version of this file that matches your
platform/compiler, you'll need to make one. Please send me
email if you get it working so I can add it to the master ACE
release.<P>
<LI>Create (via <code>ln -s</CODE> or <CODE>cp</CODE>) a
$ACE_ROOT/include/makeinclude/platform_macros.GNU file
that contains the appropriate platform/compiler-specific
Makefile configurations, e.g.,
<PRE><CODE>
% ln -s platform_sunos5_sunc++.GNU platform_macros.GNU
</CODE></PRE>
This file
contains the compiler and Makefile directives that are
platform/compiler-specific<P>
<LI>Note that because ACE builds shared libraries, you'll need to set
LD_LIBRARY_PATH to whereever you put the binary version of the
ACE library. For example, you probably want to do something
like the following<P>
<pre><code>
% setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$LD_LIBRARY_PATH
</code></pre><P>
<LI>When all this is done, hopefully all you'll need to do is type:<P>
<pre><code>
% make
</code></pre><P>
at the root of the ACE source tree. This will build the ACE
library, tests, the examples, and the sample applications.
Building the entire ACE release can take a long time and consume
lots of disk space, however. Therefore, you might consider
cd'ing into the <A HREF="ace">$ACE_ROOT/ace/</a> directory and
running <CODE>make</CODE> there to build just the ACE library.
As a sanity check, you might also want to build and run the
automated <A HREF="tests/README">"one-button" tests</A> in <A
HREF="tests/">$ACE_ROOT/tests/</a>. Finally, if you're also
planning on building <A
HREF="http://www.cs.wustl.edu/~schmidt/TAO.html">TAO</A>, you
should build the <A
HREF="http://www.cs.wustl.edu/~schmidt/PDF/gperf.pdf">gperf</A>
perfect hash function generator application in <A
HREF="apps/gperf">$ACE_ROOT/apps/gperf/</A>.<P>
<LI>If you need to regenerate the Svc_Conf_y.cpp file, you'll need to
get <A HREF="http://www.cs.wustl.edu/~schmidt/byacc.tar.gz">Berkeley
YACC</A>. However, you should rarely, if ever, need to do this.<P>
</OL>
<P><hr align=left width="50%"><P>
<H4><A NAME="win32">Building and Installing ACE on Win32</A></H4>
Below are instructions for building ACE with <A
HREF="#borland">Borland C++Builder</A>, <A HREF="#msvc">Microsoft
Visual C++</A> and <A HREF="#mingw">Mingw</A>. <P>
First, if you are upgrading from an older release, clean up everything
and rebuild from scratch to ensure that everything is rebuilt
correctly. You might have to manually go through the ACE directories
and delete all *.obj, *.dll, *.lib, *.ilk, *.pdb, *.idb, *.ncb, *.opt,
and *.exp files in order to start over from scratch (the Clean command
in MSVC may not do this). <P>
ACE contains project files for Microsoft Visual C++ 5.0 or later
(*.dsw) and IBM's VisualAge C++ compiler (*.icc). There are also
Makefile.bor files to compile ACE, the ACE one-button tests, and TAO
with Borland C++ Builder. <P>
<P><hr align=left width="50%"><P>
<H4><A NAME="borland">Building and Installing ACE on Win32 with Borland
C++Builder</A></H4>
If you are building for a machine without a network card, you may want
to check <A HREF="#win32nonic">here</A> first. <P>
<OL>
<LI>Uncompress the ACE distribution into a directory, where it will
create an
ACE_wrappers directory containing the source. The ACE_wrappers
directory will be referred to as ACE_ROOT in the following steps -- so
ACE_ROOT\ace would be C:\ACE_wrappers\ace if you uncompressed into the
root directory.<BR>
<BR>
<LI>Create a file called <code>config.h</code> in the ACE_ROOT\ace
directory that contains: <BR>
<BR>
<CODE>#include "ace/config-win32.h"</CODE><BR>
<BR>
If you are building for Windows NT or Windows 2K then you can start
without any more changes. If you are building on Windows 9x/Me,
then you should add the line <BR>
<BR>
<CODE>#define ACE_HAS_WINNT4 0</CODE><BR>
<BR>
before the #include statement in ACE_ROOT\ace\config.h and it
will turn off some WinNT/Win2K-specific code in ACE.<BR>
<BR>
<LI>Open a Command Prompt (DOS Box).<BR>
<BR>
<LI>Set the ACE_ROOT environment variable to point to the ACE_wrappers
directory. For example:<BR>
<BR>
<CODE>set ACE_ROOT=C:\ACE_wrappers</CODE><BR>
<BR>
<LI>Set the BCBVER environment vairable to the main version of your BCB compiler.
Currently 4, 5, and 6 are supported. For example:<BR>
<BR>
<CODE>set BCBVER=5</CODE><BR>
<BR>
<LI>Change to the ACE_ROOT\ace directory.<BR>
<BR>
<LI>Build release DLLs for ACE by going:<BR>
<BR>
<CODE>make -f Makefile.bor</CODE><BR>
<BR>
<LI>You can build several different versions of ACE by setting environment
variables
before you run make:<BR>
<BR>
Set the environment variable below to build a debug version of ACE<BR>
<CODE>set DEBUG=1</CODE><BR>
<BR>
Set the environment variable below to build a static version of ACE<BR>
<CODE>set STATIC=1</CODE><BR>
<BR>
Set the environment variable below to build a unicode version of ACE<BR>
<CODE>set UNICODE=1</CODE><BR>
<BR>
Set the environment variable below to build a version of ACE with Codeguard support. Should only be used when DEBUG is also set<BR>
<CODE>set CODEGUARD=1</CODE><BR>
<BR>
Set the environment variable below to build a version of ACE that is build against the VCL-compatible run-time library. This can only be used with BCB version 4<BR>
<CODE>set PASCAL=1</CODE><BR>
<BR>
You can then start the build with the command
<BR><CODE>make -f Makefile.bor</CODE><BR>
<BR>
You may also enable the options by passing them as command line options to make, for example:<BR>
<CODE>make -f Makefile.bor -DDEBUG -DPASCAL</CODE><BR>
<BR>
<LI>Optionally install the ACE header files, libraries and executables
for use
in your applications. Here we are installing them into C:\ACETAO: <BR>
<BR>
<CODE>make -f Makefile.bor -DINSTALL_DIR=C:\ACETAO install</CODE><BR>
<BR>
</OL>
These instructions do not cover all possible build configurations. Please
see <A
HREF="http://www.tenermerx.com/tao_bcb/index.html">http://www.tenermerx.com/tao_bcb/index.html</A>
for more detailed information on building and using ACE+TAO with Borland C++
Builder. <P>
If you are using C++Builder 4, then the libraries built using the above
instructions are intended for use with generic console or windows applications
and they link against the corresponding C++ runtime library. VCL applications
created using BCB4's RAD environment must link against the VCL-compatible (ie
pascal-compatible) runtime library. To tell the difference between these
libraries the VCL-compatible ones have a 'p' in the suffix (i.e., 'p' for
pascal). To build VCL compatible libraries try
<BLOCKQUOTE><PRE><CODE>set PASCAL=1
make -f Makefile.bor
</CODE></PRE></BLOCKQUOTE> <P>
The Borland C++ Builder 4.0/5.0 port has been done by <A
HREF="mailto:jody@atdesk.com">Jody Hagins</A> and <A
HREF="mailto:chris@kohlhoff.com">Christopher Kohlhoff</A>. <P>
<B>ACE TESTS</B><P>
The tests are located in ACE_ROOT\tests. You build the tests using the
Makefile.bor file, that is:<P>
<BLOCKQUOTE><CODE>
make -f Makefile.bor
</CODE></BLOCKQUOTE><P>
Once you build all the tests, you can run a perl script:<P>
<BLOCKQUOTE><CODE>run_test.pl -ExeSubDir
Dynamic\Release</CODE></BLOCKQUOTE><P> or the the batch file:<P>
<BLOCKQUOTE><CODE>run_tests.bat bor</CODE></BLOCKQUOTE><P> in the
<code>tests</code> directory to try all the tests. You need to make
sure the ACE bin directory (in this case ACE_ROOT\bin\Dynamic\Release)
is on the path before you try to run the tests.<p>
<P><hr align=left width="50%"><P>
<H4><A NAME="msvc">Building and Installing ACE on Win32 with
Microsoft Visual C++</A></H4>
<EM>Note concerning MSVC 5.0 and Service Pack 3:</EM> There has been
confusion regarding MSVC 5 and its Service Pack 3. Some ACE users
have, in the past, had problems with SP3 that were not present in SP2.
Thanks to the diligent efforts of <A
HREF="mailto:fultonb@pcnet1.ascs.aro.allied.com">Bill Fulton</A>, the
mystery appears to be solved. The key? (Oh, this is a good one...)
It would appear that there are actually multiple versions of SP3 in
existence. The earlier ones have the bug, while later ones have it
fixed. The service pack downloadable from Microsoft's web site as of
June 16, 1998 works fine. The CD containing SP3, if it has part
number X03-50158 on the disc (the part number on the jacket is
probably different), also works fine.
Note, however, that regardless of the version of SP3, there are some
STL bugs in SP3 which you should get corrected. Please see <A
HREF="http://www.dinkumware.com/vc_fixes.html">http://www.dinkumware.com/vc_fixes.html</A>
for details. Thank you to <A HREF="mailto:ben@jetpen.com">Ben Eng</A>
for the pointer to the STL fixes.<P>
Right now there is a SP4 (and hopefully only one of them) which fixes a
deadlock problem in the STL. <P>
We no longer actively support MSVC 4.x or earlier. ACE might work with
these compilers but probably not without a bit of effort. <P>
<OL>
<LI>Uncompress the ACE distribution into a directory, where it will create a
ACE_wrappers directory containing the distribution. The ACE_wrappers
directory will be referred to as ACE_ROOT in the following steps -- so
ACE_ROOT\ace would be C:\ACE_wrappers\ace if you uncompressed into the
root directory.<BR>
<BR>
<LI>Create a file called <code>config.h</code> in the ACE_ROOT\ace
directory that contains: <BR>
<BR>
<CODE>#include "ace/config-win32.h"</CODE><BR>
<BR>
<LI>Now load up the project file for ACE (ACE_ROOT\ace\ace.dsw). <BR>
<BR>
<LI>Each project will contain several different configurations. These
are a mixture of Debug/Release, MFC/Non-MFC, and Static/Dynamic
library versions.
Make sure you are building the one you'll use (for example, the
debug tests need the debug version of ACE, and so on). All these
different configurations are provided for your convenience. You
can either adopt the scheme to build your applications with
different configurations, or use <code>ace/config.h</code> to
tweak with the default settings on NT.<BR>
<STRONG>Note:</STRONG> If you
use the dynamic libraries, make sure you include ACE_ROOT\bin
in your PATH whenever you run programs that uses ACE. Otherwise
you may experience problems finding ace.dll or aced.dll.<BR>
<BR>
<LI>If you are building for Windows NT or Windows 2K then you can start building
without anymore changes. If you are building on Windows 9x/Me,
then you should add the line <BR>
<BR>
<CODE>#define ACE_HAS_WINNT4 0</CODE><BR>
<BR>
before the #include statement in ACE_ROOT\ace\config.h and it
will turn off some WinNT/Win2K-specific code in ACE.<BR>
<BR>
<li>If you want to use the standard C++ headers (iostream, cstdio, ...
as defined by the C++ Standard Draft 2) that comes with MSVC,
then add the line: <BR>
<BR>
<CODE>#define ACE_HAS_STANDARD_CPP_LIBRARY 1</CODE><BR>
<BR>
before the #include statement in ACE_ROOT\ace\config.h.<BR>
<br>
<li>To use ACE with MFC libraries, also add the following to
your <code>config.h</code> file. Notice that if you want to
spawn a new thread with CWinThread, make sure you spawn the
thread with THR_USE_AFX flag set.<br>
<br>
<code>#define ACE_HAS_MFC 1</code><br>
<br>
By default, all of the ACE projects use the DLL versions of the
MSVC run-time libraries. You can still choose use the static (LIB)
versions of ACE libraries regardless of run-time libraries. The
reason we chose to link only the dynamic run-time library is that
almost every NT box has these library installed and to save disk
space. If you prefer to link MFC as a static library into ACE, you
can do this by defining <code>ACE_USES_STATIC_MFC</code> in your
<code>config.h</code> file. However, if you would like to link
everything (including the MSVC run-time libraries) statically,
you'll need to modify the project files in ACE yourself.<p>
<li>Static version of ACE libraries are build with
<code>ACE_AS_STATIC_LIBS</code><br> defined. This macro should
also be used in application projects that link to static ACE
libraries<BR>
<BR>
Optionally you can also add the line <BR>
<BR>
<CODE>#define ACE_NO_INLINE</CODE><BR>
<BR>
before the #include statement in ACE_ROOT\ace\config.h to disable
inline function and reduce the size of static libraries (and your
executables.)<BR>
<BR>
<li>ACE DLL and LIB naming scheme:<br>
<br>
We use the following rules to name the DLL and LIB files in ACE
when using MSVC.<br>
<br>
"Library/DLL name" + (Is static library ? "s" :
"") + (Is Debugging enable ? "d" : "")
+ {".dll"|".lib"}<br>
<br>
</Ol>
<P>More information for ACE/TAO on MSVC can be found
<A HREF="docs/msvc_notes.txt">here</A>. The doxygen version of this
document is available under Related Topics in the ACE Library.</P>
<B>ACE TESTS</B><P>
The tests are located in ACE_ROOT\tests. There is also a workspace in
that directory to build all the tests (tests.dsw)<P>
Once you build all the tests (Batch Build works well for this), you
can run perl script <code>run_test.pl</code> or the the batch file <a
href="tests/run_tests.bat"><code>run_tests.bat</code></a> in the
<code>tests</code> directory to try all the tests.<p>
<A NAME="win32nonic">
<B> BUILDING ACE ON A WIN32 MACHINE THAT LACKS A NETWORK CARD </B><P>
You may want to run ACE on a non-networked machine. To do so, you must
install TCP/IP and configure it to ignore the absence of a network
card. This is one method:<P>
<OL>
<LI>Run Control Panel
<LI>Choose Network from Control Panel
<LI>Add Adapter: MS Loopback Adapter
<LI>Configure MS Loopback Adapter with 802.3 (default)
<LI>Add Protocol: TCP/IP Protocol
<LI>Configure TCP/IP Protocol with a valid IP address and subnet mask.
Leave everything else at the default settings.
<LI>Add Service: Workstation
<LI>Exit and Restart System
<LI>Run Control Panel again
<LI>Choose Services from Control Panel
<LI>The following services are not necessary and may
be set to Disabled Startup: <BR>
Alerter<BR>
Computer Browser<BR>
Net logon<BR>
Messanger<BR>
<LI>Choose Network from Control Panel
<LI>Confirm the following setup. This is all you need to run ACE:<BR>
Installed Software:<BR>
Computer Browser<BR>
MS Loopback Adapter Driver<BR>
TCP/IP Protocol<BR>
Workstation<BR>
Installed Adapter Cards:<BR>
MS Loopback Adapter<P>
</OL>
<B>WIN32 ALPHA CONFIGURATIONS</B>
<P>The project files for Visual C++ no longer contain any configurations
targetted to Windows NT on the DEC Alpha. Below are the steps needed to
recreate the Alpha configurations:</P>
<OL>
<LI>Load the project on the Alpha machine.
<LI>Go to the Build menu and then select Configurations.
<LI>Select the project that you want to convert.
<LI>Click on Add.
<LI>Select the x86 configuration to "Copy settings from"
(either Debug or Release versions).
<LI>Prepend "Alpha " to the beginning of the name under
"Configuration".
<LI>Click OK.
<LI>Close the "Configurations" window.
<LI>Now go to the Project settings.
<LI>For the General Settings, change the output directories to standard ACE
output directories. Intermediate Directories are "Debug" and
"Release" in most cases. The Output Directories are blank,
except for Release versions of executables, in which it is also
"Release".
<LI>For the C/C++ Settings, make sure that the Code Generation's runtime
library is set to "Multithreaded DLL" or "Debug Multithreaded
DLL".
</OL>
<P><B>Note:</B> MSVC 6 has a bug where if a .dsp is converted from version 5 to 6 on
x86, the Alpha configuration can get corrupted. This seems to happen when additional
include or library directories are specified using backslashes instead of forward
slashes. If this occurs, the easiest way to fix it is to recreate it.</P>
<P><hr align=left width="50%"><P>
<H4><A NAME="mingw">Building and Installing ACE on Win32 with Mingw</A></H4>
<p>
If you are building for a machine without a network card, you may want
to check <A HREF="#win32nonic">here</A> first.
<p>
Building and installing ACE on <A HREF="http://www.mingw.org">Mingw</A>
uses a mix of a <A HREF="#unix">UNIX</A> building process and
<A HREF="#win32">Win32</A> configuration files.
Also, as Mingw uses GNU g++, you may want to take
a look at the <A HREF="#g++">Compiling ACE with GNU g++</A> section.
<p>
You will need the Mingw build tools and libraries, downloable from
<A HREF="http://www.mingw.org"><TT>http://www.mingw.org</TT></A>.
For our build we required the following packages:
<A NAME="mingwpacks">
<blockquote>
<B><TT>gcc, binutils, ld, libbfd, mingw-runtime, w32api</TT></B>.
</blockquote>
<p>
You will also need GNU make for Win32 and the set of UNIX tools that
the ACE UNIX build system uses (this include but is not limited to
<TT><B>sh, rm, cp</B></TT>).
For this purpose you can grab the
<A HREF="http://cygwin.com/setup.exe">cygwin</A>
distribution from
<A HREF="http://cygwin.com"><TT>http://cygwin.com</TT></A>.
<p>
Be careful, because cygwin includes it's own version of the compiler
and build tools, you will need to have the Mingw build tools before
the cygwin set on you PATH environment variable (more on this later).
The steps we followed in the build are:
<OL>
<LI> Install cygwin (this can be easy downloading and running
<A HREF="http://cygwin.com/setup.exe"><tt>setup.exe</tt></A>
from the cygwin site).
<BR><BR>
<LI> Install the Mingw tools. Download all the needed packages (see
<A HREF="#mingwpacks">above</A>) and
unpack them on the same base directory, say c:/mingw32.
If some of the packages are distributed on
<TT>.tar.gz</TT> format, you may need to use
the cygwin version of the <TT><B>tar</B></TT> utility.
<BR><BR>
<LI> Open a cygwin shell. Set your <TT>PATH</TT> environment variable so
your Mingw's <TT>bin</TT> directory is first:
<blockquote><code><pre>
% export PATH=//c/mingw32/bin:$PATH
</pre></code></blockquote>
<p>
Note cygwin uses ``<TT>/</TT>'' as directory separator,
and ``<TT>//X</TT>'' as a notation for Win32 drive <TT>X</TT>.
Note also that you <EM>can't</EM> use ``<TT>c:/mingw32/bin</TT>''
because, for cygwin,
``<TT>:</TT>'' is path separator character, as in UNIX.
<BR><BR>
<LI> Add an <TT>ACE_ROOT</TT> environment variable pointing to the
root of your ACE wrappers source tree:
<blockquote><code><pre>
% export ACE_ROOT=c:/work/mingw/ACE_wrappers
</pre></code></blockquote>
<p>
Note here you <EM>can't</EM> use the ``<TT>//X</TT>'' cygwin
notation as this is seen by Mingw's compiler and it doesn't
support that (it <EM>does</EM> support ``<TT>/</TT>'' as directory
separator however).
<p>
From now on, we will refer to the root directory of the ACE
source tree as <TT>$ACE_ROOT</TT>.
<BR><BR>
<LI> Add a <TT>MINGW_BASE</TT> environment variable pointing to the
root of your Mingw instalation. Following the above example,
set:
<blockquote><code><pre>
% export MINGW_BASE=c:/mingw32
</pre></code></blockquote>
Again, use Mingw syntax and not cygwin syntax for the directory
specification.
<BR><BR>
<LI> Create a file called <TT>config.h</TT> in the
<TT>$ACE_ROOT/ace</TT> directory that contains:
<blockquote><code><pre>
#include "ace/config-win32.h"
</pre></code></blockquote>
If you are building for Windows 9X/Me (ie, <EM>not</EM> WinNT or
Win2K), you will need to add:
<blockquote><code><pre>
#define ACE_HAS_WINNT4 0
</pre></code></blockquote>
before the <CODE>#include</CODE> line.
Also, if you don't have Winsock 2 (check the <TT>SYSTEM</TT>
and/or <TT>SYSTEM32</TT> subdirectories of the windows
instalation directory for <TT><B>ws2_32.dll</B></TT>), you
will need
<blockquote><code><pre>
#define ACE_HAS_WINSOCK2 0
</pre></code></blockquote>
before the <TT>#include</TT> line. On NT 4, Windows 98 and
later versions, you surely have Winsock 2. In Windows 95,
including OSR2, you may don't have it if it wasn't specially
installed. You may download it from the <A
HREF="http://www.microsoft.com">microsoft</A> site. This is
recommended as much ACE functionality depends on Winsock 2, and
ACE without Winsock 2 support is tested very infrequently.
<BR><BR>
<LI> Create a file called <TT>platform_macros.GNU</TT> in the
<TT>$ACE_ROOT/include/makeinclude</TT> directory containing:
<blockquote><code><pre>
include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
</pre></code></blockquote>
In the above text, don't replace <TT>$(ACE_ROOT)</TT> with the
actual directory, GNU make will take the value from the
environment variable you defined previously.
If you lack Winsock 2, add the line
<blockquote><code><pre>
winsock2 = 0
</pre></code></blockquote>
before the previous one.
<BR><BR>
<LI> On the cygwin shell, change to the $ACE_ROOT/ace directory and
run make:
<blockquote><code><pre>
% cd $ACE_ROOT/ace
% make
</pre></code></blockquote>
<p>
This should create <TT>libACE.dll</TT> (the Win32 shared library) and
<TT>libACE.dll.a</TT> (the Win32 import library for the DLL).
Note the name for the ACE DLL on Mingw follows the Mingw
convention, that resembles UNIX.
<BR><BR>
<p>
If you want static libs also, you may run:
<blockquote><code><pre>
% make static_libs=1
</pre></code></blockquote>
<LI> <A NAME="mingwrunpath">
The same rules for Win32 search of DLLs apply for Mingw. If you
want to run some ACE programs from the cygwin shell, you may
need to add the directory for <TT>libACE.dll</TT> to your PATH:
<blockquote><code><pre>
# export PATH=//c/work/mingw/ACE_wrappers/ace:$PATH
</pre></code></blockquote>
</OL>
<B>ACE TESTS</B><P>
The tests are located in <TT>$ACE_ROOT/tests</TT>.
After building the library, you can change to that directory and run
make:
<blockquote><code><pre>
% cd $ACE_ROOT/tests
% make
</pre></code></blockquote>
<p>
Once you build all the tests, you can run
<code>run_tests.sh</code> in the
<code>tests</code> directory to try all the tests:
<blockquote><code><pre>
% run_tests.sh
</pre></code></blockquote>
<p>
If you are using ACE as a DLL, you will need to modify your PATH
variable as explained <A HREF="#mingwrunpath">above</A>.
<p>
You may want to check <tt>$ACE_ROOT/tests/README</tt> for the status
of the various tests on Mingw and the different Windows flavors.
<P><hr align=left width="50%"><P>
<H4><A NAME="vxworks">Building and Installing ACE on VxWorks</A></H4>
For the most part, you should be able to follow the instructions above
to build ACE and applications that use it. Start with the
<a href="#unix">Unix instructions</a> above to build ACE and the
applications that use it. Please see below for more information on
<a href="#VxWorks/NT">building ACE on NT hosts for VxWorks targets</a>.<P>
A few notes on VxWorks builds (thanks to
<a href="mailto:Paul_von_Behren@stortek.com">Paul von Behren</a>
for these notes):<p>
<UL>
<LI>VxWorks builds are done with a cross compiler, i.e., the compiles
are done on a workstation creating object modules which are
downloaded and loaded into the VxWorks target system.<p>
<LI>C++ object modules must be post-processed by a VxWorks
utility called "munch." ACE includes a perl script called
<A
HREF="bin/ace_ld">$ACE_ROOT/bin/ace_ld</A>,
which is called from the Makefiles, replacing
the traditional <code>ld</code> step. You must have perl installed
to use <code>ace_ld</code>. If perl is not on your path, you'll
have to set <code>PERL_PATH</code> to the full path (including
perl.exe), either in your
<code>$(ACE_ROOT)/include/makeinclude/platform_macros.GNU</code>
or in your environment.<P>
<LI>Wind River provides GCC/G++ cross-compilers for the
supported target platforms. The executables are named cc<target>
and g++<target>; for example, ccppc and g++cpp for PowerPC
targets.<p>
</UL>
You'll have to let ACE know the target type at compile time. There
are several ways to do this; please see the
<code>$ACE_ROOT/include/makeinclude/platform_vxworks5.x_g++.GNU</code>
platform file for detailed information.<P>
The VxWorks platform_vxworks*.GNU files are set up so that shared
libraries are not built on VxWorks, by default. Only static
libraries, with .a extension, are built. Therefore, it's not
necessary to set the LD_LIBRARY_PATH environment variable on your host
system when building for VxWorks targets. Please note, however, if
you use TAO on VxWorks that you will need to set your LD_LIBRARY_PATH
to find the TAO IDL compiler libraries (installed in the ace
directory) on the host.<P>
With g++, $ACE_ROOT/bin/ace_ld is used to munch object files and
libraries to set up calls to static constructors and destructors.
bin/ace_ld requires perl on the host platform.<P>
These non-default VxWorks kernel configuration <code>#defines</code>
are required with ACE:<P>
<pre>
#define INCLUDE_CPLUS /* include C++ support */
#define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
#define INCLUDE_POSIX_ALL /* include all available POSIX functions */
</pre>
For completeness, here are the non-default <code>#defines</code> that
we used for VxWorks 5.3.1/g++ 2.7.2:
<pre>
#define INCLUDE_CPLUS /* include C++ support */
#define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
#define INCLUDE_CONFIGURATION_5_2 /* pre-tornado tools */
#define INCLUDE_DEBUG /* pre-tornado debugging */
#define INCLUDE_LOADER /* object module loading */
#define INCLUDE_NET_SYM_TBL /* load symbol table from network */
#define INCLUDE_SYM_TBL_SYNC /* synchronize host and target symbol tables */
#define INCLUDE_NFS /* nfs package */
#define INCLUDE_PING /* ping() utility */
#define INCLUDE_POSIX_ALL /* include all available POSIX functions */
#define INCLUDE_RDB /* remote debugging package */
#define INCLUDE_RLOGIN /* remote login */
#define INCLUDE_RPC /* rpc package */
#define INCLUDE_SECURITY /* shell security for network access */
#define INCLUDE_SHELL /* interactive c-expression interpreter */
#define INCLUDE_SHOW_ROUTINES /* show routines for system facilities*/
#define INCLUDE_SPY /* spyLib for task monitoring */
#define INCLUDE_STARTUP_SCRIPT /* execute start-up script */
#define INCLUDE_STAT_SYM_TBL /* create user-readable error status */
#define INCLUDE_SYM_TBL /* symbol table package */
#define INCLUDE_UNLOADER /* object module unloading */
#define INCLUDE_WINDVIEW /* WindView command server */
</pre>
Also, automatic construction/destruction of static objects
should be enabled.<p>
If you use TAO, it's also a good idea to increase the
<code>NUM_FILES</code> parameter from its default of 50 to,
say, 1000.<p>
Please note that those VxWorks kernel configuration parameters
are set in the VxWorks configAll.h file. You must rebuild your
VxWorks kernel after modifying that file.<p>
If you're first getting started with ACE and/or VxWorks, I recommend
just building the ACE library and tests first. (Some of the ACE
examples, in System_V_IPC, don't build on VxWorks yet.) Then try
running the tests. Please see $ACE_ROOT/tests/README for the latest
status of the ACE tests on VxWorks.<P>
Please note that the <code>main</code> entry point is renamed to
<code>ace_main</code> (configurable via ACE_MAIN) on VxWorks with g++,
to comply with its restriction against using <code>main</code>.
In addition, ACE_HAS_NONSTATIC_OBJECT_MANAGER is enabled by default
to cleanly support construction and destruction of static objects.
Please see the <A HREF="#Non-static Object Manager">Non-static
ACE_Object_Manager</A> discussion for the important implication
of this feature.<p>
ACE threads (VxWorks tasks) can be named, for example, by supplying a
non-null argument to the Thread_Manager spawn routines. However,
names beginning with <code>"==ace_t=="</code> are forbidden because
that prefix is used internally by ACE.<p>
You can spawn a new task to run <code>ace_main</code>, using either
VxWorks <code>sp</code>, or ACE'S <A NAME="spa"><code>spa</code></A>.
<code>spa</code> can be used from the VxWorks shell to pass arguments
to <code>ace_main</code>. Its usage is:
<pre><code>
spa ace_main, "arg1" [, ...]
</code></pre>
All arguments must be quoted, even numbers.<p>
The ACE <a href="tests/">tests</a> write their output files in a
directory named <code>log/</code>, below the current
(<code>tests</code>) directory. If you don't have NFS included in
your VxWorks kernel, you can use these steps, provided by
<a href="mailto:clarence_m_weaver@md.northgrum.com">Clarence M. Weaver</a>,
to run the tests and capture their output:<p>
<ol>
<li>What I did was create a log directory on the boot NT host of my vxworks
target.<p>
<li>I copied all the test applications and the run_tests.vxworks script to
the parent of the log directory.<p>
<li>Using the target shell not the host shell, I "cd" to the directory
containing the script and test programs.<p>
<li>Invoked the script < run_tests.vxworks from this target shell.<p>
</ol>
<a href="mailto:Kirk.Davies@pobox.com">Kirk Davies</a> provided this
approach for running the ACE tests on Tornado II:
<ul>
<li>Under Tornado II, I set up the Target Server File System (TSFS), and
the test logs get written to the log subdirectory under that.<p>
<li>You have to set an environment variable before running the tests:
<pre>
putenv("ACE_TEST_DIR=/tgtsvr")
</pre><p>
</ul>
<h5><a name="VxWorks/SharedLibs">Building Shared Libraries for VxWorks</a>.</h5>
ACE supports shared libraries for VxWorks, but only with the g++
compiler. To build shared libraries instead of the default static
libraries, added <code>shared_libs=1</code> (<strong>not</strong>
<code>shared_libs_only=1</code>) to either your
<code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code> or
your <code>make</code> invocation. Then, be sure to load the ACE (and
any other) shared library before loading your executable(s).<p>
A shared library for VxWorks uses the same code as for a static
(non-shared) library. However, calls to static constructors/
destructors are added. The code in the shared library <strong>must</strong>
be reentrant if you shared it between programs (tasks). The
ACE library meets this requirement.<p>
Shared libraries reduce build time, executable size, and load
time of the executable. But, you must manually load the shared
library before loading your executable(s) with a command such as:
<pre><code>
-> ld < libACE.so
</code></pre>
Shared libraries can be unloaded the same way an executable
(module) is unloaded.<p>
<strong>NOTE</strong>: Shared libraries on VxWorks aren't the same as
shared libraries on other operating systems. In particular, there is
no support for creating copies of writeable global (static) data in
the shared library. This includes the singleton ACE_Object_Manager
instance pointer. If you share global data between separate programs,
they may not work properly. See the discussion of shared code and
reentrancy in the VxWorks' <em>Programmers Guide</em>.<p>
Instead of trying to run separate programs onto a VxWorks target, we
recommend creating just one program, and spawning a thread for each
task. The TAO IDL_Cubit test <a
href="TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp">collocation
test</a> is a good example.<p>
<h5><a name="VxWorks/LinkToKernel">Linking ACE and/or TAO Libraries into the VxWorks Kernel</a>.</h5>
It's easy to link your ACE and/or TAO libraries into the VxWorks kernel.
Just build <a href="#VxWorks/SharedLibs">shared versions</a>, but
disable the munch step. The easiest way to do that is to set the
<code>LD</code> make variable to the name of your linker. For
example, to build a libACE.so for PowerPC that can be linked into
the kernel:
<pre>
% cd $ACE_ROOT/ace
% make LD=ldppc shared_libs=1
</pre>
After building the shared lib, link it into the kernel by setting
the <code>MACH_EXTRA</code> make variable in the kernel configuration
Makefile. Then, build the kernel using <code>make exe</code>.<p>
<h5><a name="VxWorks/NT">Building ACE on Tornado/NT hosts for VxWorks targets</a>.</h5>
The following, very useful information was contributed by
<a href="http://people.qualcomm.com/cryan">Chris Ryan</a>
and <a href="mailto:Paul_von_Behren@stortek.com">Paul von Behren</a>.
Please submit corrections, additions, or clarifications to the
the <a href="mailto:ace-users@cs.wustl.edu">ACE mailing list</a>.<p>
<strong>NOTE:</strong>The make (version 3.74) that is provided with
Tornado II cannot be used to build ACE. Use Cygnus' make (version 3.75)
instead.)<p>
<strong>NOTE:</strong>Optimization is enabled be default in
<a href=include/makeinclude/platform_vxworks5.x_g++.GNU>platform_vxworks5.x_g++.GNU</a>. However, the compiler that is shipped with Tornado II has
trouble compiling some files with -O2. To disable optimization
for an individual file, just add <code>optimize=0</code> to your
make invocation when compiling that file.<p>
Using the Cygnus tools, this approach works:
<ul>
<li>You'll build both your NT and VxWorks executables in the same
workspace (directory hierarchy). This works because the NT
compiler and ACE's Makefiles put their output in different
directories.<p>
<li>Set up your
<code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code>
as usual for VxWorks. See
<a href="include/makeinclude/platform_vxworks5.x_g++.GNU">the
g++/VxWorks platform file</a> for more information.<p>
<li>Create an <code>ACE_wrappers/ace/config.h</code> file that looks
something like the following. tao_idl should be built to not support
native exception handling, because that's not available on VxWorks.
<pre>
#if defined (_MSC_VER) || defined (__BORLANDC__)
# include "ace/config-win32.h"
# undef ACE_HAS_EXCEPTIONS
#else
# include "ace/config-vxworks.h"
#endif
</pre><p>
<li>Set your <code>ACE_ROOT</code>, <code>CPP_LOCATION</code>,
<code>WIND_BASE</code>, and <code>WIND_HOST_TYPE</code> environment
variables.<p>
<li>Build for NT, then build for VxWorks.<p>
</ul>
A few additional Windows Notes, from Paul von Behren:<p>
<ul>
<li>Cygnus has created a Win32 API which is compatible with a
"generic" Unix environment. Using this library, they have ported a
large collection of GNU tools to WinNT/95 - including a port of
gcc/g++. See <A href="http://www.cygnus.com/misc/gnu-win32/">http://www.cygnus.com/misc/gnu-win32/</A>
A related link is <a href="ftp://ftp.cygnus.com/pub/gnu-win32/latest/">ftp://ftp.cygnus.com/pub/gnu-win32/latest/</a><p>
<li>To set up the command-prompt build environemnt, run
<code>Tornado\host\x86-win32\bin\TorVars.bat</code>. This is done
implicitly within the Tornado IDE.<p>
<li>To run <code>ace_ld</code>, you still need perl installed -
see <A href="http://www.activestate.com/software/default.htm">http://www.activestate.com/software/default.htm</A>
for Windows perl.<p>
<li>The Tornado IDE will use a standard Makefile for project
builds, but does not have a GUI interface for managing the
Makefile. By default, it will use rules from Makefile in the current
directory and you can configure it to add certain Makefile
targets to the project. If you have <code>ACE_ROOT</code> defined
before starting Tornado, you can specify an ACE Makefile as a Tornado
target and Tornado will then call make from the menu.<p>
</ul>
And Chris Ryan's instructions for building for VxWorks targets
on Windows NT hosts:
<ol>
<li>Path setting that seems to be working is:<p>
<pre>
/tornado/host/x86-win32/bin:
/tornado/host/x86-win32/lib/gcc-lib/i386-wrs-vxworks/cygnus-2.7.2-960126:
/tornado/host/x86-win32/i386-wrs-vxworks/bin:
/ace/ace_wrappers/bin:
/gnuwin32/b18/H-i386-cygwin32/bin:
/gnuwin32/b18/tcl/bin:
/WINNT/system32:
/WINNT:
/WINNT/system32/nls/ENGLISH:
/bin
</pre>
Other environment variables:<p>
<pre>
WIND_BASE=/tornado
SHELL=/bin/sh.exe
TERM=pcbios
TAO_ROOT=/ace/ACE_wrappers.vxworks/TAO
CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.EXE
GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/
WIND_HOST_TYPE=x86-win32
ACE_ROOT=/ace/ACE_wrappers.vxworks
</pre>
<li><code>/tornado</code> is the root of the Tornado install
(<code>$WIND_BASE</code>).
<li><code>/gnuwin32</code> is the root of a Cygnus GNU download and install.
<li><code>/bin</code> content is:<p>
<pre>
aced.dll
cygwin.dll
perl.exe
rm.exe
sh.exe
true
</pre>
<code>aced.dll</code> is produced in an ACE NT source tree according to
documented procedure for NT VC++5.0 ACE build.
<code>cygwin.dll</code> is from the Cygnus GNU software download and install.
<li>Basically, follow documented procedure for ACE build/install on UNIX
platform. Create a <code>$ACE_ROOT/ace/config.h</code> that looks
like:<p>
<pre>
#include "config-vxworks5.x.h"
</pre>
And create a
<code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code>
that looks like:<p>
<pre>
WIND_BASE = /tornado
WIND_HOST_TYPE = x86-win32
CPU = I80486
include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.x_g++.GNU
</pre>
<LI>When using cygnus windows GNUTools on WinNT you have to start
make with "--unix" option, otherwise WinNT shell cmd.exe is responded and
not sh.exe, i.e.,
<PRE>
make --unix static_libs=1
</PRE>
</ol>
<h5>TAO on NT Tornado host, VxWorks target.</h5>
<ol>
<li>Build ACE and TAO_IDL in the NT tree as already documented. As
mentioned above, I put <code>aced.dll</code> in <code>/bin</code>.
Be sure to build ACE's gperf on NT, in
<code>ACE_wrappers/apps/gperf/src</code>.<p>
<li>Build $TAO_ROOT/tao
<pre>
CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
cd $TAO_ROOT/tao
/gnuwin32/b18/H-i386-cygwin32/bin/make
</pre>
<li>Build orbsvcs.
<pre>
CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
cd $TAO_ROOT/orbsvcs/orbsvcs
/gnuwin32/b18/H-i386-cygwin32/bin/make
</pre>
<li>Build $TAO_ROOT/tests<p>
</ol>
<H4><A NAME="vxworks"> </a>
<a href="mailto:Jaffar_Shaikh@Mitel.COM">Jaffar Shaikh's</a>
Notes for Building ACE and TAO for VxWorks on NT host</H4>
<B><P>Scenario:</B> I was building the ACE and TAO for VxWorks =
on NT. The target system was a PPC860 based chassis and another a NT =
host based card.</P>
<B><P>Host System:</P>
</B><P>NT 4.0 workstation with 128 M RAM, 266MHz Pentium.</P>
<B><P>Software Needed For Building TAO</P>
</B><P>1) PERL: Active State's ActivePerl 5.6.0.618 for NT available as =
freeware from =
http://www.ActiveState.com/download/contrib/Microsoft/NT/InstMsi.exe =
</P>
<P>2) Tornado II .Release V 9904 from Windriver.</P>
<P>3) Cygwin GNU to build TAO. It is available for NT as a freeware =
from </P>
<P>http://sources.redhat.com/cygwin/</P>
<P>The Cygwin Make (version 3.75) can only build the TAO not the =
Tornado II make (version 3.74)</P>
<B><P>Environment Variables:</P>
</B><P>On NT the environment Variables are set as follows, (from =
Control Panel-> System -> Environment)</P>
<P>I added following Environment variable entries to PATH </P>
<P>C:\Perl\bin\;</P>
<P>C:\tornado\host\x86-win32\bin;</P>
<P>C:\tornado\host\x86-win32\powerpc-wrs-vxworks\bin;</P>
<P>C:\tornado\host\x86-win32\lib\gcc-lib\powerpc-wrs-vxworks\cygnus-2.7.=
2-960126;</P>
<P>C:\Corba\Ace_wrappers\bin;</P>
<P>C:\Cygwin\bin;</P>
<P>C:\Cygwin\usr\bin;</P>
<P>C:\bin</P>
<P>Additional Environmental variables and the values,</P>
<P>CPU=PPC860</P>
<P>LD_LIBRARY_PATH=</P>
<P>SHELL=/bin/sh.exe</P>
<P>ACE_ROOT=/Corba/ACE_wrappers</P>
<P>WIND_BASE=/tornado</P>
<P>SHELL=/bin/sh.exe</P>
<P>TERM=pcbios</P>
<P>TAO_ROOT=/Corba/ACE_wrapper/Tao</P>
<P>CPP_LOCATION=/Program Files/Microsoft Visual =
Studio/VC98/Bin/CL.exe</P>
<P>GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/</P>
<P>WIND_HOST_TYPE=x86-win32</P>
<P>PERL_PATH=/perl/bin/perl.exe</P>
<B><P>Directories of importance</P>
</B><P>C:\Corba 	<-- Ace_wrappers (uzipped)</P>
<P>C:\tornado 	<-- Tornado installed</P>
<P>C:\Perl 	<-- Perl installed</P>
<P>C:\Cygwin 	<-- Cygwin installed</P>
<P>C:\bin <-- Copy these files,</P>
<P>		 Ace.dll, 	<-- After you build Ace</P>
<P>		gperf.exe 	<-- After you build gperf</P>
<P>		Cygwin1.dll, 	<-- After you install Cygwin</P>
<P>		perl.exe, 	<-- After you install Perl</P>
<P>		rm.exe		<-- After you install Cygwin</P>
<P>		sh.exe		<-- After you install Cygwin</P>
<P>		true		<-- After you install Cygwin</P>
<B><P>Create Files</P>
</B><P>1) C:\Corba\ACE_Wrappers\ace\config.h</P>
<P>with entry</P>
<P>#if defined (_MSC_VER) || (__BORLANDC__)</P>
<P>	#include "ace/config-win32.h"</P>
<P>	#undef ACE_HAS_EXCEPTIONS</P>
<P>#else</P>
<P>	#include "ace/config-vxworks5.x.h"</P>
<P>	#define ACE_HAS_IP_MULTICAST </P>
<P>#endif</P>
<P>2) C:\Corba\ACE_wrappers\include\makeinclude\platform_macros.GNU</P>
<P>WIND_BASE = /tornado</P>
<P>WIND_HOST_TYPE = x86-win32</P>
<P>include =
$(ACE_ROOT)/include/makeinclude/platform_vxworks5.x_g++.GNU</P>
<P>ACE_COMPONENTS=FOR_TAO (you may choose this option to build ACE =
library that supports TAO)</P>
<P> </P>
<B><P>Steps to Build</P>
</B><P>1) Build Ace.dll under NT</P>
<P>In MS Visual C++ open C:\Corba\ACE_wrappers\ace.dsw And build Ace =
DLL</P>
<P>Copy Ace.dll in C:\bin</P>
<P>2) Build gperf utility under NT</P>
<P>In MS Visual C++ open =
C:\Corba\ACE_wrappers\apps\gperf\src\gperf.dsw. Build gperf.exe</P>
<P>Copy gperf.exe to C:\bin</P>
<P>3) Mount Directries in Cygwin</P>
<P>Click on Cygnus Solutions -> Cygwin Bash Shell</P>
<P>Mount following directories by using mount command.</P>
<P>create respective directories first then use mount command </P>
<P>e.g. Create /Corba directory then use $mount -s "C:\Corba" =
/Corba</P>
<P>C:\Corba mount to /Corba</P>
<P>C:\tornado mount to /tornado</P>
<P>C:\Perl mount to /perl</P>
<P>C:\Cygwin mount to /cygwin</P>
<P>C:\bin mount to /bin</P>
<P>C:\Program Files mount to /Program Files </P>
<P>4) Build ACE in Cygwin</P>
<P>$cd /Corba/ACE_wrappers/ace </P>
<P>$make static_libs=1</P>
<P>This will build your ace library libACE.a for VxWorks. If you use =
option shared_libs=1 then the build will be libACE.so. The other =
options are same as follows.</P>
<P>5) Build TAO in Cygwin</P>
<P>$cd $TAO_ROOT/tao</P>
<P>$make debug=0 optimize=1 static_libs_only=1 minimum_orb=1 =
</P>
<P>for shared libs use shared_libs=1</P>
<P>The minimum Tao does not have following components,</P>
<P>Dynamic Skeleton Interface</P>
<P>Dynamic Invocation Interface</P>
<P>Dynamic Any</P>
<P>Interceptors</P>
<P>Interface Repository</P>
<P>Advanced POA features</P>
<P>CORBA/COM interworking</P>
<P>You may play around with above options to find suitable build for =
your needs. For example when you give option debug=1 all the debug =
symbols will be created and the build will huge in size. The debug =
symbols are necessary when you want to debug your code.</P>
<HR>
<H3><A NAME="svcsinstall">Building and Installing ACE Network Services</A></H3>
The following explains how to build the ACE <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE-netsvcs.html">network services</A> on <A
HREF="#unixsvcs">UNIX</A> and <A HREF="#win32svcs">Win32</A>.
<P><hr align=left width="50%"><P>
<H4><A NAME="unixsvcs">Building and Installing ACE Network Services on UNIX</A></H4>
Building and installing ACE Network Services on UNIX is relatively
simple (the <A HREF="#win32svcs">process</A> for Win32 is different).
Here's what you need to do:<P>
<OL>
<LI>Build and install ACE on UNIX as described <A
HREF="#unix">earlier</A>. If ACE is built at the root of the ACE
source tree (and ACE has been ported to your platform, of course) the
netsvcs static and shared object libraries should be built
automatically. In addition, the server driver program
(<CODE>main</CODE>) contained in <A
HREF="netsvcs/servers/main.cpp">$ACE_ROOT/netsvcs/servers/main.cpp</A>
should also be compiled and ready to run.<P>
<LI>Set your LD_LIBRARY_PATH environment variable to where the binary
version of the ACE netsvcs library. For example, you probably
want to do something like the following<P>
<pre><code>
% setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$LD_LIBRARY_PATH
</code></pre><P>
<LI>By default, if the shared object library is built, the services
are linked into the <CODE>main</CODE> driver program dynamically.
To specify which services should be linked in and executed, edit the
<A
HREF="netsvcs/servers/svc.conf">$ACE_ROOT/netsvcs/servers/svc.conf</A>
file. During your editing, you should update information (such as the
default service port numbers) that affects the initialization of
services in this file. Refer to the
<A HREF="ACE-papers.html#config">Service Configurator</A>
documentation to learn how the configuration file is parsed and
how the services are dynamically linked and executed. In
addition, refer to the <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE-netsvcs.html">Network
Services</A> documentation to learn more about how to configure
each network service.<P>
<LI>If you only want to link the services statically, simply remove
or rename the svc.conf file.<P>
</OL>
<P><hr align=left width="50%"><P>
<H4><A NAME="rtems">Building and Installing ACE on RTEMS</A></H4>
<PRE>
export RTEMS_MAKEFILE_PATH=/opt/rtems/CPU-rtems/BSP
# setup the build structure
cd ACE_wrappers
# create the host (e.g. Linux in this case) build tree
./bin/create_ace_build Linux_g++
cd build/Linux_g++/ace
ln -s ../../../ace/config-linux.h config.h
cd ../include/makeinclude
ln -s ../../../../include/makeinclude/platform_linux.GNU platform_macros.GNU
cd ../../../..
# create the target build tree
./bin/create_ace_build rtems
cd build/rtems/TAO
/bin/rm -r TAO_IDL
ln -s ../../Linux_g++/TAO/TAO_IDL .
cd ../ace
ln -s ../../../ace/config-rtems.h config.h
cd ../include/makeinclude
ln -s ../../../../include/makeinclude/platform_rtems.x_g++.GNU platform_macros.GNU
cd ../../../..
# build the host side of things
cd build/Linux_g++
export ACE_ROOT=`pwd`; export LD_LIBRARY_PATH=`pwd`/ace:$LD_LIBRARY_PATH
cd ace
make
# optionally build the ACE tests
cd ../tests
make
cd ../TAO
make
# build the target side of things
cd ../rtems
export ACE_ROOT=`pwd`
cd ace
make
cd ../tests
# build rtems_init.o by hand
make -f ../include/makeinclude/Makefile.rtems rtems_init.o
make
cd ../TAO
make
</PRE>
<P><hr align=left width="50%"><P>
<H4><A NAME="win32svcs">Building and Installing ACE Network Services on Win32</A></H4>
Once again, there are supplied project for MSVC 5.0 or later for
the Network Services.<P>
<HR>
<H3><A NAME="sslinstall">Building and Installing The ACE_SSL Library</A></H3>
<p>The first step for all platforms is to build and install the
<A HREF="http://www.openssl.org/">OpenSSL</A> distribution. Then the
ACE_SSL library must be built according to the instructions
below.</p>
<h3>Unix</h3>
<OL>
<LI>Make sure the OpenSSL header file directory is in your compiler's
include path, and that OpenSSL libraries are in your library link/load
path (e.g.
<font face="Courier New, Courier, mono">LD_LIBRARY_PATH</font>). If you
installed OpenSSL into a set of directories unknown by the compiler,
then set the following variables in your
<font face="Courier New, Courier, mono">platform_macros.GNU</font>
file:
<P><table width="75%" border="0" align="center">
<tr>
<td><font face="Courier New, Courier, mono">PLATFORM_SSL_CPPFLAGS</font></td>
<td>Platform preprocessor options for OpenSSL (e.g. -I...)</td>
</tr>
<tr>
<td><font face="Courier New, Courier, mono">PLATFORM_SSL_LDFLAGS</font></td>
<td>Platform linker options for OpenSSL (e.g. -L...)</td>
</tr>
<tr>
<td><font face="Courier New, Courier, mono">PLATFORM_SSL_LIBS</font></td>
<td>Platform libraries required with OpenSSL (e.g. -lssl -lcrypto)</td>
</tr>
</table>
<br>
</LI>
<LI>Build ACE as described above. When building ACE, add
"<font face="Courier New, Courier, mono">ssl=1</font>"
to your <font face="Courier New, Courier, mono">make</font>
command line invocation, or add it to your
<font face="Courier New, Courier, mono">platform_macros.GNU</font>
file.</LI>
<li>Build the ACE_SSL library in the <TT>$ACE_ROOT/ace/SSL</TT>
directory. The <TT>ACE_ROOT</TT> environment variable should be set
prior to this point.</li>
</OL>
<h3>Microsoft Visual Studio</h3>
<ol>
<li>Set the OpenSSL include/header directory path under the
<b><i>Directories</i></b> tab - <i><b>Include Files</b></i> setting in
the <i><b>Tools->Options</b></i> dialog. A typical value would be
something like: <code>openssl-0.9.6\inc32</code></li>
<li>Set the OpenSSL library directory path under the
<b><i>Directories</i></b> tab - <i><b>Library Files</b></i> setting in
the <i><b>Tools->Options</b></i> dialog. A typical value would be
something like: <code>openssl-0.9.6\out32dll</code></li>
<li>Open the <code>ACE.dsw</code> workspace, and refer to the ACE build
and installation instructions above for details on creating a
<code>config.h</code> configuration header for this platform. Once
the <CODE>config.h</CODE> file has been created, build the
<code>ACE_SSL</code> project.</li>
</ol>
<h3>Borland C++</h3>
<p>Support for building TAO's SSLIOP pluggable protocol with Borland C++
does exist. E-mail the
<a href="mailto:ace-users@cs.wustl.edu">ace-users</a> mailing list to
obtain instructions that detail how to build it using Borland C++.
These instructions will soon be integrated into this web page.</p>
<HR><P>
<H3><A NAME="minimum_build">What Do I Need to Build for TAO?</A></H3>
Toshio Hori <toshi@etl.go.jp> provided these suggestions on building
just what's needed for (a subset of) TAO:<p>
I usually make:
<pre>
$ACE_ROOT/ace,
$ACE_ROOT/apps/gperf,
$TAO_ROOT/tao,
$TAO_ROOT/TAO_IDL, and
$TAO_ROOT/orbsvcs/orbsvcs
</pre>
and the whole make takes less than an hour on my Solaris 7 for intel,
Pentium-III/550MHz, 256MB memory, 512MB swap machine. (Top secret: I
renice the 'make' process to the highest priority, -20... ;-)
To save time and space, I set
<pre>
TAO_ORBSVCS = Naming Time Trader ImplRepo
</pre>
in $ACE_ROOT/include/makeinclude/platform_macros.GNU also. See
<a href="TAO/docs/configurations.html#orbsvcs">TAO's orbsvcs
library customization instructions</a> for more information.<p>
<HR><P> <H3><A NAME="resource_requirements">System Resource
Requirements</A></H3> The amount of system resources required to build
ACE and TAO varies greatly. The required system resources are
influenced by OS and compiler platform, build options, and component
configurations. As a rough guide, the typical peak memory requirement
can be well over 256 MB (notably, for TAO's orbsvcs). Depending on
your OS and compiler configuration, an <strong>entire</strong> build
of ACE and TAO can use well over 2 MB of disk space. It's usually not
necessary to build <strong>all</strong> of ACE and TAO, though.<p>
Much less disk space is required for just the libraries. For example,
see the <a href="docs/ACE-subsets.html#ACE Library Size Breakdown">ACE
library subset sizes</a>.<p>
If you run out of memory when building, you might consider trying
some or all of these suggestions:<p>
<ul>
<li>Enable or increase virtual memory. If you're on a <a
href="#Linux">Linux</a> or <a href="#LynxOS">LynxOS</a> platform,
please see the appropriate sections above.<p>
<li>Disable/enable optimization and/or debugging. See the
<a href="#flags">Makefile Flags</a> discussion for information
on how to do that via ACE's Makefiles.<p>
<li>If you're using g++, try removing <code>-pipe</code> from
<code>CFLAGS</code> in your
<code>include/makeinclude/platform_macros.GNU</code> file.<p>
<li>Restrict the components that you build. For ACE and TAO, see the
discussion of <code>ACE_COMPONENTS</code> in the
<a href="docs/ACE-subsets.html">ACE subsets</a> page. For TAO's
orbsvcs, see the discussion of <code>TAO_ORBSVCS</code> in
<a href="TAO/docs/configurations.html#orbsvcs">orbsvcs Library configuration information</a>.<p>
If disk space is a problem, disabling debugging should greatly
reduce object code, and therefore, library size. This is especially
true with g++.<p>
Toshio Hori <toshi@etl.go.jp> provided these tips for reducing
disk space usage:<p>
To save space on a Unix machine, I usually run
'find . -name \*.dsw -o -name \*.dsp -o -name \*.bor | xargs rm -f'
in $ACE_ROOT at first after I untar the distribution. They are
meaningless in my environment (Files named '*.dsw' and '*.dsp' are
used for MSVC++ and files named '*.bor' are for Borland C++
Builder.)<p>
Finally, to save space, may want to run 'make clean' after 'make'. It
removes generated object files and leaves libraries/executables
intact. If you want to remove any of the libraries/executables, as
well, try 'make realclean'.<p>
</ul>
<HR><P>
<H3><A NAME="advanced">Advanced Topics</A></H3>
<UL>
<LI><A
HREF="docs/ACE-porting.html">Porting ACE and TAO to a New OS Platform</A>
<LI><A HREF="http://www.cs.wustl.edu/~othman/aceconf">Using GNU's
Autoconf with ACE</A>
<UL>
<LI>This support is currently a work-in-progress, and is
hence disabled. It will be completed and re-enabled as
soon as someone funds the work to do so.
</UL>
</LI>
<LI><A HREF="#Non-static Object Manager">Non-static ACE_Object_Manager</A>
<LI><A HREF="#cloning">Cloning the Source Tree</A>
<LI><A HREF="#corba">Building CORBA Versions of ACE</A>
<LI><A HREF="#mvs">Additional Build Tips for MVS</A>
<LI><A HREF="#flags">Makefile Flags</A>
<LI><A HREF="http://www.cs.wustl.edu/~levine/CVS.html">Version Control</A>
<LI><A HREF="http://www.cs.wustl.edu/~cleeland/ace/makefile-hints.html">ACE Makefile hints</a>
<LI><A HREF="docs/ACE-SSL.html">ACE SSL effort</a>
</UL>
<P><hr align=left width="50%"><P>
<H4><A NAME="Non-static Object Manager">Non-static
ACE_Object_Manager</A></H4> The ACE_Object_Manager can be instantiated
as a static object, can be instantiated on the stack of the main
program thread, or can be explicitly instantiated and destroyed by the
application with <code>ACE::init ()</code> and <code>ACE::fini
()</code>. The comments in the <a href="ace/Object_Manager.h">header
file, <code>ace/Object_Manager.h</code></a> provide more detail.<P>
<strong><blink><font color="#ff0000">NOTE:</font></blink></strong>
Special requirements are imposed on applications if the
ACE_Object_Manager is instantiated, by ACE, on the stack of the main
thread. This behavior is selected by defining
<code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> in
<code>ace/config.h</code>. Again, see the ACE Object_Manager <a
href="ace/Object_Manager.h">header file,
<code>ace/Object_Manager.h</code></a> for more information. One of
these requirements is discussed here, because it is so important.
Please note that <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> is
defined in the distributed ACE <code>config.h</code> headers for
VxWorks and Win32.<p>
The important requirement is that the program <strong>must</strong>
declare its <code>main</code> function with two arguments, even if
they're not used, and with <code>int</code> return type:
<pre><code>
int
main (int, char *[])
</code></pre>
If you don't declare <code>main</code> <strong>exactly</strong> that
way, then you'll see a link error about <code>ace_main_i</code> being
undefined.<p>
Alternatively, this feature can be disabled by commenting out the
#define ACE_HAS_NONSTATIC_OBJECT_MANAGER in the
<code>ace/config.h</code>. But, that will make repeated testing more
difficult on VxWorks. And, you'd either have to call static
constructors and destructors manually or unload/load the program
between runs. On Win32, disabling the feature can possibly lead to
shutdown difficulties.<p>
<strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
<code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> assumes that your
<code>main</code> function is named <code>main</code>. Any violation
of this assumption is at your peril. If you really need to call your
entry point something other than <code>main</code>, you'll need to
construct and destroy the ACE_Object_Manager. The best way to do that
is to call <code>ACE::init ()</code> and <code>ACE::fini ()</code>.
Or, see the <code>#define</code> of <code>main (int, char *[])</code>
in <a href="ace/OS.h"><code>ace/OS.h</code></a> to see how ACE does
that for entry points named <code>main</code>.
<P><hr align=left width="50%"><P>
<H4><A NAME="cloning">Cloning the Source Tree</A></H4>
On UNIX platforms, we typically like to support multiple platform
builds using the same ACE source tree. This idiom is supported by ACE
using the $ACE_ROOT/bin/create_ace_build script or
$ACE_ROOT/bin/clone.cpp program.
To use build and use the clone program, first make sure there's a file
called platform_macros.GNU that contains the correct platform-specific
Makefile configurations in the $ACE_ROOT/include/makeinclude/
directory, as well as making sure there's a $ACE_ROOT/ace/config.h
file that includes the desired platform/compiler specific
configuration header. Then perform the following steps:<P>
<pre>
% cd $ACE_ROOT/bin
% make
% mv clone ~/bin
% rehash
</pre><P>
Then create a ./build subdirectory someplace, e.g., under $ACE_ROOT.
Once this is done, then invoke the top-level Makefile with the
"clone" target, e.g.:<P>
<pre>
% cd $ACE_ROOT
% mkdir build-SunOS5
% cd build-SunOS5
% make -f ../Makefile clone
% setenv ACE_ROOT $cwd
% make
</pre><P>
This will establish a complete tree of links. In addition, make sure
you set your LD_LIBRARY_PATH to $ACE_ROOT/ace:$LD_LIBRARY_PATH on SVR4
UNIX platforms.<P>
When you do a make in the $ACE_ROOT directory you will be producing
object code that is not stored in the same place as the original
source tree. This way, you can easily build another platform in a
parallel tree structure.<P>
<B> VERY IMPORTANT! </B><P>
If you use the "clone trick" discussed above, make sure that the
symbolic links are correctly in place before starting the build. In
particular, if you plan to clone the tree, it is preferable to do so
before you start a build procedure on the original tree. This is
because the build procedure create object directories (.obj and
.shobj) and the cloning procedure will clone these directories also.
You would end up with links pointing to object files of another
platform. If you clone the tree after you've done a build on the
original tree, make sure to remove all ".obj", ".shobj" and (any other
files or directories) in all subdirectories before starting the build
on your cloned tree.<P>
Alternatively, the perl script
<code>ACE_wrappers/bin/create_ace_build</code> can be used to create
build trees. It creates them below <code>ACE_wrappers/build</code>.
It filters out all but the necessary files, so the warning above does
not apply. See the comments at the top of the script itself for usage
information.
<P><hr align=left width="50%"><P>
<H4><A NAME="mvs">Additional Build Tips for MVS</A></H4>
For all intents and purpose, MVS OpenEdition (OE) is another flavor of
UNIX, therefore, the instructions under <A HREF="#aceinstall">Building
and Installing ACE on Unix</A> can be used along with the following
additional tips:<P>
You can get a copy of GNU make that has been ported to MVS OpenEdition from
the <A HREF="http://www.s390.ibm.com/products/oe/index.html">IBM OpenEdition web site</A>.
ACE's make scheme generates compile commands that have options and
operands interspersed. By default, the c89/cc/c++ compiler expects all options to
precede all operands. To get around this, you must set a special
compiler environment variable (_CXX_CCMODE) to 1 which tells the compiler
to allow options and operands to be interspersed.<P>
Note that the environment variable LD_LIBRARY_PATH is called LIBPATH
on MVS.<P>
Shared objects are built a little different on MVS than on
other UNIX implementations. This has been accounted for in the makefiles
that come with ACE When the linker (via the cxx command) builds the
libACE.so file it will also create a file called libACE.x. This is a
side-deck file and it must be included in subsequent link edits with
application code. For more information on this see the C/C++ MVS
Programming Guide. If you want to build your application statically,
i.e., using libACE.a instead of libACE.so, you can set ACELIB to
ACELIB_STATIC in platform_mvs.GNU.<P>
When the libACE.so file is built (via the MVS pre-linker and binder), you
will get a rc=4 from the pre-linker. This is ok. This is due to some
warnings about unresolved references which should get resolved during the
link step. Note, however, there shouldn't be any unresolved references
from the binder (linkage editor). You can get pre-link and link maps by
uncommenting the PMAP and LMAP lines in the platform_mvs.GNU file.
<P><hr align=left width="50%"><P>
<H4><A NAME="flags">Makefile Flags</A></H4>
GNU make provides many options to customize its operation. See its
documentation for more information. One example is that for multi-cpu
UNIX machines you will be able to build faster if you use:<P>
<pre><code>
% make -j <em>n</em>
</code></pre><p>
which allows parallel compilation. The number <i>n</i> should
typically be the number of CPUs. It is likely that builds will be
faster even on single-CPU UNIX machines with <code>make -j
2</code>.<P>
ACE further supports the following flags. They can be enabled either
on the command line, e.g., "make purify=1", or added to your
platform_macros.GNU. To disable the option, set the flag to null,
e.g., "make debug=". Some flags support setting to 0 disable, e.g.,
"make debug=0". debug=1 is enabled in the platform files that are
released with ACE.<P>
Please note that the effects of a flag may be platform specific.
Also, combinations of certain flags may or may not be allowed on
specific platforms, e.g., debug=1 opt=1 is supported by g++ but
not all other C++ compilers.<P>
If you use Purify or Quantify: purify or quantify <strong>must</strong>
be on your <code>PATH</code>. By default, ACE puts the Purify/Quantify
caches below <code>/tmp</code>. To override that, set the
<code>PURE_CACHE_BASE_DIR</code> variable, either in your environment
or on the <code>make</code> make command line, to the destination
directory for your instrumented libraries.<p>
<PRE>
Flag Description
---- -----------
debug Enable debugging; see DCFLAGS and DCCFLAGS.
exceptions Enable exception handling (not supported by all platforms).
include_env Support old-style ACE_TRY_ENV declarations in methods.
This switch is necessary for compiling TAO applications
in the native exception configuration that were written
for TAO versions before 1.2.2.
In TAO 1.2.2, new macros were introduced that supercede
the direct ACE_TRY_ENV declarations. These are the
ACE_ENV_ARG macros that are defined in ace/CORBA_macros.h
and are documented in docs/exceptions.html.
This switch only affects the exceptions=1 configuration.
It is for backward compatibility only.
There will be warnings about unused _ACE_environment_variable
parameters when using include_env=1.
If possible, do not use it, but instead change your TAO
applications to use the ACE_ENV_ARG macros.
fast Enable -fast option, e.g., with Sun C++.
inline Enable ACE inlining. Some platforms enable inlining by
default, others do not.
optimize Enable optimization; see OCFLAGS and OCCFLAGS.
pace Enable PACE as the underpinnings of ACE_OS.
probe Enable ACE_Timeprobes.
profile Enable profiling; see PCFLAGS and PCCFLAGS.
purify Purify all executables.
quantify Quantify all executables.
repo Use GNU template repository (g++ with repo patches and
egcs only).
rtti Enable run-time type identification. On some platforms,
it is enabled by default, so this is ignored.
shared_libs Build shared libraries. Ignored if static_libs_only is set.
static_libs Build shared libraries. Ignored if shared_libs_only is set.
shared_libs_only Only build shared libraries. Ignored if no SHLIBs are
specified by the Makefile, as in performance-tests/Misc.
static_libs_only Only build static libraries.
threads Build with thread support.
xt_reactor Build the XtReactor.
fl_reactor Build the FlReactor.
tk_reactor Build the TkReactor.
qt_reactor Build the QtReactor.
gtk_reactor Build the GtkReactor.
ssl Build with OpenSSL support.
rapi Build with RAPI
split Build the library by first splitting up the ACE source
to several files, with one object code entity for each
source file. This allows an application that is linked
with ACE to extract _exactly_ what it needs from the
library, resulting in a smaller executable. Setting this
to 1 overrides debug to 0.
Usually, users do not need to be concerned with make targets.
Just enter "make" on the command line to build. A few notable
targets are listed below.
Target Description
------ -----------
show_statics Lists all static objects in object files built for
current directory. Only supported for g++.
show_uninit Lists all uninitialized in object files built for
current directory. Only supported for g++.
</PRE>
<HR><P>
Back to the <A HREF="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</A>
home page.
<!--#include virtual="/~schmidt/cgi-sig.html" -->
</BODY>
</HTML>
|