-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknown-problems-old.html
More file actions
executable file
·916 lines (812 loc) · 34.2 KB
/
known-problems-old.html
File metadata and controls
executable file
·916 lines (812 loc) · 34.2 KB
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<META HTTP-EQUIV="Resource-type" CONTENT="document">
<META HTTP-EQUIV="Description" CONTENT="Modula-3 Resource Page">
<META HTTP-EQUIV="Distribution" CONTENT="global">
<META HTTP-EQUIV="Keywords" CONTENT="m3, modula-3, modula3, M3, Modula-3, modula-3, cm3, CM3, FreeCM3">
<META HTTP-EQUIV="Reply-to" CONTENT="m3-support@elego.de">
<LINK HREF="normal.css" REL="stylesheet" TYPE="text/css">
<title>Known Problems with CM3 5.1 and 5.2</title>
</head>
<body bgcolor="#ffffff">
<h2>Known Problems with CM3</h2>
<p>
Contents:<br><br>
<a href="#p_1">1 General Problems</a><br>
<a href="#p_1_1">1.1 Linkage failure: cannot find -lXaw</a><br>
<a href="#p_1_2">1.2 Filenames with spaces</a><br>
<a href="#p_1_3">1.3 Linker trouble with latest Microsoft VC++
compilers on WIN32 platform</a><br>
<a href="#p_1_4">1.4 Assembler problem on LINUXLIBC6 (filds
instrcution)</a><br>
<a href="#p_1_5">1.5 Version stamp mismatch during upgrading</a><br>
<br>
<a href="#p_2">2 Release 5.1.0</a><br>
<a href="#p_2_1">2.1 Installation on NT386 fails because of
missing cygwin.dll</a><br>
<br>
<a href="#p_3">3 Release 5.1.1</a><br>
<br>
<a href="#p_4">4 Release 5.1.2-5.1.8</a><br>
<a href="#p_4_1">4.1 Linkage failure: missing -L before library
paths (installer bug)</a><br>
<a href="#p_4_2">4.2 [Release 5.1.8] Linkage failure on POSIX
platforms due to wrong paths (/pub/lang/m3/cm3-dist) in binary
installation archives
</a><br><br>
<a href="#p_5">5 Release 5.2.X</a><br>
<a href="#p_5_1">5.1 Problems building the core distribution
with Apple's gcc</a><br>
<a href="#p_5_2">5.2 Compilation of m3gc-enhanced fails on
PPC_DARWIN</a><br>
<a href="#p_5_3">5.3 Problems with efficient exception handling
(`stack walkers') and gcc 3.2.1</a><br>
<a href="#p_5_4">5.4 Installation program fails with unhandled
OSError exception on SOLgnu platform</a><br>
<a href="#p_5_5">5.5 Segmentation fault errors on Fedora 3 and Gentoo Linux</a><br>
<br>
<a href="#p_6">6 Release 5.4.X</a><br>
<a href="#p_6_1">6.1 Segmentation violations on Linux, compile fails with PklFonts core dumping</a><br>
<a href="#p_6_2">6.2 Unresolved X11 libraries on NetBSD</a><br>
<a href="#p_6_3">6.3 Issues with /usr/bin/ld on Solaris</a><br>
<a href="#p_6_4">6.4 asm/ipc.h not found on Linux</a><br>
</p>
<h3><a name="p_1">1 General Problems</a></h3>
<p>
General problems and notes applying to all releases:
</p>
<h4><a name="p_1_1">1.1 Linkage failure: cannot find -lXaw</a></h4>
<p>
<b>Platforms:</b> mostly LINUXLIBC6, LINUXELF
</p>
<p>
<b>Description:</b>
Problems of this kind will arise if the linker cannot find the
static standard libraries of the X systems. This will mostly be
a problem on Linux systems, as almost all newer distributions
tend to not install static libraries by default. A typical
failure situation looks like this:
</p>
<pre>
> === package /home/i8fs1/VERIF/usr/old/stow/cm3/current/m3-ui/formsedit ===
> +++ cm3 -build -override -DROOT=/home/i8fs1/VERIF/usr/old/stow/cm3/current +++
> --- building in LINUXLIBC6 ---
> /home/i8fs1/VERIF/usr/old/stow/cm3/tmp/bin/m3bundle -name formseditBundle -F/tmp/qk
> new source -> compiling FormsEditVBT.i3
> new source -> compiling formseditBundle.i3
> new source -> compiling FormsEditVBT.m3
> new source -> compiling FormsEdit.m3
> new source -> compiling formseditBundle.m3
> -> linking formsedit
> /home/i8fs1/VERIF/usr/old/bin/ld: cannot find -lXaw
> collect2: ld returned 1 exit status
</pre>
<p>
<b>Solution:</b>
Usually it is possible to install the missing libraries without
much effort.
</p>
<h4><a name="p_1_2">1.2 Filenames with spaces</a></h4>
<p>
<b>Platforms:</b> all, especially WIN32
</p>
<p>
<b>Description:</b>
CM3 currently cannot handle filenames containing spaces very
well. This will probably not be an issue on POSIX platforms, but
it is very annoying on WIN32, as many standard installation path
names contain spaces there.
</p>
<p>
The problem cannot be easily resolved. This is due to the broken
process creation interface on WIN32 platforms, which does not
allow transparent passing of parameters, and some standard
<tt>quake</tt> functions, which have to be replaced by more
general equivalents, like <tt>exec, arglist</tt> (probably more).
</p>
<p>
<b>Solution:</b>
There is no easy solution to this problem. As a temporary
work-around, the installer has been modified to replace pathnames
with spaces by their 8.3 style equivalent on WIN32. If you
cannot avoid using spaces in your CM3 projects, the 8.3 style
short form should be a possible though ugly work-around for that,
too. Voluntary contributions in this area are more than welcome.
This work-around is incorporated in all installation programs
since release 5.1.1.
</p>
<h4><a name="p_1_3">
1.3 Linker trouble with latest Microsoft VC++
compilers on WIN32 platform</a>
</h4>
<p>
<b>Platforms:</b> WIN32/NT386, reproduced with Microsoft 32-Bit
C/C++-Compiler, Version 12.00.8804, non-issue with 32-bit C/C++
Standard Compiler Version 10.00.6002 for 80x86
</p>
<p>
<b>Description:</b>
Building of dynamic libraries (DLLs) (e.g. for m3core) fails
with unresolvable ambiguous symbols __real@8@... It turns out
that during the compilation of C sources the compiler defines an
8 bytes data section for every floating point constant (which is
fine) and marks it as exported (which is certainly
unexpected). The library archiver <tt>mklib</tt> shortens these
symbols after the first @ character and leaves the linker with
lots of equally named constants. It is still unclear to me why
the compiler behaves in this way.
</p>
<p>
<b>Note:</b>
There has been one report where more linker errors have been
encountered (in libm3), though the work-around mentioned below
had been applied. So it may well be that there are still
undiscovered problems and unknown incompatibilities with
particular releases of the Microsoft tools.
</p>
<p>
<b>Solution:</b>
No real solution is known, as I haven't found a way to make the
compiler not export the floating point constants. Older
compilers (see above) do not exhibit this
behaviour. Unfortunately, it is neither possible (as has been
suggested) to (a) not to shorten the symbols after the @ character,
and (b) ignore the export of all symbols beginning with two
underscores while writing the linker .def file (this even fails
for libm3). In CM3 5.1.3 a work-around has been implemented,
which cures the problem for all tested m3 packages; this is
still no general solution, though, as it may break other
existing code. The <tt>mklib</tt> program has been extended by
a switch to ignore certain exported symbols: <tt>-ign:XXX</tt>
instructs the archiver to ignore all symbols beginning with
XXX. The option <tt>-ign:__real</tt> has been added to the
templates for the global configuration file <tt>cm3.cfg</tt>.
</p>
<h4><a name="p_1_4">
1.4 Assembler problem on LINUXLIBC6 (filds
instrcution)</a>
</h4>
<p>
<b>Platforms:</b> reported for LINUXLIBC6, possibly other POSIX
platforms, too
</p>
<p>
<b>Description:</b>
The assembler reports errors due to an unknown i386 instruction
like this:</p>
<pre>
new source -> compiling RealFloatExtras.m3
RealFloatExtras.ms: Assembler messages:
RealFloatExtras.ms:69: Error: no such 386 instruction: `filds'
RealFloatExtras.ms:153: Error: no such 386 instruction: `filds'
RealFloatExtras.ms:209: Error: no such 386 instruction: `filds'
new source -> compiling LongFloatExtras.i3
new source -> compiling LongFloatExtras.m3
LongFloatExtras.ms: Assembler messages:
LongFloatExtras.ms:69: Error: no such 386 instruction: `filds'
LongFloatExtras.ms:154: Error: no such 386 instruction: `filds'
LongFloatExtras.ms:211: Error: no such 386 instruction: `filds'
</pre><p>
The above was observed on a RedHat 6.1 Linux system with libc6
and gcc 2.91.66 (egcs-1.1.2).
</p>
<p>
<b>Solution:</b>
I've currently no information about the excat version of GNU
tools that cause the problem, which obviously seems to be a
compiler/assembler version mismatch. I would expect that
upgrading the assembler to a more recent version should solve
the problem, but haven't asserted this yet, nor do can I name
the version that is needed. More information from people working
on (RedHat) Linux systems would be welcome.
</p>
<h4><a name="p_1_5">
1.5 Version stamp mismatch during upgrading</a>
</h4>
<p>
<b>Platforms:</b> all
</p>
<p>
<b>Description:</b>
The compiler reports version stamp mismatches in libm3
like this:</p>
<pre>
new source -> compiling ProcessPosix.m3
new source -> compiling SocketPosix.m3
Fatal Error: bad version stamps: SocketPosix.m3
version stamp mismatch: Compiler.Platform
<00df7acd080d2be7> => SocketPosix.m3
=> Compiler.i3
version stamp mismatch: Compiler.ThisPlatform
<4d31a453f94cbb46> => SocketPosix.m3
=> Compiler.i3
*** execution of failed ***</pre>
<p>
<b>Solution:</b>
This only occurs on rare occasions when new target platforms
have been added to the compiler. The solution is to first build
a compiler who knows about the news platforms with the existing
m3core and libm3 packages, and then build everything again. For
a detailed description, see <a href="upgrading.html">Upgrading
CM3</a>.
</p>
<h3><a name="p_2">2 Release 5.1.0</a></h3>
<p>
Problems and notes specific to release 5.1.0:
</p>
<h4><a name="p_2_1">2.1 Installation on NT386 fails because of missing cygwin.dll</a></h4>
<p>
<b>Platforms:</b> NT386
</p>
<p>
<b>Description:</b>
The installation program cannot unpack the system and other
archives because <tt>cygwin.dll</tt>, which is needed by the
bundled <tt>tar.exe</tt>, is missing in the installation
archive.
</p>
<p>
<b>Solution:</b>
Either
</p>
<ul>
<li>
place a working <tt>cygwin.dll</tt> in next to the
<tt>cminstall</tt> program,
</li>
<li>
place a working <tt>tar.exe</tt> next to the
<tt>cminstall</tt> program,
</li>
<li>
get a newer installation archive (5.1.1 or better).
</li>
</ul>
<h3><a name="p_3">3 Release 5.1.1</a></h3>
<p>
Problems and notes specific to release 5.1.1:
</p>
<h3><a name="p_4">4 Release 5.1.2 - 5.1.8</a></h3>
<p>
Problems and notes specific to release 5.1.8:
</p>
<h4><a name="p_4_1">
4.1 Linkage failure: missing -L before library paths (installer bug)</a>
</h4>
<p>
<b>Platforms:</b> all
</p>
<p>
<b>Description:</b>
The compiler complains about non-existant library files when
trying to link with libraries that were not present at
installation time but have been installed later. This is due to
a bug in the installation program <tt>cminstall</tt> which
forgets to prepend the string "-L" to all library paths for
libraries that haven't actually been found by it. Thus the
system library definitions in the configuration file
<tt>cm3.cfg</tt> used by the system linker are sometimes
incorrect.
</p>
<p>
<b>Solution:</b>
Add the missing -L to all system library definitions in
<tt>cm3.cfg</tt> where it is missing. For example, the
corresponding section in a FreeBSD4 configuration file (located
at <tt>/usr/local/cm3/bin/cm3.cfg</tt> by default) might look
like this (with all library path options added):
</p>
<pre>
SYSTEM_LIBS = {
"LIBC" : [ "-lm" ],
"LEX-YACC" : [ "-L/usr/lib", "-ll" ],
% "FLEX-BISON" : [ "-L/usr/lib", "-lfl" ],
"POSTGRES95" : [ "-L/usr/local/pgsql/lib", "-lpq" ],
"OPENGL" : [ "-L/usr/X11R6/lib", "-lGLU", "-lGL", "-lXext" ],
"MOTIF" : [ "-L/usr/X11R6/lib", "-lXm" ],
"X11" : [ "-L/usr/X11R6/lib", "-lXaw", "-lXmu", "-lXext",
"-lXt", "-lSM", "-lICE", "-lX11" ],
"TCP" : [ ],
"ODBC" : [ "-L/usr/local/lib", "-lodbc" ]
}
</pre>
<p>
The problem has been corrected shortly after the release of CM3
5.1.8.
</p>
<h4><a name="p_4_2">
4.2 [Release 5.1.8] Linkage failure on POSIX platforms due to
wrong paths (/pub/lang/m3/cm3-dist) in binary installation
archives</a>
</h4>
<p>
<b>Platforms:</b> all POSIX platforms
</p>
<p>
<b>Description:</b> The isolation of the garbage collection
support from <tt>m3core</tt> has lead to one unexpected problem
in the preparation of the minimal binary installation
archives. On all POSIX platforms, <tt>m3core</tt> now depends on
either <tt>m3gc-simple</tt> or <tt>m3gc-enhanced</tt>. As
<tt>m3core</tt> cannot <em>import</em> another Modula-3 library
(due to subtleties of the runtime implementation), these
libraries only contain some C source code files and are shipped
explicitly to the installation root (<tt>INSTALL_ROOT</tt> in
<tt>cm3.cfg</tt>). The used declaration for this export
(<tt>LibdExport(libname)</tt>) creates an import directive like
the following one in all <tt>.M3EXPORTS</tt> files of packages
depending on it:
</p>
<pre>
_import_otherlib("m3gcdefs", "/pub/lang/m3/cm3-dist/cm3/lib", IMPORTED)
</pre>
<p>
This directive contains the absolute path (<tt>LIB_INSTALL</tt>)
of the library in question. As the binary installation archives
are always produced in an empty staging area
(for example <tt>/pub/lang/m3/cm3-dist/cm3</tt>), this path is
unlikely to be correct for the actual installation (where it
should be <tt>/usr/local/cm3/lib</tt> by default).
</p>
<p>
<b>Solution:</b>
There are several possible solutions for this problem. We assume
that <tt>INSTALL_ROOT</tt> is <tt>/usr/local/cm3</tt> and
<tt>TARGET</tt> is the POSIX platform in use (FreeBSD4,
LINUXLIBC6, etc.).
</p>
<ol>
<li>
After the installation of the minimal binary cm3 5.1.8
distribution, edit the files
<blockquote>
<tt>/usr/local/cm3/pkg/m3core/TARGET/.M3EXPORTS</tt>
<tt>/usr/local/cm3/pkg/libm3/TARGET/.M3EXPORTS</tt>
</blockquote>
and replace the line
<blockquote>
<tt>_import_otherlib("m3gcdefs", "/pub/lang/m3/cm3-dist/cm3/lib", IMPORTED)</tt>
</blockquote>
by either
<blockquote>
<tt>_import_otherlib("m3gcdefs", "/usr/local/cm3/lib", IMPORTED)</tt>
</blockquote>
or
<blockquote>
<tt>_import_otherlib("m3gcdefs", LIB_USE, IMPORTED)</tt>
</blockquote>
</li>
<li>
After the installation of the minimal binary cm3 5.1.8
distribution, build and ship the packages <tt>m3core</tt> and
<tt>libm3</tt> from one of the source distribution archives
(e.g. <tt>cm3-src-std-5.1.8.tgz</tt>). You can do this with
the following commands (<tt>WORK</tt> identifying your working
area where you unpacked the sources):
<pre>
cd WORK/cm3/scripts
./do-pkg buildship m3core
./do-pkg buildship libm3
</pre>
This will put the correct paths in the <tt>.M3EXPORTS</tt>
files.
</li>
<li>
Use <tt>sed</tt> or <tt>perl</tt> to perform the needed
substitutions as described in (1).
</li>
</ol>
<p>
Future distributions (release > 5.1.8) will avoid this
problem by either modifying the export/import-mechanism for
<tt>m3gc-simple</tt> and <tt>m3gc-enhanced</tt>, adjust the
absolute paths during the construction of the binary
distribution archive, or automatically adjust the abolsute paths
after installation.
</p>
<h3><a name="p_5">
5 Release 5.2.X</a>
</h3>
<h4><a name="p_5_1">
5.1 Problems building the core distribution
with Apple's gcc</a>
</h4>
<p>
<b>Platforms:</b> PPC_DARWIN
</p>
<p>
<b>Description:</b>
The first problem is that Apple's gcc will produce the two
non-relocatable symbols saveSP and restFP when compiling
setjmp/longjmp calls; this will make the building of a dynamic
library for m3core fail. The work-around is to use an assembler
source RTThredC.s instead of RTThreadC.c that does not refer to
these routines and explicitly saves and restores the floating
point registers.
</p>
<p>
For the explanation of the second problem I just append the
mail I've to interested parties:
</p>
<p>
--- start of quote ---<br>
After your failure reports for compilation of the
cm3/m3-sys/m3cc package (the gcc 3.2.1 based code generator) I
made some tests myself and found that I had obviously again used
my own gcc to build this package.
</p>
<p>
I've made two or three attempts to get the package compile with
Apple's native gcc (3.1 prerelease), but failed too. If nobody
else finds a smart configuration hack I'm afraid that one will
need a bootstrapped gcc 3.2.1 C compiler to compile the cm3cg
code generator. This is annoying as it adds another big
dependency for cm3 on Darwin; but it is not as big a problem as
it might seem for two reasons:
</p>
<ol>
<li>
It was relatively easy for me to bootstrap gcc 3.2.1 on Darwin
6.3 using the standard procedure; I only had to manually
change the order of some definitions in one `fixed' include
file. So everybody who really wants to compile the cm3 code
generator for her/himself should be able to do so.
</li>
<li>
You don't need to recompile the code generator at all if you
use the binary installation package; if you want to rebuild
all the core packages, just specify
<pre>
OMIT_GCC=yes ./do-cm3-core.sh buildship</pre>
and it will leave the m3cc package out.
</li>
</ol>
<p>
I've added a warning that is issued when building m3cc on
PPC_DARWIN; the patched m3cc package is tagged
devel_m3cc_d3_1_5.
</p>
<p>
If anybody finds a way to avoid this bootstrap dependency and use
Apple's native compiler to build m3cc, I'd be very interested.<br>
--- end of quote ---<br>
</p>
<p>
As noted above, the 5.2.0 sources do not contain these changes; to get
them, please use either anonymous CVS, CVSup, or the selective package
download with appropriate arguments. You'll find all these on the
M3 download page at http://modula3.elegosoft.com/ .
</p>
<p>
<b>Solution:</b>
The correct fix seems to be to add <tt>-lcc_dynamic</tt> when
linking dynamic libraries. Thank you to Ben Hines for this
hint. I've changed the configuration files for PPC_DARWIN in
packages cm3 and cminstall and created new versions
devel_cm3_d2_0_4 and devel_cminstall_d0_7_2. These fixes are
included in <b>CM3 5.2.4</b>.
</p>
<h4><a name="p_5_2">
5.2 Compilation of m3gc-enhanced fails on
PPC_DARWIN</a>
</h4>
<p>
<b>Platforms:</b> PPC_DARWIN
</p>
<p>
<b>Description:</b>
The compilation of package m3gc-enhanced fails on PPC_DARWIN
with the following errors:
</p>
<pre style="font-size: 0.9em;">
new source -> compiling RTHeapDepC.c
../src/runtime/PPC_DARWIN/RTHeapDepC.c:88:21: sys/msg.h: No such file or directory
../src/runtime/PPC_DARWIN/RTHeapDepC.c:141: error: parse error before "__unused"
../src/runtime/PPC_DARWIN/RTHeapDepC.c:141: warning: initialization makes integer from pointer without a cast
../src/runtime/PPC_DARWIN/RTHeapDepC.c:141: warning: data definition has no type or storage class
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `adjtime':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:176: error: argument `delta' doesn't match prototype
/usr/include/sys/time.h:180: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `getdomainname':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:447: error: `SYS_getdomainname' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c:447: error: (Each undeclared identifier is reported only once
../src/runtime/PPC_DARWIN/RTHeapDepC.c:447: error: for each function it appears in.)
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `gethostname':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:473: error: `SYS_gethostname' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `mount':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:737: error: argument `type' doesn't match prototype
/usr/include/sys/mount.h:384: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c:745: error: `MOUNT_UFS' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c:747: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:747: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:748: error: `MOUNT_MFS' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c:753: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:753: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:755: error: `MOUNT_NFS' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c:757: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:757: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:758: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:758: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:759: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c:759: error: dereferencing pointer to incomplete type
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `quotactl':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:846: error: argument `path' doesn't match prototype
/usr/include/sys/quota.h:218: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `setdomainname':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1035: error: `SYS_setdomainname' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `sethostname':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1071: error: `SYS_sethostname' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `setitimer':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1085: error: argument `value' doesn't match prototype
/usr/include/sys/time.h:184: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `settimeofday':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1159: error: argument `tp' doesn't match prototype
/usr/include/sys/time.h:185: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1159: error: argument `tzp' doesn't match prototype
/usr/include/sys/time.h:185: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `uname':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1264: error: `SYS_uname' undeclared (first use in this function)
../src/runtime/PPC_DARWIN/RTHeapDepC.c: In function `utimes':
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1302: error: argument `file' doesn't match prototype
/usr/include/sys/time.h:186: error: prototype declaration
../src/runtime/PPC_DARWIN/RTHeapDepC.c:1302: error: argument `tvp' doesn't match prototype
/usr/include/sys/time.h:186: error: prototype declaration
compilation failed => not building library "libm3gcdefs.a"
Fatal Error: package build failed</pre>
<p>
<b>Solution:</b>
Do not compile m3gc-enhanced on PPC_DARWIN. It won't work as the
virtual memory system and several system interfaces are too
different from FreeBSD, from which the code was initially
copied. m3gc-enhanced and some m3core modules would need a
certain amount of work to become useful and allow generational
and incremental garbage collection on PPC_DARWIN.
</p>
<p>
There is a switch -- <tt>M3GC_SIMPLE=yes</tt> -- which forces
compilation of m3gc-simple only and omitting m3gc-enhanced. You
use it like this:
</p>
<pre>
M3GC_SIMPLES=yes ./scripts/do-cm3-core.sh buildlocal</pre>
<p>
Unfortunately, due to an oversight this switch has not been
activated by default for PPC_DARWIN in release 5.2.4, but
shortly after. So if you get a version of the scripts dated
after the 5.2.4 release, you won't need to specify
<tt>M3GC_SIMPLES=yes</tt> in your environment.
</p>
<h4><a name="p_5_3">
5.3 Problems with efficient exception handling (`stack walkers')
and gcc 3.2.1</a>
</h4>
<p>
<b>Platforms:</b> all (principally), SOLgnu
</p>
<p>
<b>Description:</b>
Due to massive changes in gcc, since the upgrade of the code
generator backend cm3cg to gcc 3.2.1, the implementation of stack
walkers used for efficient exception handling on some platforms
(in CM3 currently only SOLgnu, more are concerned in PM3) is
broken. Here is an excerpt from an email by John Polstra
concerned with this problem:
</p>
<blockquote>
I have been looking at this today, and the news is not so good.
I believe that the current M3 stack walking implementation
_cannot_ work with modern GCCs. The M3 implementation builds
its own PC range tables. It emits a label marking the start of
a code region; then emits the code for the region; and then
emits a label marking the end of the region. And it relies on
exactly that code remaining between the two labels. But GCC now
performs extensive flow analysis and code motion. It will
happily move code into or out of the region if it thinks that's
a good idea. There is not even a guarantee that the start label
will appear before the end label in the generated code.
</blockquote>
<blockquote>
The SET_LABEL operation in M3's intermediate language has a
boolean "barrier" parameter which can be set to TRUE if code
motion past the label must not take place, and the front end
uses that to try to anchor these kinds of labels in place. But
that no longer works with modern GCC. In fact, in my
experiments the back end deleted the labels entirely.
</blockquote>
<blockquote>
As far as I can tell, the only way to accomplish the above is to
use GCC's built-in exception support. There is a nice complete
API for it -- see "gcc/except.h". I think we would need to
change the front end and the intermediate language to pass the
higher-level language constructs (TRY...EXCEPT, TRY...FINALLY,
etc.) all the way through to the back end. Then GCC would
generate the range tables and the code to use them itself. It
actually doesn't look very hard to do this, and I'm sure the
resulting code would be better than it is now. But I'm not
volunteering at the moment. :-)
</blockquote>
<p>
<b>Solution:</b>
None at the moment. If you want to use the gcc 3.2.1-based
backend for SOLgnu and other platforms with stack walkers, turn
off this feature in
<tt>cm3/m3-sys/m3middle/src/Target.m3</tt>. This will produce
less efficient code for exception handling, but perhaps improve
code performance in other aspects (untested).
</p>
<p>
<b>Hint:</b> We are still looking for volunteers to adapt the m3
frontend to the new gcc exception interface :-)
</p>
<p>
<b>Fix:</b>The stack handler tables have been functional for some time
now (since 2003/10/10) on targets that support it (SOLgnu/SOLsun,
ALPHA_OSF). As such, stack walkers have been turned on for these
targets in their cm3 configuration files. We still should look into
adapting the m3 frontend use the gcc exception framework.
</p>
<h4><a name="p_5_4">
5.4 Installation program fails with unhandled
OSError exception on SOLgnu platform</a>
</h4>
<p>
<b>Platforms:</b> SOLgnu
</p>
<p>
<b>Description:</b>cminstall fails with the following message:
</p>
<pre>
***
*** runtime error:
*** Unhandled exception: OSError.E
*** file \"../src/os/POSIX/OSErrorPosix.m3\", line 50
***
Abort</pre>
<p>
<b>Solution:</b>
Use the cm3-min-POSIX-SOLgnu-d5.2.7.tgz instead. The
installation program in the 5.2.6 archive is broken. There is no
work-around.
</p>
<h4><a name="p_5_5">
5.5 Segmentation fault errors on Fedora 3 and Gentoo Linux</a>
</h4>
<p>
<b>Platforms:</b> Linux
</p>
<p>
<b>Description:</b> On some Linux Distribution (for example Fedora 3) you get a segmentation fault error message running cm3
</p>
<p>
<b>Solution:</b>
Use the cm3-min-POSIX-LINUXLIBC6-d5.2.7-2005-03-31.tgz release. Previous versions of the cm3 compiler for Linux will not work on these distributions. Changes were made in m3core (tag >= devel_m3core_d2_1_13) and m3gc-enhanced (tag >= devel_m3gc-enhanced_d1_0_6).
</p>
<h3><a name="p_6">
6 Release 5.4.X</a>
</h3>
<h4><a name="p_6_1">
6.1 Segmentation violations on Linux, compile fails with PklFonts core dumping</a>
</h4>
<p>
<b>Platforms:</b> Fedora Core Linux, Ubuntu and possibly other distributions
</p>
<p>
<b>Description:</b> All Modula3 programs (including cm3 itself)
exit with a segmentation violation. The bootstrap process aborts with:
</p>
<pre>
cd ../pkl-fonts/LINUXLIBC6 && ./PklFonts > FontData.pkl
Segmentation fault (core dumped)
</pre>
<p>
<b>Solution:</b>
Set the LD_POINTER_GUARD environment
variable to 0 before running Modula3 programs, using
a command like "<tt>export LD_POINTER_GUARD=0</tt>" or equivalent.
<h4><a name="p_6_2">
6.2 Unresolved X11 libraries on NetBSD</a>
</h4>
<p>
<b>Platforms:</b> NetBSD
</p>
<p>
<b>Description:</b> Running Modula3 programs, and hence building cm3, fails due to unresolved symbols to X11 libraries. Example error message: <i>Shared object "libXaw.so.7" not found</i>
</p>
<p>
<b>Solution:</b> Add the <tt>/usr/X11R6/lib</tt> directory
to <tt>/etc/ld.so.conf</tt>.
</p>
<h4><a name="p_6_3">
6.3 Issues with /usr/bin/ld on Solaris</a>
</h4>
<p>
<b>Platforms:</b> Solaris
</p>
<p>
<b>Description:</b>
On Solaris, the 5.4 release likely needs to use the
GNU ld linker. The GNU linker is expected to be installed
as <i>/usr/local/bin/ld</i>.
This was done because there were issues
with a configure script in the gcc sources of the cm3 compiler
backend. It fails to detect linkers properly passed arguments
in GNU linker conventions to the native Solaris linker, causing the
compile to fail.
The installation program lets you decide which linker to use
for CM3 package builds, but you may run into problems if you
do not use the GNU linker.
</p>
<p>
<b>Solution:</b> Make sure that /usr/local/bin/ld is GNU ld.
</p>
<h4><a name="p_6_4">
6.4 asm/ipc.h not found on Linux</a>
</h4>
<p>
<b>Platforms:</b> Ubuntu 6.10 (edgy), possibly other distributions.
</p>
<p>
<b>Description:</b>
The compiler complains about a missing asm/ipc.h
like this:
</p>
<pre>
new source -> compiling RTVM.c
new source -> compiling sysdeps.c
../src/runtime/LINUXLIBC6/sysdeps.c:20:21: error: asm/ipc.h: No such
file or directory
compilation failed => not building library "libm3gcdefs.a"
Fatal Error: package build failed
*** execution of failed ***</pre>
<p>
<b>Solution:</b>
Frankly, asm/ipc.h is not needed to compile. It is sufficient to delete
or comment the lines 19-21 in file
m3-libs/m3gc-simple/src/runtime/LINUXLIBC6/sysdeps.c like this:
</p>
<pre>
// #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
// #include <asm/ipc.h>
// #endif
</pre>
<p>
This change has been committed to the repository, but it was too
late to be included in the 5.4.0 release.
</p>
<!--
<h4></h4>
<p>
<b>Platforms:</b> all
</p>
<p>
<b>Description:</b>
</p>
<p>
<b>Solution:</b>
</p>
-->
<hr>
<address><a href="mailto:m3-support{at}elego.de">m3-support{at}elego.de</a></address>
<!-- Created: Fri Mar 2 10:51:41 MET 2001 -->
</body>
</html>