Compiling Apache 1.3.xx: undefined reference to `stat'

Compiling Apache 1.3.xx: undefined reference to `stat'

Post by Matthias Hung » Thu, 29 Aug 2002 20:53:35



Hi there,

I'm having trouble compiling Apache 1.3.xx (tried 1.3.26 and 1.3.24)
with Suse Linux 7.2. To make sure it's not a problem with any module,
I configured Apache to use the standard installation; the only thing I
changed is the prefix (/usr/local/apache).

Anyway, it doesn't work for me. The problem is an "undefined reference
to `stat'". I keep getting the same error messages:

<=== src/modules
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DUSE_HSREGEX
-DNO_DL_NEEDED `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DLINUX=22 -DUSE_HSREGEX
-DNO_DL_NEEDED `./apaci` buildmark.c
gcc  -DLINUX=22 -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci`    \
      -o httpd buildmark.o modules.o modules/standard/libstandard.a
main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a   -lm
-lcrypt -lexpat
modules/standard/libstandard.a(mod_negotiation.o): In function
`find_content_length':
mod_negotiation.o(.text+0x21aa): undefined reference to `stat'
modules/standard/libstandard.a(mod_include.o): In function
`find_file':
mod_include.o(.text+0x2277): undefined reference to `stat'
modules/standard/libstandard.a(mod_cgi.o): In function
`log_scripterror':
mod_cgi.o(.text+0x226): undefined reference to `stat'
modules/standard/libstandard.a(mod_cgi.o): In function `log_script':
mod_cgi.o(.text+0x39f): undefined reference to `stat'
modules/standard/libstandard.a(mod_userdir.o): In function
`translate_userdir':
mod_userdir.o(.text+0x669): undefined reference to `stat'
main/libmain.a(http_config.o)(.text+0x214f): more undefined references
to `stat' follow
main/libmain.a(http_request.o): In function `check_symlinks':
http_request.o(.text+0x11d): undefined reference to `lstat'
http_request.o(.text+0x180): undefined reference to `stat'
main/libmain.a(http_request.o): In function `get_path_info':
http_request.o(.text+0x280): undefined reference to `stat'
main/libmain.a(http_request.o): In function `ap_sub_req_lookup_file':
http_request.o(.text+0x1430): undefined reference to `stat'
main/libmain.a(util.o): In function `ap_pcfg_openfile':
util.o(.text+0x18fa): undefined reference to `fstat'
main/libmain.a(util.o): In function `ap_is_directory':
util.o(.text+0x30b2): undefined reference to `stat'
main/libmain.a(util.o): In function `ap_is_rdirectory':
util.o(.text+0x3102): undefined reference to `lstat'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/hunger/downloads/apache_1.3.26/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/hunger/downloads/apache_1.3.26'
make: *** [build] Error 2
sxflinux:~/downloads/apache_1.3.26 #

Anyone out there who can help?

 
 
 

Compiling Apache 1.3.xx: undefined reference to `stat'

Post by Matthias Hung » Tue, 03 Sep 2002 20:25:54


I think the problem occured because some libraries got mixed up after
a Linux update. I removed Linux completely and installed SuSE Linux
8.0 and now it's working perfectly.

 
 
 

1. S-Ware 3.0, compiling kernel 1.2.xx or 1.3.xx doesn't happen

I just purchased the Slackware 3.0 with ELF.  I installed most of the packages
on the disk including gcc(2.6.3) and g++.  

If copy an 1.2.xx kernel from the kernel disk and setup the /usr/include links  
and try to compile the kernel I get many undefined references.  So I make the
changes to /linux/arch/i386/Makefile as the README says to do.  Now if I try
to 'MAKE DEP' I get a:
        gcc installation error: cannot exec cpp
OK, so I set /usr/bin/cpp -> g++
        Now it completes the depend part with many warnings about not using
the link file as linking was not performed.  However when I try to compile it
says that it cannot execute cc1 and bombs out very soon.

If I try to compile a 1.3.xx kernel I just get a bunch of undefined refernce
error and it fails to compile.  What am I doing wrong?  I have looked at sever
README files and it looks like I did everything right.

Thanks in advance.

Wayne P Cuddy
Q.E.D. Systems Inc.

2. Linux Testing

3. undefined reference to `pw_crypt',undefined reference to `spw_unpack'

4. Kernel probs with gcc-2.6.3

5. error compiling apache - undefined reference to `crypt' in function `authenticate_basic_user'

6. ETERM?! where is my transparency!?!?

7. Glibc2 + Undefined reference to 'stat'

8. local APIC init fixes for 2.4.21-pre5

9. kernel 1.3.xx won't compile

10. /usr/include/sys/stat.h:161: undefined reference to `_fxstat'

11. GCC: undefined reference to `stat'

12. Can't seem to fix `undefined reference to `stat'' and `undefined reference to `atexit''

13. postgres compiling problems.'undefined reference'