Skip to content

Commit fc89b03

Browse files
authored
Merge 464467e into 60973ef
2 parents 60973ef + 464467e commit fc89b03

File tree

2 files changed

+95
-15
lines changed

2 files changed

+95
-15
lines changed

build.sunos64x64/HowToBuild

Lines changed: 94 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1517
Overview
@@ -45,16 +47,26 @@ Audio Headers
4547
The configure script will look for header files (#include) and enable
4648
the 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

5562
Make sure (before you configure and build) that header-audio is uninstalled,
5663
and 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+
5870
The header files for pulseaudio are in the pulseaudio package.
5971

6072
OpenSSL
@@ -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

8193
When running the squeak vm, after copying a Squeak .image and .change file,
8294
and 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
8597
pthread_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,
88163
by running the squeak vm in the RT (real-time) class.
89164

90165
One 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-
96167
You 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

100171
bash-4.4$ priocntl -d $$
101172
INTERACTIVE CLASS PROCESSES:
@@ -171,6 +242,15 @@ GNU Make
171242

172243
For 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+
174254
IPS Package
175255
-----------
176256

platforms/unix/plugins/SqueakSSL/openssl_overlay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
#define sqo_SSL_library_init SSL_library_init
165165
#define sqo_SSL_load_error_strings SSL_load_error_strings
166166

167-
#define sk_GENERAL_NAME_freefunc void(*)(void*)
167+
#define sk_GENERAL_NAME_freefunc void(*)(GENERAL_NAME*)
168168

169169
#endif
170170

0 commit comments

Comments
 (0)