[M3devel] New setjmp/longjmp problem.

Rodney M. Bates rodney.bates at wichita.edu
Fri Jan 12 22:21:01 CET 2007



Rodney M. Bates wrote:
> 
> 
> Tony Hosking wrote:
> 
>> Did you build with -DPTHREAD specified as an argument to cm3 when  
>> building m3core?
> 
> 
> No.  I didn't specify it myself, and the string "DPTHREAD" doesn't appear
> anywhere in the entire distribution, which is almost untouched CVS.
> 
> I will try rebuilding m3core with -DPTHREAD.

Something is missing in my setup:

rodney at runnymede:~/proj/m3/exp/format5/cm3$ rm -f LINUXLIBC6/*
rodney at runnymede:~/proj/m3/exp/format5/cm3$ cm3
--- building in LINUXLIBC6 ---

inhale test.mx
inhale /usr/local/cm3/pkg/m3core/LINUXLIBC6/libm3core.a
inhale /usr/local/cm3/pkg/libm3/LINUXLIBC6/libm3.a

new source -> compiling Format.i3
m3front ../src/Format.i3 -w1
/usr/local/cm3/bin/cm3cg -quiet Format.ic -o Format.is -fPIC -gstabs+
/usr/bin/as Format.is -o Format.io

new source -> compiling Format.m3
m3front ../src/Format.m3 -w1
"../src/Format.m3", line 65: warning: not used (LRec)
"../src/Format.m3", line 62: warning: not used (GRec)
2 warnings encountered
/usr/local/cm3/bin/cm3cg -quiet Format.mc -o Format.ms -fPIC -gstabs+
/usr/bin/as Format.ms -o Format.mo

new source -> compiling Test.m3
m3front ../src/Test.m3 -w1
/usr/local/cm3/bin/cm3cg -quiet Test.mc -o Test.ms -fPIC -gstabs+
/usr/bin/as Test.ms -o Test.mo
exhale test.mx

  -> linking test

Fatal Error: incomplete program

ThreadPosix.i3: missing object types:  _t1541f475
imported by:  WrClass.i3
rm m3make.args
cd ..
rodney at runnymede:~/proj/m3/exp/format5/cm3$

This is after recompiling m3core with cm3 -DPHTREAD and cm3 -DPHTEAD ship, with
the changes to cm3.cfg given below.

I have two versions of libpthread:

rodney at runnymede:~/proj/m3/cm3-fresh/cm3-5.4/m3-libs/m3core$ find /lib -name "*pthread*"
/lib/i686/libpthread-2.4.so
/lib/i686/libpthread.so.0
/lib/libpthread-2.4.so
/lib/libpthread.so.0
rodney at runnymede:~/proj/m3/cm3-fresh/cm3-5.4/m3-libs/m3core$ ll /lib/libpthread*
-rwxr-xr-x 1 root root 86345 Jul 24 15:20 /lib/libpthread-2.4.so
lrwxrwxrwx 1 root root    17 Sep 28 18:37 /lib/libpthread.so.0 -> libpthread-2.4.so
rodney at runnymede:~/proj/m3/cm3-fresh/cm3-5.4/m3-libs/m3core$ ll /lib/i686/libpthread*
-rw-r--r-- 1 root root 90680 Jul 24 15:20 /lib/i686/libpthread-2.4.so
lrwxrwxrwx 1 root root    17 Sep 28 18:37 /lib/i686/libpthread.so.0 -> libpthread-2.4.so

I tried both versions with the same result.  I edited my cm3.cfg to add PTHREAD to SYSTEM_LIBS:

%------------------------------------------------ external system libraries ---
% SYSTEM_LIBS provides a mapping from Modula-3 names for the common
% external libraries to site-dependent information about how they
% are accessed.  If SYSTEM_LIBS{x} is defined it should be a list
% of linker arguments that are used when linking against that library.
% If SYSTEM_LIBS{x} is not defined, the Modula-3 system will assume
% that the library is not available.

SYSTEM_LIBS = {
   "LIBC"       : [ "-lm" ],
%-- not on most Linux platforms
% "LEX-YACC"   : [ "-Xlinker", "-Bdynamic", BEGIN_CONFIG
%                    "Where are the lex/yacc libraries?"
%                      11 "libl.so"
%                      12 "/usr/lib"
%                      12 "/usr/local/lib"
%                      12 "/usr/local/gnu/lib"
%                      13 "/usr/lib"
%                  END_CONFIG, "-ll" ],
   "FLEX-BISON" : [  "-L/usr/lib", "-lfl" ],
   "POSTGRES95" : [ "-Xlinker", "-Bdynamic", "-L/usr/lib", "-lpq" ],
   "OPENGL"     : [ "-Xlinker", "-Bdynamic", "-L/usr/lib", "-lGLU", "-lGL", "-lXext" ],
   "ODBC"       : [ "-Xlinker", "-Bdynamic", "-L/usr/local/lib", "-lodbc" ],
   "MOTIF"      : [ "-Xlinker", "-Bdynamic", "-L/usr/lib", "-lXm" ],
   "X11"        : [ "-Xlinker", "-Bdynamic", "-L/usr/lib", "-lXaw", "-lXmu", "-lXext",
                         "-lXt", "-lSM", "-lICE", "-lX11" ],
   "TCP"        : [ ],
   "PTHREAD"    : [ "-Xlinker", "-Bdynamic", "-L/lib", "-lpthread" ]
}

% SYSTEM_LIBORDER defines the order in which SYSTEM_LIBS should be
% scanned by the linker.

SYSTEM_LIBORDER = [ "OPENGL", "DECPEX", "MOTIF", "X11", "TCP", "ODBC",
                     "POSTGRES95", "FLEX-BISON", "LEX-YACC", "LIBC", "PTHREAD" ]

Anybody have any clues?


-- 
-------------------------------------------------------------
Rodney M. Bates, retired assistant professor
Dept. of Computer Science, Wichita State University
Wichita, KS 67260-0083
316-978-3922
rodney.bates at wichita.edu



More information about the M3devel mailing list