Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build.sunos32x86 and build.sunos64x64 directories
- Loading branch information
Showing
14 changed files
with
507 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
See the file ../build.sunos64x64 "HowToBuild" for Solaris (SunOS) Notes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
case "`uname -m`" in # ensure we see x86 as machine type | ||
i86pc) ;; # we're good | ||
*) if type i386 2>&1 >/dev/null; then | ||
echo "Re-exec as x86" | ||
exec i386 "$0" "$@" | ||
fi ;; | ||
esac | ||
# Spur VM with VM profiler and threaded heartbeat | ||
MAKE=/usr/bin/gmake | ||
INSTALLDIR=sqcogspursunosht/usr | ||
# Some gcc versions create a broken VM using -O2 | ||
OPT="-g -DNDEBUG -DDEBUGVM=0" | ||
|
||
if [ $# -ge 1 ]; then | ||
INSTALLDIR="$1"; shift | ||
fi | ||
|
||
if ../../../scripts/checkSCCSversion ; then exit 1; fi | ||
echo -n "clean? " | ||
read a | ||
case $a in | ||
n|no|N|NO) echo "ok but this isn't safe!!";; | ||
*) test -f Makefile && $MAKE reallyclean | ||
esac | ||
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) | ||
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) | ||
test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \ | ||
--with-vmversion=5.0 \ | ||
--disable-dynamicopenssl \ | ||
--with-src=spursrc \ | ||
TARGET_ARCH="-m32" \ | ||
CFLAGS="$OPT -DCOGMTVM=0" | ||
rm -f vm/sqUnixMain.o # nuke version info | ||
rm -rf ../../../products/$INSTALLDIR | ||
# prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` | ||
# but older linux readlinks lack the -f flag | ||
$MAKE install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copied, perhaps edited, from ../../src/examplePlugins.ext | ||
EXTERNAL_PLUGINS = \ | ||
MIDIPlugin \ | ||
B3DAcceleratorPlugin \ | ||
BochsIA32Plugin \ | ||
BochsX64Plugin \ | ||
GdbARMPlugin \ | ||
FileAttributesPlugin \ | ||
Squeak3D \ | ||
SqueakFFIPrims \ | ||
SqueakSSL \ | ||
LocalePlugin \ | ||
UnicodePlugin \ | ||
UnixOSProcessPlugin \ | ||
UUIDPlugin \ | ||
ImmX11Plugin \ | ||
XDisplayControlPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copied, perhaps edited, from ../../src/examplePlugins.int | ||
INTERNAL_PLUGINS = \ | ||
ADPCMCodecPlugin \ | ||
AioPlugin \ | ||
AsynchFilePlugin \ | ||
B2DPlugin \ | ||
BitBltPlugin \ | ||
BMPReadWriterPlugin \ | ||
CroquetPlugin \ | ||
HostWindowPlugin \ | ||
ZipPlugin \ | ||
DropPlugin \ | ||
DSAPrims \ | ||
FFTPlugin \ | ||
FileCopyPlugin \ | ||
FilePlugin \ | ||
FloatArrayPlugin \ | ||
FloatMathPlugin \ | ||
IA32ABI \ | ||
JoystickTabletPlugin \ | ||
JPEGReaderPlugin \ | ||
JPEGReadWriter2Plugin \ | ||
Klatt \ | ||
LargeIntegers \ | ||
Matrix2x3Plugin \ | ||
MiscPrimitivePlugin \ | ||
Mpeg3Plugin \ | ||
RePlugin \ | ||
SecurityPlugin \ | ||
SerialPlugin \ | ||
SocketPlugin \ | ||
SoundCodecPrims \ | ||
SoundGenerationPlugin \ | ||
SoundPlugin \ | ||
StarSqueakPlugin \ | ||
SurfacePlugin \ | ||
VMProfileLinuxSupportPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
case "`uname -m`" in # ensure we see x86 as machine type | ||
i86pc) ;; # we're good | ||
*) if type i386 2>&1 >/dev/null; then | ||
echo "Re-exec as x86" | ||
exec i386 "$0" "$@" | ||
fi ;; | ||
esac | ||
# Stack Spur VM with VM profiler and threaded heartbeat | ||
INSTALLDIR=sqstkspursunosht/usr | ||
# Some gcc versions create a broken VM using -O2 | ||
OPT="-g -DNDEBUG -DDEBUGVM=0" | ||
MAKE=/usr/bin/gmake | ||
|
||
if [ $# -ge 1 ]; then | ||
INSTALLDIR="$1"; shift | ||
fi | ||
if ../../../scripts/checkSCCSversion ; then exit 1; fi | ||
echo -n "clean? " | ||
read a | ||
case $a in | ||
n|no|N|NO) echo "ok but this isn't safe!!";; | ||
*) rm -f config.h; test -f Makefile && $MAKE reallyclean | ||
esac | ||
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) | ||
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) | ||
test -f config.h || ../../../platforms/unix/config/configure \ | ||
--with-vmversion=5.0 \ | ||
--disable-dynamicopenssl \ | ||
--with-src=spurstacksrc --disable-cogit \ | ||
--without-vm-display-fbdev --without-npsqueak \ | ||
TARGET_ARCH="-m32" \ | ||
ac_cv_cflags_warn_all="-v" \ | ||
CFLAGS="$OPT" | ||
rm -f vm/sqUnixMain.o # nuke version info | ||
rm -rf ../../../products/$INSTALLDIR | ||
# prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` | ||
# but older linux readlinks lack the -f flag | ||
$MAKE install-squeak install-doc install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copied, perhaps edited, from ../../src/examplePlugins.ext | ||
EXTERNAL_PLUGINS = \ | ||
MIDIPlugin \ | ||
B3DAcceleratorPlugin \ | ||
FileAttributesPlugin \ | ||
Squeak3D \ | ||
SqueakFFIPrims \ | ||
SqueakSSL \ | ||
LocalePlugin \ | ||
UnicodePlugin \ | ||
UnixOSProcessPlugin \ | ||
UUIDPlugin \ | ||
ImmX11Plugin \ | ||
XDisplayControlPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copied, perhaps edited, from ../../src/examplePlugins.int | ||
INTERNAL_PLUGINS = \ | ||
ADPCMCodecPlugin \ | ||
AioPlugin \ | ||
AsynchFilePlugin \ | ||
B2DPlugin \ | ||
BitBltPlugin \ | ||
BMPReadWriterPlugin \ | ||
CroquetPlugin \ | ||
HostWindowPlugin \ | ||
ZipPlugin \ | ||
DropPlugin \ | ||
DSAPrims \ | ||
FFTPlugin \ | ||
FileCopyPlugin \ | ||
FilePlugin \ | ||
FloatArrayPlugin \ | ||
FloatMathPlugin \ | ||
IA32ABI \ | ||
JoystickTabletPlugin \ | ||
JPEGReaderPlugin \ | ||
JPEGReadWriter2Plugin \ | ||
Klatt \ | ||
LargeIntegers \ | ||
Matrix2x3Plugin \ | ||
MiscPrimitivePlugin \ | ||
Mpeg3Plugin \ | ||
RePlugin \ | ||
SecurityPlugin \ | ||
SerialPlugin \ | ||
SocketPlugin \ | ||
SoundCodecPrims \ | ||
SoundGenerationPlugin \ | ||
SoundPlugin \ | ||
StarSqueakPlugin \ | ||
SurfacePlugin \ | ||
VMProfileLinuxSupportPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
|
||
How To Build On Solaris | ||
----------------------- | ||
|
||
Contents: | ||
- Overview | ||
- Real-Time | ||
- Swapspace | ||
- C Compiler | ||
- GNU make | ||
- IPS package | ||
|
||
Overview | ||
-------- | ||
|
||
These are some notes on building the OpenSmalltalk VM on Oracle Solaris 11. | ||
|
||
For some history on this operating system, see | ||
https://en.wikipedia.org/wiki/Solaris_(operating_system) | ||
|
||
On Solaris "uname -s" reports the value "SunOS". | ||
|
||
To build, | ||
|
||
scripts/updateSCCSVersions | ||
cd build.sunos64x64 (or cd build.sunos32x86) | ||
cd squeak.cog.spur (or cd squeak.stack.spur) | ||
cd build | ||
./mvm or ./mvm INSTALLDIR | ||
|
||
This will build and install into INSTALLDIR. | ||
The default value for INSTALLDIR is products/sqcogspur64sunos[ht]/usr, | ||
for the Cog Spur VM (see other values in the mvm scripts). | ||
|
||
To run the vm, consider running the process in the RT (real-time) class. | ||
|
||
For Solaris specific suggestions you can contact me (David Stes) | ||
or alternatively (and maybe better!) the OpenSmalltalk team ... | ||
|
||
Real-Time | ||
--------- | ||
|
||
When running the squeak vm, after copying a Squeak .image and .change file, | ||
and after copying the Squeak Smalltalk source file (SqueakV50.sources). | ||
|
||
bash-4.4$ bin/squeak Squeak6.0alpha-19547-32bit.image | ||
pthread_setschedparam failed: Not owner | ||
|
||
Note that it is possible to suppress the "pthread_setschedparam" warning, | ||
by running the squeak vm in the RT (real-time) class. | ||
|
||
One way would be to use priocntl -e and execute the squeak in the -c RT class. | ||
|
||
Or perhaps at the "authorization" (auths) level it could perhaps | ||
be possible to have an entry in /etc/security/exec_attr.d for | ||
an authorization that gives "proc_priocntl" to squeak. | ||
|
||
You must do this as "root". | ||
|
||
Another way is to change a "bash" shell to RT class, | ||
|
||
bash-4.4$ priocntl -d $$ | ||
INTERACTIVE CLASS PROCESSES: | ||
PID[/LWP] IAUPRILIM IAUPRI IAMODE | ||
4026 0 0 1 | ||
|
||
bash-4.4$ sudo priocntl -c RT -p 0 -s $$ | ||
|
||
bash-4.4$ priocntl -d $$ | ||
REAL TIME PROCESSES: | ||
PID[/LWP] RTPRI TQNTM TQSIG | ||
3966 0 1000 0 | ||
|
||
After changing the "bash" shell to the RT class, you can launch | ||
|
||
bash-4.4$ bin/squeak Squeak6.0alpha-19547-32bit.image | ||
|
||
It will inherit the RT class and the pthread_setschedparam warning is gone. | ||
|
||
Verify as follows the squeak threads (LWP light-weight processes) | ||
|
||
bash-4.4$ ps -eLo pid,pri,lwp,class,comm | grep squeak | ||
4029 100 1 RT bin/../lib/squeak/5.0-202003240214-solaris/squeak | ||
4029 101 2 RT bin/../lib/squeak/5.0-202003240214-solaris/squeak | ||
|
||
Note that one thread is running in priority 101 and another in priority 100. | ||
|
||
Swapspace | ||
--------- | ||
|
||
It's not certain that the following notes apply, it depends on how much | ||
RAM you have in your machine(s) ... | ||
|
||
But make sure that there is sufficient free space in /tmp, | ||
mounted on swap in Solaris. | ||
|
||
The C compiler may use a lot of space for temporary files under /tmp. | ||
|
||
For example (the example 8G is what I use) : | ||
|
||
$ df -h /tmp | ||
Filesystem Size Used Available Capacity Mounted on | ||
swap 8.2G 78M 8.1G 1% /tmp | ||
|
||
If required, increase the "volsize" of the rpool/swap volume : | ||
|
||
# zfs get volsize rpool/swap | ||
NAME PROPERTY VALUE SOURCE | ||
rpool/swap volsize 8G local | ||
|
||
The command to increase the size is: | ||
|
||
# zpool list rpool (check FREE space) | ||
# zfs set volsize=8G rpool/swap | ||
|
||
This can be done online, but a reboot is not a bad idea after doing this. | ||
|
||
C Compiler | ||
---------- | ||
|
||
As C compiler we have used both the Sun C compiler and GCC for Solaris. | ||
Currently we have succesfully built the VM with gcc 7.3 and gcc 9.2. | ||
|
||
Note that in the past Squeak3 was available on SunOS for SPARC and Intel. | ||
|
||
http://squeakvm.org/unix/release/Squeak-3.7-7.sparc-sun-solaris2.9.tar.gz | ||
http://squeakvm.org/unix/release/Squeak-3.7-7.i386-pc-solaris2.9.tar.gz | ||
|
||
It appears that those old Squeak V3 VM's were built with "gcc" for Solaris. | ||
|
||
GNU Make | ||
-------- | ||
|
||
For the Makefiles, pkg:/developer/build/gnu-make must be installed. | ||
|
||
IPS Package | ||
----------- | ||
|
||
There exists an IPS (Solaris Image Packaging System) package for squeak. | ||
|
||
That's the easiest way to get a Squeak VM to run Squeak images, | ||
instead of compiling yourself. | ||
|
||
That package is available in the "solaris-userland" . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
# Spur VM with VM profiler and threaded heartbeat | ||
INSTALLDIR=sqcogspur64sunosht/usr | ||
# Some gcc versions create a broken VM using -O2 | ||
OPT="-g -DNDEBUG -DDEBUGVM=0" | ||
MAKE=/usr/bin/gmake | ||
|
||
CFLAGS="$OPT -DCOGMTVM=0" | ||
LIBS="" | ||
LDFLAGS="" | ||
|
||
if [ $# -ge 1 ]; then | ||
INSTALLDIR="$1"; shift | ||
fi | ||
|
||
if ../../../scripts/checkSCCSversion ; then exit 1; fi | ||
echo -n "clean? " | ||
read a | ||
case $a in | ||
n|no|N|NO) echo "ok but this isn't safe!!";; | ||
*) test -f Makefile && $MAKE reallyclean | ||
esac | ||
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .) | ||
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .) | ||
test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \ | ||
--with-vmversion=5.0 \ | ||
--disable-dynamicopenssl \ | ||
--with-src=spur64src \ | ||
TARGET_ARCH="-m64" \ | ||
CFLAGS="$CFLAGS" \ | ||
LIBS="$LIBS" \ | ||
LDFLAGS="$LDFLAGS" | ||
rm -f vm/sqUnixMain.o # nuke version info | ||
rm -rf ../../../products/$INSTALLDIR | ||
# prefer $MAKE install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` | ||
# but older linux readlinks lack the -f flag | ||
$MAKE install-squeak install-doc install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copied, perhaps edited, from ../../src/examplePlugins.ext | ||
EXTERNAL_PLUGINS = \ | ||
MIDIPlugin \ | ||
B3DAcceleratorPlugin \ | ||
BochsIA32Plugin \ | ||
BochsX64Plugin \ | ||
GdbARMPlugin \ | ||
FileAttributesPlugin \ | ||
Squeak3D \ | ||
SqueakFFIPrims \ | ||
SqueakSSL \ | ||
LocalePlugin \ | ||
UnicodePlugin \ | ||
UnixOSProcessPlugin \ | ||
UUIDPlugin \ | ||
ImmX11Plugin \ | ||
XDisplayControlPlugin |
Oops, something went wrong.