Hello All,
I had to install pound-2.0 on AIX 5.1. It took me an afternoon to figure out how to make it compile. I would like to share my experience in case somebody else has to do the same thing. Please note that I am no C expert. The step I took made a workable/runnable copy of pound but it might create other problems down the road.
First problem I encountered while running the configuration was with the OpenSSL library. On my server it wasn't installed at the proper location. As per the documentation I specified the folder using the --with-ssl=/opt/freeware folder
After running configure successfully, I ran make. I gave me the following error:
cc -DF_CONF=\"/usr/local/etc/pound.cfg\" -DVERSION=\"`cat VERSION`\" -g -O2 -DUPER -DHAVE_SYSLOG_H=1 -DMISS_FACILITYNAMES -I/opt/freeware/include -D_REENTRANT -D_THREAD_SAFE -Wstrict-prototypes -pipe -c pound.c
cc: 1501-210 command option Wstrict-prototypes contains an incorrect subargument
make: 1254-004 The error code from the last command is 40.
Stop.
To fix that problem I edited the Makefile and removed the Wstrict-prototypes -pipe entry. When I ran make, I got the following error:
cc -DF_CONF=\"/usr/local/etc/pound.cfg\" -DVERSION=\"`cat VERSION`\" -g -O2 -DUPER -DHAVE_SYSLOG_H=1 -DMISS_FACILITYNAMES -I/opt/freeware/include -D_REENTRANT -D_THREAD_SAFE -c pound.c
cc -DF_CONF=\"/usr/local/etc/pound.cfg\" -DVERSION=\"`cat VERSION`\" -g -O2 -DUPER -DHAVE_SYSLOG_H=1 -DMISS_FACILITYNAMES -I/opt/freeware/include -D_REENTRANT -D_THREAD_SAFE -c http.c
cc -DF_CONF=\"/usr/local/etc/pound.cfg\" -DVERSION=\"`cat VERSION`\" -g -O2 -DUPER -DHAVE_SYSLOG_H=1 -DMISS_FACILITYNAMES -I/opt/freeware/include -D_REENTRANT -D_THREAD_SAFE -c config.c
"config.c", line 249.14: 1506-045 (S) Undeclared identifier LOG_FTP.
make: 1254-004 The error code from the last command is 1.
Stop.
In order to fix that error, I edited the confic.c file. I replace the line
{ "ftp", LOG_FTP },
with those three lines
#ifdef LOG_FTP
{ "ftp", LOG_FTP },
#endif
(this fix seems to be in the newer version of the code)
After that, I tried running make again. This time I got the following error message.
cc -DF_CONF=\"/usr/local/etc/pound.cfg\" -DVERSION=\"`cat VERSION`\" -g -O2 -DUPER -DHAVE_SYSLOG_H=1 -DMISS_FACILITYNAMES -I/opt/freeware/include -D_REENTRANT -D_THREAD_SAFE -c config.c
cc -DF_CONF=\"/usr/local/etc/pound.cfg\" -DVERSION=\"`cat VERSION`\" -g -O2 -DUPER -DHAVE_SYSLOG_H=1 -DMISS_FACILITYNAMES -I/opt/freeware/include -D_REENTRANT -D_THREAD_SAFE -c svc.c
976 1500-010: (W) WARNING in thr_RSAgen: Infinite loop. Program may not stop.
gcc -L/opt/freeware/lib -o pound pound.o http.o config.o svc.o -lssl -lcrypto -ldl
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init
ld: 0711-317 ERROR: Undefined symbol: .pthread_attr_init
ld: 0711-317 ERROR: Undefined symbol: .pthread_attr_setdetachstate
ld: 0711-317 ERROR: Undefined symbol: .pthread_create
ld: 0711-317 ERROR: Undefined symbol: .pthread_exit
ld: 0711-317 ERROR: Undefined symbol: .pthread_self
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.
Stop.
In order to fix that, I had to edit the Makefile again, and replace the following line
LIBS=-lssl -lcrypto -ldl
with
LIBS=-lssl -lcrypto -ldl -lpthread
After that last modification I did a make clean and make and I was able to use the software.
Hope this helps someone.
David Gaulin
819-953-8407 | télécopieur / facsimile 819-953-8407
gaulin.david@ic.gc.ca
Industrie Canada | 50 rue Victoria Gatineau QC K1A 0C9
Industry Canada | 50 Victoria Street Gatineau QC K1A 0C9
Gouvernement du Canada | Government of Canada