Re: Problem compiling

hello,

John Coppens wrote:
> 
> Hello people.
> 
> I've tried to compile libwww with mysql support and had a few problems. (without
> mysql support installation went fine)
> 
> Configure was done with  --with-mysql=/opt/mysql
> (lib and include are below /opt/mysql)
> 
> the configure process gave a first indication of problems:
> 
> checking for /opt/mysql/... -L/opt -lmysql
> 
> Which isn't correct, I think. I believe it should be -L/opt/mysql/lib -lmysql
> 
> Compilation stopped:
> 
> /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include   -I../../modules/md5     -I../../modules/expat/xmlparse   -DW3C_ICONS=\"/usr/local/share/w3c-libwww\"  -g -O2 -Wall -c HTSQL.c
> .../../libtool: line 732: test: =: unary operator expected
> rm -f .libs/HTSQL.lo
> gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -I../../modules/md5 -I../../modules/expat/xmlparse -DW3C_ICONS=\"/usr/local/share/w3c-libwww\" -g -O2 -Wall -c HTSQL.c  -fPIC -DPIC -o .libs/HTSQL.lo
> In file included from HTSQL.c:19:
> HTSQL.h:34:25: mysql/mysql.h: No such file or directory
> In file included from HTSQL.c:19:
> HTSQL.h:97: error: syntax error before '*' token
> HTSQL.h:97: warning: type defaults to `int' in declaration of `HTSQL_getMysql'
> 
> mysql/mysql.h does exist, under   /opt/mysql/include
> 
> I'm no expert programmer, but I did compile a few apps (including some of my own)
> with mysql without problems...

i am using w3c-libwww-5.4.0, what are you using?

in w3c-libwww-5.4.0, HTSQL.c, HTSQL.h, and HTSQLLog.c are incorrect.
they need to be hacked!

if you look in Library/src off the base directory of your distribution
of w3c-libwww, you will find HTSQL.c, HTSQL.h, and HTSQLLog.c

check to see if HTSQL.c uses mysql_connect or mysql_real_connect, if
'mysql_connect', then you need to hack the code because 'mysql_connect'
has been eliminated from mysql. they use 'mysql_real_connect' now, and
the syntax is different.  if you need help, write me directly
(otrcomm@isp-systems.com), and i will guide you through how to get
w3c-libwww compiled with mysql support.

i use redhat 7.3, fedora core 4, and fedora core 5 systems and DO NOT
install mysql at system build or with rpms or yum or apt-get. i always
install the mysql tarball. i use mysql-4.1.15.

i build mysql with:

../configure --prefix=/usr/local/mysql --with-mysqld-user=mysql
--with-unix-socket-path=/tmp/mysql.sock

so mysql gets installed in /usr/local/mysql. NOTE: adduser mysql before
so the '--with-mysqld-user=mysql' switch makes sense :)

then to get libww installed with mysql support, i use:

../configure  --with-gnu-ld
--with-mysql=/usr/local/mysql/lib/mysql/libmysqlclient.a

works like a charm on several systems after i hacked the code mentioned
above!


regards,
murrah boswell

Received on Tuesday, 14 November 2006 10:52:31 UTC