Compiling Apache from source on Ubuntu 9.10 (Karmic Koala)

Last week my OS got upgraded to Ubuntu 9.10. After that I wanted to compile Apache from source. Unfortunately I got this build error:

htpasswd.c:101: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here
make[2]: *** [htpasswd.o] Error 1

This is fixed by replacing getline with parseline on line 651 in /usr/include/stdio.h

Kudos to HowtoForge for pointing this out.

One thought on “Compiling Apache from source on Ubuntu 9.10 (Karmic Koala)

  1. I had the same problem in debian ‘squeeze’. I fixed the conflict between symbols by renaming ‘getline’ to ‘_getline’ the relevant apache source files. This is safe, since the getline version in apache is not exported by the linker.

    Also, if you prefer the first method, don’t forget to rename ‘parseline’ (the name does not actually matter) back to ‘getline’ so other programs can still be compiled with getline from glibc.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string 4yHMsb to the field below: