source: general/prog/ruby.xml@ befaca1c

12.1 12.2 gimp3 ken/TL2024 lazarus rahul/power-profiles-daemon trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since befaca1c was 77b45595, checked in by Xi Ruoyao <xry111@…>, 8 months ago

ruby: Don't use Glibc qsort_r

The first adaption for Glibc-2.39!

  • Property mode set to 100644
File size: 11.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY ruby-download-http "https://cache.ruby-lang.org/pub/ruby/&ruby-minor-version;/ruby-&ruby-version;.tar.xz">
8 <!ENTITY ruby-download-ftp " ">
9 <!ENTITY ruby-md5sum "b5e59d56faf25b1ec6445abdf203affa">
10 <!ENTITY ruby-size "16 MB">
11 <!ENTITY ruby-buildsize "774 MB (with tests and C API docs)">
12 <!ENTITY ruby-time "3.4 SBU (using parallelism=4; with tests and C API docs)">
13]>
14
15<sect1 id="ruby" xreflabel="Ruby-&ruby-version;">
16 <?dbhtml filename="ruby.html"?>
17
18
19 <title>Ruby-&ruby-version;</title>
20
21 <indexterm zone="ruby">
22 <primary sortas="a-Ruby">Ruby</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Ruby</title>
27
28 <para>
29 The <application>Ruby</application> package contains the
30 <application>Ruby</application> development environment. This
31 is useful for object-oriented scripting.
32 </para>
33
34 &lfs120_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&ruby-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&ruby-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &ruby-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &ruby-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &ruby-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &ruby-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">Ruby Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Required</bridgehead>
73 <para role="required">
74 <xref linkend="libyaml"/>
75 </para>
76
77 <bridgehead renderas="sect4">Optional</bridgehead>
78 <para role="optional">
79 <xref linkend="doxygen"/>,
80 <xref linkend="graphviz"/>,
81 <xref linkend="rust"/>,
82 <xref linkend="tk"/>,
83 <xref linkend="valgrind"/>,
84 &berkeley-db; and
85 <ulink url="http://dtrace.org/blogs/about/">DTrace</ulink>
86 </para>
87
88 </sect2>
89
90 <sect2 role="installation">
91 <title>Installation of Ruby</title>
92
93 <para>
94 Install <application>Ruby</application> by running the following
95 command:
96 </para>
97
98<screen><userinput>./configure --prefix=/usr \
99 --disable-rpath \
100 --enable-shared \
101 --without-valgrind \
102 --without-baseruby \
103 ac_cv_func_qsort_r=no \
104 --docdir=/usr/share/doc/ruby-&ruby-version; &amp;&amp;
105make</userinput></screen>
106
107 <para>
108 Optionally, build the CAPI documents by running the following
109 commands:
110 </para>
111
112<screen><userinput>make capi</userinput></screen>
113
114 <para>
115 To test the results, issue: <command>make -j1 -k check</command>.
116 Note that running the test suite with parallel jobs may cause test
117 failures outputted as cryptic <computeroutput>unknown
118 object</computeroutput> messages, resulting a summary falsely claiming
119 <quote>all tests passed</quote>. If the environment has variables
120 related to proxy settings (<envar>all_proxy</envar>,
121 <envar>ALL_PROXY</envar>, <envar>http_proxy</envar>, and etc.) set,
122 the test suite will bail out early with messages like
123 <computeroutput>net/ftp is not found</computeroutput>. So make sure
124 unsetting them for the test suite. There are over 26,000 tests.
125 <!-- https://bugs.ruby-lang.org/issues/20106 -->
126 12 tests are known to fail because of expired certificates in the
127 test data. Some tests related to ipv6 may indicate errors. If the
128 tests are run in a directory that has a world writable component (e.g.
129 /tmp) then several additional tests may fail.
130 </para>
131
132 <para>
133 Now, as the <systemitem class="username">root</systemitem> user:
134 </para>
135
136<screen role="root"><userinput>make install</userinput></screen>
137
138 <note>
139 <para>
140 If you have Ruby-On-Rails applications installed and did an
141 upgrade of <application>Ruby</application> by installing this
142 package, you might need to run an update there, too
143 (as the &root; user):
144 </para>
145
146<screen role="nodump"><userinput>cd /path/to/web/app
147bundle update rake</userinput></screen>
148
149 <para>
150 and restart the webserver which serves the application.
151 </para>
152
153 </note>
154
155 </sect2>
156
157 <sect2 role="commands">
158 <title>Command Explanations</title>
159
160 <para>
161 <parameter>--disable-rpath</parameter>: This switch disables embedding
162 <filename class='directory'>/usr/lib</filename> as a library search
163 path into the <command>ruby</command> program. Doing so is not needed
164 (because <filename class='directory'>/usr/lib</filename> is a system
165 library path) and it may cause the test suite running with the system
166 <filename class='libraryfile'>libruby.so</filename> instead of the
167 just built one when Ruby has been installed.
168 </para>
169
170 <para>
171 <parameter>--enable-shared</parameter>: This switch enables building
172 the <filename class="libraryfile">libruby</filename> shared library.
173 </para>
174
175 <para>
176 <parameter>--without-baseruby</parameter>: This switch prevents using the
177 system <command>ruby</command> if it is already installed. The build
178 system will use the newly built version instead.
179 </para>
180
181 <para>
182 <parameter>ac_cv_func_qsort_r=no</parameter>: This switch prevents
183 using the <function>qsort_r</function> function from Glibc. Ruby
184 makes some aggressive optimization assuming
185 <function>qsort_r</function> would never allocate the buffer with
186 <function>malloc</function>, but the assumption is no longer true with
187 Glibc-2.39 or newer. With this switch Ruby will use its own sort
188 implementation instead.
189 </para>
190
191 <para>
192 <option>--disable-install-doc</option>: This switch disables building and
193 installing rdoc indexes and C API documents.
194 </para>
195
196 <para>
197 <option>--disable-install-rdoc</option>: This switch disables building
198 and installing rdoc indexes.
199 </para>
200
201 <para>
202 <option>--disable-install-capi</option>: This switch disables building
203 and installing C API documents.
204 </para>
205
206 </sect2>
207
208 <sect2 role="content">
209 <title>Contents</title>
210
211 <segmentedlist>
212 <segtitle>Installed Programs</segtitle>
213 <segtitle>Installed Libraries</segtitle>
214 <segtitle>Installed Directories</segtitle>
215
216 <seglistitem>
217 <seg>
218 bundle,
219 bundler,
220 erb,
221 gem,
222 irb,
223 racc,
224 rake,
225 rbs,
226 rdbg,
227 rdoc,
228 ri,
229 ruby, and
230 typeprof
231 </seg>
232 <seg>
233 libruby.so
234 </seg>
235 <seg>
236 /usr/include/ruby-&ruby-minor-version;.0,
237 /usr/lib/ruby,
238 /usr/share/doc/ruby-&ruby-version; and
239 /usr/share/ri
240 </seg>
241 </seglistitem>
242 </segmentedlist>
243
244 <variablelist>
245 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
246 <?dbfo list-presentation="list"?>
247 <?dbhtml list-presentation="table"?>
248
249 <varlistentry id="bundle">
250 <term><command>bundle</command></term>
251 <listitem>
252 <para>
253 creates bundles of Ruby Gems
254 </para>
255 <indexterm zone="ruby bundle">
256 <primary sortas="b-bundle">bundle</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 <varlistentry id="bundler">
262 <term><command>bundler</command></term>
263 <listitem>
264 <para>
265 manages an application's dependencies throughout it's lifecycle
266 </para>
267 <indexterm zone="ruby bundler">
268 <primary sortas="b-bundler">bundler</primary>
269 </indexterm>
270 </listitem>
271 </varlistentry>
272
273 <varlistentry id="erb">
274 <term><command>erb</command></term>
275 <listitem>
276 <para>
277 is a command line front-end for eRuby, which provides a templating
278 system for <application>Ruby</application>
279 </para>
280 <indexterm zone="ruby erb">
281 <primary sortas="b-erb">erb</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="gem">
287 <term><command>gem</command></term>
288 <listitem>
289 <para>
290 is the command for RubyGems, which is a sophisticated package
291 manager for <application>Ruby</application>. This is similar
292 to Python's 'pip' command
293 </para>
294 <indexterm zone="ruby gem">
295 <primary sortas="b-gem">gem</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="irb">
301 <term><command>irb</command></term>
302 <listitem>
303 <para>
304 is the interactive interface for
305 <application>Ruby</application>
306 </para>
307 <indexterm zone="ruby irb">
308 <primary sortas="b-irb">irb</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="rake">
314 <term><command>rake</command></term>
315 <listitem>
316 <para>
317 is a make-like build utility for <application>Ruby</application>
318 </para>
319 <indexterm zone="ruby rake">
320 <primary sortas="b-rake">rake</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="rdbg">
326 <term><command>rdbg</command></term>
327 <listitem>
328 <para>
329 is an interactive debugger for <application>Ruby</application>
330 </para>
331 <indexterm zone="ruby rdbg">
332 <primary sortas="b-rdbg">rdbg</primary>
333 </indexterm>
334 </listitem>
335 </varlistentry>
336
337 <varlistentry id="rdoc">
338 <term><command>rdoc</command></term>
339 <listitem>
340 <para>
341 generates <application>Ruby</application> documentation
342 </para>
343 <indexterm zone="ruby rdoc">
344 <primary sortas="b-rdoc">rdoc</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 <varlistentry id="ri">
350 <term><command>ri</command></term>
351 <listitem>
352 <para>
353 displays documentation from a database on
354 <application>Ruby</application> classes, modules, and methods
355 </para>
356 <indexterm zone="ruby ri">
357 <primary sortas="b-ri">ri</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="ruby-prog">
363 <term><command>ruby</command></term>
364 <listitem>
365 <para>
366 is an interpreted scripting language for quick
367 and easy object-oriented programming
368 </para>
369 <indexterm zone="ruby ruby-prog">
370 <primary sortas="b-ruby">ruby</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
375 <varlistentry id="libruby">
376 <term><filename role="libraryfile">libruby.so</filename></term>
377 <listitem>
378 <para>
379 contains the API functions required by <application>Ruby</application>
380 </para>
381 <indexterm zone="ruby libruby">
382 <primary sortas="c-libruby">libruby.so</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
387 </variablelist>
388
389 </sect2>
390
391</sect1>
Note: See TracBrowser for help on using the repository browser.