?? make.htm
字號:
! get_secondary_mem (x, mode, opnum, type);
#endif
}
</pre></font>
</ul>
<h3><a name="Apollo"></a>H-P Apollo</h3>
<p><ul>
<li>You must run the compiler in ANSI-compatible mode (that is, set <b><tt>AK=</tt></b>{null string} in the makefile); otherwise it gives incorrect error
messages for any function declared as returning a float value.
<li>The H-P Apollo compiler may not compile Ghostscript correctly. If you
get unexpected crashes at run time, use gcc.
</ul>
<h3><a name="ATT_7040"></a>AT&T 7040 R3</h3>
<p><ul>
<li>If Ghostscript crashes on startup, recompile with <b><tt>-O0</tt></b>
to work around compiler bugs.
</ul>
<h3><a name="Convex"></a>Convex</h3>
<p><ul>
<li>Use <b><tt>unixansi.mak</tt></b>. Do not invoke optimization
(<b><tt>-O1</tt></b>) because the compiler will produce incorrect code.
<li>Set <b><tt>CFLAGS</tt></b> to
"<b><tt>-no -fn -tm c1</tt></b>".
</ul>
<h3><a name="DECStations"></a>DECStations with Ultrix</h3>
<p><ul>
<li>If you get the compiler message "cfe: Fatal: _temp_19086.c:
Segmentation violation" or a similar one, try compiling with the
<b><tt>-oldc</tt></b> switch.
<li>You may wish to set
<p>
<b><tt>GS_LIB_DEFAULT=$(gsdatadir):/usr/lib/DPS/outline/decwin:$(gsdatadir)/fonts</tt></b>
<p>
in the makefile to add the Display PostScript font directory to the font
search path.
<li>Set
<p>
<b><tt>CFLAGS="-Olimit 2500"</tt></b>
<p>
to make the optimizer allocate enough table space.
<li>The Ultrix 4.4 C compiler compiles <b><tt>gdevm1.c</tt></b>
incorrectly. Insert the following line in the makefile rule for
"<b><tt>gdevm1.$(OBJ)</tt></b>" (the body of the rule is empty in the
standard distribution):
<p>
<b><tt>$(CCC) -oldc gdevm1.c</tt></b>
</ul>
<h3><a name="Digital_Unix"></a>Digital Unix (Alpha)</h3>
<p><ul>
<li>Use <b><tt>unixansi.mak</tt></b> for all Digital Unix compilers.
<li>For versions of Digital Unix before 4.0, set
<p>
<b><tt>CFLAGS=-std -migrate -Olimit 1000 -g3 -O2 $(XCFLAGS)<br>
LDFLAGS=-lots $(XLDFLAGS)</tt></b>
<p>
You may be able to omit <b><tt>-g3</tt></b>. For later versions of Digital
Unix, users have reported that the proper flags are
<p>
<b><tt>CFLAGS=-std1 -Olimit 1000 -g3 -O2 $(XCFLAGS)</tt></b>
<p>
again, optionally omitting the <b><tt>-g3</tt></b>.
</ul>
<h3><a name="HP_RISC"></a>H-P RISC workstations</h3>
<p><ul>
<li>Ghostscript builds on H-P machines with either GNU gcc or H-P's
ANSI-capable <b><tt>cc</tt></b>. The minimal, non-ANSI-capable
<b><tt>cc</tt></b> that ships with a basic HPUX system does <b><em>not</em></b>
work. If <b><tt>cc</tt></b> on your system doesn't accept the
<b><tt>-Aa</tt></b> switch, then you need to get the full
<b><tt>cc</tt></b> or gcc.
<li>If you use H-P's compiler, be sure you have upgraded to a recent
release. Many bizarre symptoms have been reported trying to build
Ghostscript with older, buggier compilers, for example:
<ul>
<li>The link step fails with a message about "<b><tt>max</tt></b>" not being defined.
<li>The build succeeds, but the resulting executable fails to start up,
with an error message like "Initializing... Unrecoverable error: typecheck
in .registerencoding".
<li>The build succeeds, but the resulting executable produces a black
background on the first page of output.
</ul>
<li>It is reported that On HPUX 9.* you need at least compiler patch
PHSS_5723 and dld.sl patch PHSS_5734 to build Ghostscript. (As of late
1997, those patches are long obsolete; the current patches are compiler
PHSS_10357 and dld.sl PHSS_11246. It is unknown whether current
Ghostscript releases work with compiler/dld.sl versions older than these.)
<li>On HPUX 10.*, we don't know what combinations of compiler version and
switches work. It is reported that On HPUX 10.20, setting
"<b><tt>CC=c89</tt></b>" and "<b><tt>CFLAGS=+O3 $(XCFLAGS)</tt></b>"
works, contradicting the information in the next paragraph, but this may be
dependent on the specific compiler version.
<li>In either HPUX version, you need to set
"<b><tt>CC=cc -Aa</tt></b>" (or use <b><tt>-Ae</tt></b> if you
prefer), and set
"<b><tt>CFLAGS=-D_HPUX_SOURCE -O $(XCFLAGS)</tt></b>". Higher
levels of optimization than <b><tt>-O</tt></b> may work depending on your
compiler revision; some users have reported success with
<b><tt>+O3</tt></b>, some have not.
<li>Some users have reported needing <b><tt>-DNOSYSTIME</tt></b> and
<b><tt>-D_POSIX_SOURCE</tt></b> in <b><tt>CFLAGS</tt></b>, but recent tests
do not show these to be necessary.
<li>If you use gcc, it's a good idea to have a recent release -- 2.7.2.1 or
later -- but gcc 2.6.3 has been known to work with past releases of
Ghostscript. gcc versions earlier than 2.6.3, and 2.7.* earlier than
2.7.2.1, are known <b><em>not</em></b> to work. You may be able to get a working
executable with an older gcc by removing <b><tt>-O</tt></b> from
<b><tt>CFLAGS</tt></b>.
</ul>
<h3><a name="Intergraph"></a>Intergraph Clipper</h3>
<p><ul>
<li>Recommended settings are:
<p>
<b><tt>XCFLAGS=-w -Q -DSYSV -D__SVR3<br>
EXTRALIBS=-lbsd -lc_s<br>
CC=acc -knr<br>
PLATFORM=sysv_</tt></b><br>
<li>You will probably need to change the value of <b><tt>XLIBS</tt></b> from
"<b><tt>XLIBS=Xt X11 Xext</tt></b>" to "<b><tt>XLIBS=Xt_s X11_s Xext</tt></b>".
</ul>
<h3><a name="Linux"></a>Linux</h3>
<p>
To create <a href="http://www.rpm.org">RPM</a>
(<b>R</b>ed Hat <b>P</b>ackage <b>M</b>anager)
files for Ghostscript N.NN:
<ul>
<li>Change to your source directory (<b><tt>/usr/src/redhat</tt></b> for Red Hat
Linux 5.1).
<li>Copy <b><tt>ghostscript-N.NN*.tar.gz</tt></b> (4 source files) to the
<b><tt>SOURCES</tt></b> subdirectory.
<li>Copy <b><tt>ghostscript-fonts-5.10a.tar.gz</tt></b> to the
<b><tt>SOURCES</tt></b> subdirectory.
<li>From <b><tt>SOURCES/ghostscript-N.NN.tar.gz</tt></b>,
<ul>
<li>extract <b><tt>rpm-conf.dif</tt></b> and copy to
<b><tt>SOURCES/ghostscript-N.NN-config.patch</tt></b>
<li>extract <b><tt>gs.rps</tt></b> and copy to
<b><tt>SPECS/ghostscript-N.NN.spec</tt></b>
<li>extract <b><tt>gs-fonts.rps</tt></b> and copy to
<b><tt>SPECS/ghostscript-fonts-N.NN.spec</tt></b>
</ul>
If the contents of these files have become out of date, you
will need to update the version number N.NN in the spec files,
and update the patch file.
<li> Change to the SPECS subdirectory and then execute the commands
<blockquote><b><tt>
rpm -ba ghostscript-N.NN.spec<br>
rpm -ba ghostscript-fonts-N.NN.spec
</tt></b></blockquote>
This will create the RPM files
<blockquote><b><tt>
RPMS/i386/ghostscript-N.NN-1.i386.rpm<br>
RPMS/noarch/ghostscript-fonts-N.NN-1.noarch.rpm<br>
SRPMS/ghostscript-N.NN-1.src.rpm<br>
SRPMS/ghostscript-fonts-N.NN-1.src.rpm<br>
</tt></b></blockquote>
<li> See instructions on how to <a href="Install.htm#Install_Unix">install
Ghostscript under Unix</a>.
</ul>
<p>
Bruce Babcock
<<a href="mailto:babcock@math.psu.edu">babcock@math.psu.edu</a>> has
made available everything needed to build Ghostscript under Linux Slackware
3.*, Red Hat 4.* and 5.*, and Debian 1.* and 2.0; the files include
instructions and shell scripts to build and install Ghostscript, as well as
all the source and font kits and patches needed:
<blockquote>
<a href="ftp://ykbsb2.yk.psu.edu/pub/ghost/GS-5.10/">ftp://ykbsb2.yk.psu.edu/pub/ghost/GS-5.10/</a><br>
<a href="ftp://ykbsb2.yk.psu.edu/pub/ghost/GS-5.10-Extra/">ftp://ykbsb2.yk.psu.edu/pub/ghost/GS-5.10-Extra/</a>
</blockquote>
<p>
The other notes in this section do not originate with Bruce.
<p><ul>
<li>If you build on Linux with X11 R6 or later, you may get link-time error
messages about undefined references to various functions beginning with
"SMC" and "ICE". If this happens, make sure that <b><tt>XLIBS</tt></b> in
the makefile is set to
"<b><tt>Xt SM ICE Xext X11</tt></b>" rather than
"<b><tt>Xt Xext X11</tt></b>".
<li>With gcc version 2.6.3 or later, you may encounter an incompatibility
in object formats (<b><tt>a.out</tt></b> vs. ELF) with the XFree86 library.
Typically, <b><tt>ld</tt></b> complains that some X library is not found,
or that many <b><tt>Xlib</tt></b> or <b><tt>Xt</tt></b> functions are not
found in the library (similar to the messages for omitting
<b><tt>SM</tt></b> and <b><tt>ICE</tt></b> from <b><tt>XLIBS</tt></b>). Or
you get a message when you start Ghostscript that the program or the shared
library is an unrecognized format.
<p>
If this happens, edit <b><tt>unix-gcc.mak</tt></b> to add the switches
"<b><tt>-b i486-linuxaout</tt></b>" to both <b><tt>CFLAGS</tt></b> and
<b><tt>LDFLAGS</tt></b>, then "<b><tt>make clean</tt></b>" followed by
"<b><tt>make</tt></b>"). If this doesn't help, or if other strange things
happen, contact your Linux supplier or support resource.
</ul>
<h3><a name="MIPS"></a>MIPS</h3>
<p><ul>
<li>There is apparently a bug in older versions of the MIPS C compiler
which causes <b><tt>gxdither.c</tt></b> to compile incorrectly if
optimization is enabled (<b><tt>-O</tt></b>). However, this bug is
definitely fixed in MipsPRO C version 6.00; with this version, compiling
with "<b><tt>-O2 -mips2</tt></b>" produces good output.
</ul>
<h3><a name="NCR_3550"></a>NCR 3550</h3>
<p><ul>
<li>With the NCR C Development Toolkit you must use <b><tt>-O0</tt></b>.
</ul>
<h3><a name="NeXTSTEP"></a>NeXTSTEP</h3>
<p><ul>
<li>For all NeXTSTEP systems, use <b><tt>unix-gcc.mak</tt></b>.
<li>For current versions of NeXTSTEP, in <b><tt>unixtail.mak</tt></b> (and
<b><tt>ugcclib.mak</tt></b>, if you are using only the library) change the
definition of <b><tt>INCLUDE</tt></b> to
"<b><tt>INCLUDE=/usr/include/bsd</tt></b>"
<li>For NeXTSTEP versions before 3.2
<ul>
<li>edit <b><tt>unix-gcc.mak</tt></b> to change <b><tt>CC=gcc</tt></b> to
<b><tt>CC=cc</tt></b> and add <b><tt>-D_NEXT_SOURCE</tt></b> to
<b><tt>CFLAGS</tt></b>;
<li>change occurrences of <b><tt>sys/time.h</tt></b> to
<b><tt>ansi/time.h</tt></b>; and
<li>in <b><tt>gp_unifs.c</tt></b> change <b><tt><dirent.h></tt></b>
to <b><tt><sys/dirent.h></tt></b>.
</ul>
<li>For NeXTSTEP 3.2 and later
<ul>
<li>edit <b><tt>unix-gcc.mak</tt></b> to change <b><tt>CC=gcc</tt></b> to
<b><tt>CC=cc</tt></b>, add <b><tt>-D_POSIX_SOURCE</tt></b> to
<b><tt>CFLAGS</tt></b> and remove <b><tt>-g</tt></b>, and remove
<b><tt>-Wstrict-prototypes</tt></b> from <b><tt>GCFLAGS</tt></b>; and
<li>to the end of Fontmap add the line
"<b><tt>/Ohlfs /Courier ;</tt></b>".
</ul>
<li>If you are running the Pencom co-Xist X server (development version),
the X headers and libraries are in the default places, so change the
makefile definitions of <b><tt>XINCLUDE</tt></b> and
<b><tt>XLIBDIRS</tt></b> to empty strings.
</ul>
<h3><a name="Pyramid"></a>Pyramid MIServer-S</h3>
<p>
See "<a href="#ATT_7040">AT&T 7040 R3</a>".
<h3><a name="RS6000"></a>IBM RS/6000</h3>
<ul>
<li>Many versions of the AIX C compiler have bugs that have prevented
Ghostscript from compiling and linking properly. We believe that the
current Ghostscript release works around these bugs, and that
<b><tt>unix-cc.mak</tt></b> with <b><tt>CC=cc</tt></b> should work.
<li>You must also edit the makefile (<b><tt>unixansi.mak</tt></b> or
<b><tt>unix-cc.mak</tt></b>) to change <b><tt>INSTALL</tt></b> to
<b><tt>/usr/ucb/install</tt></b>.
<li>If <b><tt>-DSYSV</tt></b> produces a complaint about the functions
<b><tt>index</tt></b> and <b><tt>rindex</tt></b> not being defined, try
removing it.
<li>If the xlc 1.2.1 optimizer runs out of memory, you may need to add
<b><tt>-qmaxmem=4000</tt></b> to <b><tt>CFLAGS</tt></b>.
<li>A user reports that the AIX C compiler shipped with AIX 3.2.5 compiles
Ghostscript only if invoked with "<b><tt>c89 -D_POSIX_SOURCE</tt></b>"
and <b><em>without</em></b> <b><tt>-O</tt></b>. On the other hand, another user
reports successful compilation using <b><tt>unix-ansi.mak</tt></b> and the
command line
<p>
<b><tt>make CC=c89 XCFLAGS="-DOSY_AIX -D_ALL_SOURCE -qnoro -qmaxmem=3000 -bfl" $*</tt>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -