@@ -6,10 +6,12 @@ Contents:
66 - Overview
77 - Audio Headers
88 - OpenSSL
9- - Real-Time
9+ - Squeak Profile
10+ - Real-Time Class
1011 - Swapspace
1112 - C Compiler
1213 - GNU make
14+ - pkg-config
1315 - IPS package
1416
1517Overview
@@ -45,16 +47,26 @@ Audio Headers
4547The configure script will look for header files (#include) and enable
4648the build of some sound plugins, depending on what it finds.
4749
48- Personally I like the "pulse" server supported by the "vm-sound-pulse" plugin.
50+ For example it will check for /usr/include/sys/soundcard.h,
51+ and /usr/include/sys/audio/audio_oss.h.
4952
50- Make sure that you *uninstall* the audio headers :
53+ You can find out which package installs that header file as follows :
5154
52- # pkg list -a system/header/header-audio
53- # pkg list -a library/audio/pulseaudio
55+ # pkg search /usr/include/sys/audio/audio_oss.h
56+
57+ Personally I like the "pulse" server supported by the "vm-sound-pulse" plugin.
58+
59+ In some cases, the audio header files are in a separate package header-audio,
60+ which is not strictly needed because the PulseAudio server is sufficient.
5461
5562Make sure (before you configure and build) that header-audio is uninstalled,
5663and that pulseaudio is installed.
5764
65+ You can see whether the audio headers are installed as follows :
66+
67+ # pkg list -a system/header/header-audio
68+ # pkg list -a library/audio/pulseaudio
69+
5870The header files for pulseaudio are in the pulseaudio package.
5971
6072OpenSSL
@@ -75,27 +87,86 @@ In order to avoid this problem, we build the VM with the option:
7587
7688 --without-libtls
7789
78- Real-Time
79- ---------
90+ Squeak Profile
91+ --------------
8092
8193When running the squeak vm, after copying a Squeak .image and .change file,
8294and after copying the Squeak Smalltalk source file (SqueakV50.sources).
8395
84- bash-4.4 $ bin/squeak Squeak6.0alpha-19547-32bit.image
96+ $ bin/squeak Squeak6.0alpha-19547-32bit.image
8597pthread_setschedparam failed: Not owner
98+ ...
99+
100+ This indicates that the process does not have the necessary "privilege".
101+
102+ It is possible to get rid of this warning and run squeak as follows:
103+
104+ $ pfexec squeak Squeak6.0alpha-19547-32bit.image
105+
106+ without warning. This is a Solaris pfexec "execute squeak in a profile".
107+
108+ To do this, add profile "Squeak":
109+
110+ # profiles -p Squeak
111+ profiles:Squeak> set desc="Allow Squeak VM to Set Priority"
112+ profiles:Squeak> add cmd=/usr/bin/squeak
113+ profiles:Squeak:squeak> set privs=proc_priocntl
114+ profiles:Squeak:squeak> end
115+ profiles:Squeak> commit
116+ profiles:Squeak> info
117+ name=Squeak
118+ desc=Allow Squeak VM to Set Priority
119+ cmd=/usr/bin/squeak
120+ profiles:Squeak> exit
121+
122+ The above commands adds the following entries to /etc/security :
123+
124+ # tail /etc/security/exec_attr
125+ Squeak:solaris:cmd:::/usr/bin/squeak:privs=proc_priocntl
126+
127+ # tail /etc/security/prof_attr
128+ Squeak:::Allow Squeak VM to Set Priority:
86129
87- Note that it is possible to suppress the "pthread_setschedparam" warning,
130+ Once the profile is created, you can assign the profile to a user:
131+
132+ $ cp /etc/user_attr /etc/user_attr.backup
133+ $ usermod -P Squeak someuser
134+
135+ This changes the file /etc/user_attr; you can also edit /etc/user_attr.
136+
137+ The user can verify that the profile is available:
138+
139+ $ userattr profiles
140+ Squeak,System Administrator
141+
142+ Finally the following two pfexec usages both (!) require the Squeak profile to exist. So the second form with -P proc_priocntl as argument to pfexec only works if proc_priocntl is in the "intersection of the available profiles and proc_prioctnl". So it's not enough to simply pfexec -P proc_prioctnl the squeak vm, it is necessary that the root user assigns the Squeak profile to the user.
143+
144+ $ pfexec squeak Cuis5.0-4112.image
145+
146+ $ pfexec -P proc_priocntl squeak Cuis5.0-4112.image
147+
148+ Verify as follows the squeak threads (LWP light-weight processes)
149+
150+ $ ps -eLo pid,pri,lwp,class,comm | grep squeak
151+ 3849 44 1 IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
152+ 3849 49 2 IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
153+ 3849 49 3 IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
154+ 3849 50 4 IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
155+
156+ Note that there are 4 threads (LWP) and they are in the schedule class IA;
157+ the last thread is running at priority 50 (the others at 49).
158+
159+ Real-Time Class
160+ ---------------
161+
162+ Note that it is also possible to suppress the "pthread_setschedparam" warning,
88163by running the squeak vm in the RT (real-time) class.
89164
90165One way would be to use priocntl -e and execute the squeak in the -c RT class.
91166
92- Or perhaps at the "authorization" (auths) level it could perhaps
93- be possible to have an entry in /etc/security/exec_attr.d for
94- an authorization that gives "proc_priocntl" to squeak.
95-
96167You must do this as "root".
97168
98- Another way is to change a "bash" shell to RT class,
169+ You can change a "bash" shell to RT class,
99170
100171bash-4.4$ priocntl -d $$
101172INTERACTIVE CLASS PROCESSES:
@@ -171,6 +242,15 @@ GNU Make
171242
172243For the Makefiles, pkg:/developer/build/gnu-make must be installed.
173244
245+ pkg-config
246+ ----------
247+
248+ The configure script uses the pkg-config tool for some plugins.
249+
250+ Be sure to install it:
251+
252+ pkg install developer/build/pkg-config
253+
174254IPS Package
175255-----------
176256
0 commit comments