Problems compiling nginx-0.7.33, AIX, gcc

Hello,

I would like to report my efforts to compile nginx in the following
environment: AIX 6.1, gcc 4.2.4

./configure --prefix=/usr/local --user=nginx --group=nginx
–without-http_rewrite_module --with-openssl=/usr/lib/
–with-zlib=/usr/lib/

1.)
src/os/unix/ngx_process.c: In function ‘ngx_process_get_status’:
src/os/unix/ngx_process.c:497: warning: implicit declaration of
function ‘WCOREDUMP’

I had to add the following to “./src/os/unix/ngx_process.c” because
AIX is probably unaware of WCOREDUMP:

#ifndef WCOREDUMP
#define WCOREDUMP
#endif

2.)
src/http/modules/ngx_http_gzip_filter_module.c:11:18: error: zlib.h:
No such file or directory

I had to install the zlib-devel package from the IBM Linux toolbox
(GPL software package collection)

3.)
But now I’m really stuck with this:

    cd /usr/lib/  && make clean  && CFLAGS="-O2

-fomit-frame-pointer -pipe " CC=“gcc” ./configure && make libz.a
make: Cannot find a rule to create target clean from dependencies.
Stop.
make: The error code from the last command is 2.

Any ideas why it would want to make clean in /usr/lib ? :wink:

Please let me know which file(s) do you need to debug this. Obviously
the Makefiles are generated wrong.
Unfortunately I don’t really know C, and I cannot debug this myself.

best regards
LGee (also on irc.freenode.net)

LOCSEI, Gabor wrote:

src/os/unix/ngx_process.c: In function ‘ngx_process_get_status’:
2.)
cd /usr/lib/ && make clean && CFLAGS="-O2
-fomit-frame-pointer -pipe " CC=“gcc” ./configure && make libz.a
make: Cannot find a rule to create target clean from dependencies.
Stop.
make: The error code from the last command is 2.

Any ideas why it would want to make clean in /usr/lib ? :wink:

Please let me know which file(s) do you need to debug this. Obviously
the Makefiles are generated wrong.
Unfortunately I don’t really know C, and I cannot debug this myself.

I think options --with-openssl=/usr/lib/ and --with-zlib=/usr/lib/ are
not needed, since they specify path to sources of respective libraries
and you have already the headers of zlib (I’m not sure about openssl).

Hello,

On Wed, Feb 4, 2009 at 6:58 PM, Valery K.
[email protected] wrote:

I think options --with-openssl=/usr/lib/ and --with-zlib=/usr/lib/ are not
needed, since they specify path to sources of respective libraries and you
have already the headers of zlib (I’m not sure about openssl).

Wonderful! I was just too blind to read :wink: It worked.

For those who are interested, the previous hints should be well enough
to compile nginx on both AIX 5.3 and 6.1, both 32 and 64 bit, but of
course the configure options must be modified :wink:

I will test more functions later…

thanks
LGee

LOCSEI, Gabor wrote:

Hello,

On Wed, Feb 4, 2009 at 6:58 PM, Valery K.
[email protected] wrote:

I think options --with-openssl=/usr/lib/ and --with-zlib=/usr/lib/ are not
needed, since they specify path to sources of respective libraries and you
have already the headers of zlib (I’m not sure about openssl).

Wonderful! I was just too blind to read :wink: It worked.

I hope there is no toungue-in-cheek.