[M3devel] "FreeBSD4" false advertising

Jay K jay.krell at cornell.edu
Tue Jul 13 12:33:46 CEST 2010


The compatibility story on FreeBSD and some uncertain others is incredibly disappointing.


When I build something on Windows 7, by default it works on older Windows systems.
The ABI doesn't change. New functions are added.
"Behavioral compability", *that* is the tricky part.
Apple does similar, but also a hybrid of the "Unix model".


Anyway, just do a cross build. It is fairly easy.
  If it is too hard, complain and suggest changes.


Get the current source on the FreeBSD 4 machine and on nearly any other machine.
   They don't actually have to be identical, I believe, because this won't be an "upgrade" but
    eventually on the target will build up the entire system from "scratch", from just cm3, no libraries,
    and cm3 no longer is tied to the libraries it is building at all (it used to be, it was bad).


The second machine should have a working cm3.
You can download a release.


cd scripts/python
./boot1.py FreeBSD4
 or 
./boot1.py I386_FREEBSD
wait a bit
you'll have cme-boot-I386_FREEBSD-timestamp.tgz or such.
Copy (scp) that to the FreeBSD 4 machine.
Extract it.
cd into it.
Maybe look at the top of Makefile.
 Sometimes it isn't quite right. Using autoconf/libtool just a bit here is a good idea for future.
make, maybe gnumake or gmake, though it is a very simple Makefile.
result is cm3 in current directory
  ./cm3
  It should say "unable to find cm3.cfg".
  If so, good, continue.
  If not, something didn't work and you'll have to investigate.
mkdir -p $HOME/cm3/bin   # or whatever
cp cm3 $HOME/cm3/bin
export PATH=$HOME/cm3/bin:$PATH
cd scripts/python
./boot2.sh
wait a while, a while 


result should be a working system, that built itself as well (look at boot2.sh)


http://modula3.elegosoft.com/cm3/uploaded-archives/index.html
You should be able to start from here:
http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-boot-FreeBSD4-1.tar.gz
or, er...here
http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-boot-FreeBSD4-1-userthreads.tar.gz


Does FreeBSD4 have any sort of pthreads?
If not, in the above instructions, you will need to make an edit in m3-libs/m3core/src/thread.quake.
In the current tree, it looks pretty obvious what to do, since it is here that OpenBSD is pointed at user threads.


In head,  I have added support and significantly tested a bunch of "fixed names":
  I386_LINUX, I386_FREEBSD, I386_NETBSD, I386_NT, I386_CYGWIN, I386_MINGW.
Did I miss any? These are good names, right? esp. the last three?


The one lagging point though is what to do about "SPARC32_SOLARIS".
I think probably use cc by default but make swtiching to gcc just be a one line change in the config file.
Maybe provide config files SPARC32_SOLARIS and SPARC32_SOLARIS_gcc.
 But they'd have the same TARGET and BUILD_DIR: SPARC32_SOLARIS.
And maybe it should be SPARC_SOLARIS.


 - Jay

----------------------------------------
> To: wagner at elegosoft.com
> Date: Tue, 13 Jul 2010 02:20:43 -0700
> From: mika at async.async.caltech.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] "FreeBSD4" false advertising
>
> Olaf Wagner writes:
> ...
> >FreeBSD 4.x and later: cm3-min-POSIX-FreeBSD4-d5.5.0.tgz
> >(built on FreeBSD 4.11 i686) at
> >
> > http://www.modula3.com/cm3/cm3-min-POSIX-FreeBSD4-d5.5.0.tgz
> >
> >This could be used together with the upgrade.sh script to built the
> >5.8 release sources.
> >
> >> I have the following on a bona fide FreeBSD 4.11-RELEASE system:
> >>
> >> (62)trs80:~>cm3 -version
> >> Critical Mass Modula-3 version d0.0.0
> >> last updated: unknown
> >> compiled: 2009-04-25 02:28:01
> >> configuration: /usr/local/cm3/bin/cm3.cfg
> >
> >As the version string is actually undefined, this doesn't tell us very =20
> >much :-(
>
> Olaf, I'm pretty sure that release archive is a tarred up version of my
> system. (I built it on this machine!)
>
> How do I use upgrade.sh? I've been doing things manually following Tony's
> recommendations from a few years ago and that doesn't work.
>
> Well I'll try the obvious thing :-)
>
> Mika
 		 	   		  


More information about the M3devel mailing list