summaryrefslogtreecommitdiff
path: root/docs/manual/misc/FAQ-C.html
blob: 3f226c08f8df94a311271d2919985157f3ec0a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!--#if expr="$FAQMASTER" -->
 <!--#set var="STANDALONE" value="" -->
 <!--#set var="INCLUDED" value="YES" -->
 <!--#if expr="$QUERY_STRING = TOC" -->
  <!--#set var="TOC" value="YES" -->
  <!--#set var="CONTENT" value="" -->
 <!--#else -->
  <!--#set var="TOC" value="" -->
  <!--#set var="CONTENT" value="YES" -->
 <!--#endif -->
<!--#else -->
 <!--#set var="STANDALONE" value="YES" -->
 <!--#set var="INCLUDED" value="" -->
 <!--#set var="TOC" value="" -->
 <!--#set var="CONTENT" value="" -->
<!--#endif -->
<!--#if expr="$STANDALONE" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
  <TITLE>Apache Server Frequently Asked Questions</TITLE>
 </HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
 <BODY
  BGCOLOR="#FFFFFF"
  TEXT="#000000"
  LINK="#0000FF"
  VLINK="#000080"
  ALINK="#FF0000"
 >
  <!--#include virtual="header.html" -->
  <H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
  <P>
  $Revision: 1.1 $ ($Date: 1999/06/24 15:02:51 $)
  </P>
  <P>
  The latest version of this FAQ is always available from the main
  Apache web site, at
  &lt;<A
       HREF="http://www.apache.org/docs/misc/FAQ.html"
       REL="Help"
      ><SAMP>http://www.apache.org/docs/misc/FAQ.html</SAMP></A>&gt;.
  </P>
<!-- Notes about changes:                                           -->
<!--  - If adding a relative link to another part of the            -->
<!--    documentation, *do* include the ".html" portion.  There's a -->
<!--    good chance that the user will be reading the documentation -->
<!--    on his own system, which may not be configured for          -->
<!--    multiviews.                                                 -->
<!--  - When adding items, make sure they're put in the right place -->
<!--    - verify that the numbering matches up.                     -->
<!--  - *Don't* use <PRE></PRE> blocks - they don't appear          -->
<!--    correctly in a reliable way when this is converted to text  -->
<!--    with Lynx.  Use <DL><DD><CODE>xxx<BR>xx</CODE></DD></DL>    -->
<!--    blocks inside a <P></P> instead.  This is necessary to get  -->
<!--    the horizontal and vertical indenting right.                -->
<!--  - Don't forget to include an HR tag after the last /P tag     -->
<!--    but before the /LI in an item.                              -->
  <P>
  If you are reading a text-only version of this FAQ, you may find numbers
  enclosed in brackets (such as &quot;[12]&quot;).  These refer to the list of
  reference URLs to be found at the end of the document.  These references
  do not appear, and are not needed, for the hypertext version.
  </P>
  <H2>The Questions</H2>
<OL TYPE="A">
<!--#endif -->
<!--#if expr="$TOC || $STANDALONE" -->
 <LI VALUE="3"><STRONG>Building Apache</STRONG>
  <OL>
   <LI><A HREF="#bind8.1">Why do I get an error about an undefined
        reference to &quot;<SAMP>__inet_ntoa</SAMP>&quot; or other
        <SAMP>__inet_*</SAMP> symbols?</A>
   </LI>
   <LI><A HREF="#cantbuild">Why won't Apache compile with my
        system's <SAMP>cc</SAMP>?</A>
   </LI>
   <LI><A HREF="#linuxiovec">Why do I get complaints about redefinition
        of &quot;<CODE>struct iovec</CODE>&quot; when compiling under Linux?</A>
   </LI>
   <LI><A HREF="#broken-gcc">I'm using gcc and I get some compilation errors, 
	what is wrong?</A>
   </LI>
   <LI><A HREF="#glibc-crypt">I'm using RedHat Linux 5.0, or some other
        <SAMP>glibc</SAMP>-based Linux system, and I get errors with the
        <CODE>crypt</CODE> function when I attempt to build Apache 1.2.</A>
   </LI>
  </OL>
 </LI>
<!--#endif -->
<!--#if expr="$STANDALONE" -->
</OL>

<HR>

  <H2>The Answers</H2>
<!--#endif -->
<!--#if expr="! $TOC" -->

  <H3>C. Building Apache</H3>
<OL>

 <LI><A NAME="bind8.1">
      <STRONG>Why do I get an error about an undefined reference to
      &quot;<SAMP>__inet_ntoa</SAMP>&quot; or other
      <SAMP>__inet_*</SAMP> symbols?</STRONG>
     </A>
  <P>
  If you have installed <A HREF="http://www.isc.org/bind.html">BIND-8</A>
  then this is normally due to a conflict between your include files
  and your libraries.  BIND-8 installs its include files and libraries
  <CODE>/usr/local/include/</CODE> and <CODE>/usr/local/lib/</CODE>, while
  the resolver that comes with your system is probably installed in
  <CODE>/usr/include/</CODE> and <CODE>/usr/lib/</CODE>.  If
  your system uses the header files in <CODE>/usr/local/include/</CODE>
  before those in <CODE>/usr/include/</CODE> but you do not use the new
  resolver library, then the two versions will conflict.
  </P>
  <P>
  To resolve this, you can either make sure you use the include files
  and libraries that came with your system or make sure to use the
  new include files and libraries.  Adding <CODE>-lbind</CODE> to the
  <CODE>EXTRA_LDFLAGS</CODE> line in your <SAMP>Configuration</SAMP>
  file, then re-running <SAMP>Configure</SAMP>, should resolve the
  problem.  (Apache versions 1.2.* and earlier use
  <CODE>EXTRA_LFLAGS</CODE> instead.)
  </P>
  <P>
  <STRONG>Note:</STRONG>As of BIND 8.1.1, the bind libraries and files are
  installed under <SAMP>/usr/local/bind</SAMP> by default, so you
  should not run into this problem.  Should you want to use the bind
  resolvers you'll have to add the following to the respective lines:
  </P>
  <P>
  <DL>
   <DD><CODE>EXTRA_CFLAGS=-I/usr/local/bind/include
    <BR>
    EXTRA_LDFLAGS=-L/usr/local/bind/lib
    <BR>
    EXTRA_LIBS=-lbind</CODE>
   </DD>
  </DL>
  <P></P>
  <HR>
 </LI>

 <LI><A NAME="cantbuild">
      <STRONG>Why won't Apache compile with my system's
      <SAMP>cc</SAMP>?</STRONG>
     </A>
  <P>
  If the server won't compile on your system, it is probably due to one
  of the following causes:
  </P>
  <UL>
   <LI><STRONG>The <SAMP>Configure</SAMP> script doesn't recognize your system
    environment.</STRONG>
    <BR>
    This might be either because it's completely unknown or because
    the specific environment (include files, OS version, <EM>et
    cetera</EM>) isn't explicitly handled.  If this happens, you may
    need to port the server to your OS yourself.
   </LI>
   <LI><STRONG>Your system's C compiler is garbage.</STRONG>
    <BR>
    Some operating systems include a default C compiler that is either
    not ANSI C-compliant or suffers from other deficiencies.  The usual
    recommendation in cases like this is to acquire, install, and use
    <SAMP>gcc</SAMP>.
   </LI>
   <LI><STRONG>Your <SAMP>include</SAMP> files may be confused.</STRONG>
    <BR>
    In some cases, we have found that a compiler installation or system
    upgrade has left the C header files in an inconsistent state.  Make
    sure that your include directory tree is in sync with the compiler and
    the operating system.
   </LI>
   <LI><STRONG>Your operating system or compiler may be out of
    revision.</STRONG>
    <BR>
    Software vendors (including those that develop operating systems)
    issue new releases for a reason; sometimes to add functionality, but
    more often to fix bugs that have been discovered.  Try upgrading
    your compiler and/or your operating system.
   </LI>
  </UL>
  <P>
  The Apache Group tests the ability to build the server on many
  different platforms.  Unfortunately, we can't test all of the OS
  platforms there are.  If you have verified that none of the above
  issues is the cause of your problem, and it hasn't been reported
  before, please submit a
  <A HREF="http://www.apache.org/bug_report.html">problem report</A>.
  Be sure to include <EM>complete</EM> details, such as the compiler
  &amp; OS versions and exact error messages.
  </P>
  <HR>
 </LI>

 <LI><A NAME="linuxiovec">
      <STRONG>Why do I get complaints about redefinition
      of &quot;<CODE>struct iovec</CODE>&quot; when
      compiling under Linux?</STRONG>
     </A>
  <P>
  This is a conflict between your C library includes and your kernel
  includes.  You need to make sure that the versions of both are matched
  properly.  There are two workarounds, either one will solve the problem:
  </P>
  <P>
  <UL>
   <LI>Remove the definition of <CODE>struct iovec</CODE> from your C
    library includes.  It is located in <CODE>/usr/include/sys/uio.h</CODE>.
    <STRONG>Or,</STRONG>
   </LI>
   <LI>Add  <CODE>-DNO_WRITEV</CODE> to the <CODE>EXTRA_CFLAGS</CODE>
    line in your <SAMP>Configuration</SAMP> and reconfigure/rebuild.
    This hurts performance and should only be used as a last resort.
   </LI>
  </UL>
  <P></P>
  <HR>
 </LI>

 <LI><A NAME="broken-gcc"><STRONG>I'm using gcc and I get some
	compilation errors, what is wrong?</STRONG></A>
    <P>
    GCC parses your system header files and produces a modified subset which
    it uses for compiling.  This behaviour ties GCC tightly to the version
    of your operating system.  So, for example, if you were running IRIX 5.3
    when you built GCC and then upgrade to IRIX 6.2 later, you will have to
    rebuild GCC.  Similarly for Solaris 2.4, 2.5, or 2.5.1 when you upgrade
    to 2.6.  Sometimes you can type "gcc -v" and it will tell you the version
    of the operating system it was built against.
    </P>
    <P>
    If you fail to do this, then it is very likely that Apache will fail
    to build.  One of the most common errors is with <CODE>readv</CODE>,
    <CODE>writev</CODE>, or <CODE>uio.h</CODE>.  This is <STRONG>not</STRONG> a
    bug with Apache.  You will need to re-install GCC.
    </P>
   <HR>
  </LI>

 <LI><A NAME="glibc-crypt">
      <STRONG>I'm using RedHat Linux 5.0, or some other 
      <SAMP>glibc</SAMP>-based Linux system, and I get errors with the
      <CODE>crypt</CODE> function when I attempt to build Apache 1.2.</STRONG>
     </A>

  <P>
  <SAMP>glibc</SAMP> puts the <CODE>crypt</CODE> function into a separate
  library.  Edit your <CODE>src/Configuration</CODE> file and set this:
  </P>
  <DL>
   <DD><CODE>EXTRA_LIBS=-lcrypt</CODE>
   </DD>
  </DL>
  <P>
  Then re-run <SAMP>src/Configure</SAMP> and re-execute the make.
  </P>
  <HR>
 </LI>

</OL>
<!--#endif -->
<!--#if expr="$STANDALONE" -->
  <!-- Don't forget to add HR tags at the end of each list item.. -->

<!--#include virtual="footer.html" -->
</BODY>
</HTML>
<!--#endif -->