problems compiling kannel with mySQL.
Hi list. I'm trying to compile kannel with mySQL support for dlr, and I'm having some problems with the include files. I've configured kannel with --with-mysql=/usr/local/mysql (where mysql is installed in our system - which is pretty standard for a /usr/local installation). now configure builds the include switch as -I/usr/local/mysql/include/mysql which seems apropriate to me. looking at the code I found to places that reference mysql : in gw/dlr.c and gw/shared.c . while the latter #include (note: no relative path - should work) the former #include which doesn't work since the relative path prefix makes gcc look for the file at /usr/local/mysql/include/mysql/mysql/mysql.h which doesn't exists of course. I always have to correct dlr.c by removing the prefix before I compile. I would be gratefull if someone can fix it in the CVS. Thanks Oded Arbel m-Wise ltd.
Re: problems compiling kannel with mySQL.
>Hi list. > >I'm trying to compile kannel with mySQL support for dlr, and I'm having >some problems with the include files. >I've configured kannel with --with-mysql=/usr/local/mysql (where mysql >is installed in our system - which is pretty standard for a /usr/local >installation). now configure builds the include switch as >-I/usr/local/mysql/include/mysql which seems apropriate to me. >looking at the code I found to places that reference mysql : in gw/dlr.c >and gw/shared.c . while the latter #include (note: no >relative path - should work) the former #include which >doesn't work since the relative path prefix makes gcc look for the file >at /usr/local/mysql/include/mysql/mysql/mysql.h which doesn't exists of >course. I think what you need to do is a "make install" of your mysql installation. That should put the files into the places where they belong. include files should be in /usr/local/include/mysql/*.h and library in /usr/local/lib or for other installations (like my RedHat 7.1) in /usr/include/mysql and /usr/lib depending on what you have set as PATH. in the worst case a simple symbolic link from /usr/include/mysql pointing to your include files directory should do the trick. -- Andreas Fink Fink-Consulting -- Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com -- Something urgent? Try http://www.smsrelay.com/ Nickname afink
RE: problems compiling kannel with mySQL.
I think you missed the point. my files are where they are supposed to be. all the include files are at /usr/local/mysql/include/mysql/*.h which is where they're supposed to be in a --prefix=/usr/local/mysql installation of mySQL.. you refer to a --prefix=/usr/local installation, which is not the case here - note the kannel configuration switch I used. I simply claim that the two files that include mySQL headers don't agree with each other where those headers are supposed to be, and one of them does not agree with the configure script - in which case one of those should be fixed : either the configure script and gw/shared.c or gw/dlr.c. [oded@superion gateway]$./configure --with-mysql=/usr/local/mysql --enable-mysql-dlr [oded@superion gateway]$ make gcc -D_REENTRANT=1 -I. -I/usr/include/libxml2/libxml -I/usr/include/libxml2 -DBROKEN_PTHREADS=1 -I/usr/local/mysql/include/mysql -o gw/dlr.o -c gw/dlr.c gw/dlr.c:47: mysql/mysql.h: No such file or directory make: *** [gw/dlr.o] Error 1 [oded@superion gateway]$ rgrep '#include.*mysql' * gw/dlr.c:#include gw/shared.c:#include [oded@superion gateway]$ locate mysql_version.h /usr/local/mysql/include/mysql/mysql_version.h [oded@superion gateway]$ locate mysql.h /usr/local/mysql/include/mysql/mysql.h mysql_version.h and mysql.h are located at the same directory, but the sources expect them to be at a different location. Please state if you do not wish to fix the sources, in which case I'll have to submit for mySQL AB to fix their installation script to copy the files based on where Kannel expects them to be. Thanks Oded Arbel m-Wise ltd. -Original Message- From: Andreas Fink [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 2:58 PM To: Oded Arbel Cc: [EMAIL PROTECTED] Subject: Re: problems compiling kannel with mySQL. >Hi list. > >I'm trying to compile kannel with mySQL support for dlr, and I'm having >some problems with the include files. >I've configured kannel with --with-mysql=/usr/local/mysql (where mysql >is installed in our system - which is pretty standard for a /usr/local >installation). now configure builds the include switch as >-I/usr/local/mysql/include/mysql which seems apropriate to me. >looking at the code I found to places that reference mysql : in gw/dlr.c >and gw/shared.c . while the latter #include (note: no >relative path - should work) the former #include which >doesn't work since the relative path prefix makes gcc look for the file >at /usr/local/mysql/include/mysql/mysql/mysql.h which doesn't exists of >course. I think what you need to do is a "make install" of your mysql installation. That should put the files into the places where they belong. include files should be in /usr/local/include/mysql/*.h and library in /usr/local/lib or for other installations (like my RedHat 7.1) in /usr/include/mysql and /usr/lib depending on what you have set as PATH. in the worst case a simple symbolic link from /usr/include/mysql pointing to your include files directory should do the trick. -- Andreas Fink Fink-Consulting -- Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com -- Something urgent? Try http://www.smsrelay.com/ Nickname afink
RE: problems compiling kannel with mySQL.
>I think you missed the point. my files are where they are supposed to >be. all the include files are at /usr/local/mysql/include/mysql/*.h >which is where they're supposed to be in a --prefix=/usr/local/mysql >installation of mySQL.. you refer to a --prefix=/usr/local installation, >which is not the case here - note the kannel configuration switch I >used. >I simply claim that the two files that include mySQL headers don't agree >with each other where those headers are supposed to be, and one of them >does not agree with the configure script - in which case one of those >should be fixed : either the configure script and gw/shared.c or >gw/dlr.c. well you say that the include files are supposed to be in /usr/local/mysql/include/mysql/*.h, well they arent in my mysql installations (Redhat 7.1, Cobalt Cube 6.2, MacOS X) and many others out there. ln -s /usr/local/mysql/include/mysql /usr/include/mysql And you're all set. For now and for the future. >[oded@superion gateway]$./configure --with-mysql=/usr/local/mysql >--enable-mysql-dlr >[oded@superion gateway]$ make > >gcc -D_REENTRANT=1 -I. -I/usr/include/libxml2/libxml >-I/usr/include/libxml2 -DBROKEN_PTHREADS=1 >-I/usr/local/mysql/include/mysql -o gw/dlr.o -c gw/dlr.c >gw/dlr.c:47: mysql/mysql.h: No such file or directory >make: *** [gw/dlr.o] Error 1 >[oded@superion gateway]$ rgrep '#include.*mysql' * >gw/dlr.c:#include >gw/shared.c:#include >[oded@superion gateway]$ locate mysql_version.h >/usr/local/mysql/include/mysql/mysql_version.h >[oded@superion gateway]$ locate mysql.h >/usr/local/mysql/include/mysql/mysql.h > >mysql_version.h and mysql.h are located at the same directory, but the >sources expect them to be at a different location. >Please state if you do not wish to fix the sources, in which case I'll >have to submit for mySQL AB to fix their installation script to copy the >files based on where Kannel expects them to be. Well are you really sure those include files are not copied to /usr/include/mysql (or some other reasonable location) once you type "make install" in the mysql distribution? It would mean that EVERY standard application being compiled using mysql needs specific compile flags to find the include files and library files. I dont think so. In any case, kannel has to know where they are and in your case they seem to be not in a location where any kannel developer has found them before. -- Andreas Fink Fink-Consulting -- Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com -- Something urgent? Try http://www.smsrelay.com/ Nickname afink
RE: problems compiling kannel with mySQL.
Yaouch ! this will still not work - it doesn't matter where mySQL include files are, as long as mysql.h and mysql_version.h are on the same directory, kannel will not compile successful. check your installtion - my installation is default, so unless mySQL has changed the location of it's mysql_version.h file sometime and we have different versions, your's should be just the same as mine. Oded Arbel m-Wise ltd. -Original Message- From: Andreas Fink [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 3:34 PM To: Oded Arbel Cc: [EMAIL PROTECTED] Subject: RE: problems compiling kannel with mySQL. >I think you missed the point. my files are where they are supposed to >be. all the include files are at /usr/local/mysql/include/mysql/*.h >which is where they're supposed to be in a --prefix=/usr/local/mysql >installation of mySQL.. you refer to a --prefix=/usr/local installation, >which is not the case here - note the kannel configuration switch I >used. >I simply claim that the two files that include mySQL headers don't agree >with each other where those headers are supposed to be, and one of them >does not agree with the configure script - in which case one of those >should be fixed : either the configure script and gw/shared.c or >gw/dlr.c. well you say that the include files are supposed to be in /usr/local/mysql/include/mysql/*.h, well they arent in my mysql installations (Redhat 7.1, Cobalt Cube 6.2, MacOS X) and many others out there. ln -s /usr/local/mysql/include/mysql /usr/include/mysql And you're all set. For now and for the future. >[oded@superion gateway]$./configure --with-mysql=/usr/local/mysql >--enable-mysql-dlr >[oded@superion gateway]$ make > >gcc -D_REENTRANT=1 -I. -I/usr/include/libxml2/libxml >-I/usr/include/libxml2 -DBROKEN_PTHREADS=1 >-I/usr/local/mysql/include/mysql -o gw/dlr.o -c gw/dlr.c >gw/dlr.c:47: mysql/mysql.h: No such file or directory >make: *** [gw/dlr.o] Error 1 >[oded@superion gateway]$ rgrep '#include.*mysql' * >gw/dlr.c:#include >gw/shared.c:#include >[oded@superion gateway]$ locate mysql_version.h >/usr/local/mysql/include/mysql/mysql_version.h >[oded@superion gateway]$ locate mysql.h >/usr/local/mysql/include/mysql/mysql.h > >mysql_version.h and mysql.h are located at the same directory, but the >sources expect them to be at a different location. >Please state if you do not wish to fix the sources, in which case I'll >have to submit for mySQL AB to fix their installation script to copy the >files based on where Kannel expects them to be. Well are you really sure those include files are not copied to /usr/include/mysql (or some other reasonable location) once you type "make install" in the mysql distribution? It would mean that EVERY standard application being compiled using mysql needs specific compile flags to find the include files and library files. I dont think so. In any case, kannel has to know where they are and in your case they seem to be not in a location where any kannel developer has found them before. -- Andreas Fink Fink-Consulting -- Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com -- Something urgent? Try http://www.smsrelay.com/ Nickname afink
Re: problems compiling kannel with mySQL.
Hi Oded, well, I know personally who installed the mySQL for you. The problem is in your side, and the installation is not default. Next time ask your administrator to install mysql as usual people do, and not play with lib directories. For now linking the lib dir as Andreas proposed will solve the issue. The lib directory of a specific system should still remain standard for this specific linux distro, and usually its /usr/local/lib or /usr/lib, so placing libraries in some place like /usr/local/mysql/lib is not the wise step if you want to have less headaches. - Original Message - From: "Oded Arbel" <[EMAIL PROTECTED]> To: "Andreas Fink" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, January 08, 2002 3:40 PM Subject: RE: problems compiling kannel with mySQL. > Yaouch ! this will still not work - it doesn't matter where mySQL > include files are, as long as mysql.h and mysql_version.h are on the > same directory, kannel will not compile successful. > check your installtion - my installation is default, so unless mySQL has > changed the location of it's mysql_version.h file sometime and we have > different versions, your's should be just the same as mine. > > Oded Arbel > m-Wise ltd. > > -Original Message- > From: Andreas Fink [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 08, 2002 3:34 PM > To: Oded Arbel > Cc: [EMAIL PROTECTED] > Subject: RE: problems compiling kannel with mySQL. > > > >I think you missed the point. my files are where they are supposed to > >be. all the include files are at /usr/local/mysql/include/mysql/*.h > >which is where they're supposed to be in a --prefix=/usr/local/mysql > >installation of mySQL.. you refer to a --prefix=/usr/local > installation, > >which is not the case here - note the kannel configuration switch I > >used. > >I simply claim that the two files that include mySQL headers don't > agree > >with each other where those headers are supposed to be, and one of them > >does not agree with the configure script - in which case one of those > >should be fixed : either the configure script and gw/shared.c or > >gw/dlr.c. > > > well you say that the include files are supposed to be in > /usr/local/mysql/include/mysql/*.h, well they arent in my mysql > installations (Redhat 7.1, Cobalt Cube 6.2, MacOS X) and many others > out there. > > ln -s /usr/local/mysql/include/mysql /usr/include/mysql > > And you're all set. For now and for the future. > > > >[oded@superion gateway]$./configure --with-mysql=/usr/local/mysql > >--enable-mysql-dlr > >[oded@superion gateway]$ make > > > >gcc -D_REENTRANT=1 -I. -I/usr/include/libxml2/libxml > >-I/usr/include/libxml2 -DBROKEN_PTHREADS=1 > >-I/usr/local/mysql/include/mysql -o gw/dlr.o -c gw/dlr.c > >gw/dlr.c:47: mysql/mysql.h: No such file or directory > >make: *** [gw/dlr.o] Error 1 > >[oded@superion gateway]$ rgrep '#include.*mysql' * > >gw/dlr.c:#include > >gw/shared.c:#include > >[oded@superion gateway]$ locate mysql_version.h > >/usr/local/mysql/include/mysql/mysql_version.h > >[oded@superion gateway]$ locate mysql.h > >/usr/local/mysql/include/mysql/mysql.h > > > >mysql_version.h and mysql.h are located at the same directory, but the > >sources expect them to be at a different location. > >Please state if you do not wish to fix the sources, in which case I'll > >have to submit for mySQL AB to fix their installation script to copy > the > >files based on where Kannel expects them to be. > > Well are you really sure those include files are not copied to > /usr/include/mysql (or some other reasonable location) once you type > "make install" in the mysql distribution? It would mean that EVERY > standard application being compiled using mysql needs specific > compile flags to find the include files and library files. I dont > think so. In any case, kannel has to know where they are and in your > case they seem to be not in a location where any kannel developer has > found them before. > > -- > > Andreas Fink > Fink-Consulting > > -- > Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 > Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland > E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com > -- > Something urgent? Try http://www.smsrelay.com/ Nickname afink > >
Re: problems compiling kannel with mySQL.
On Tue, Jan 08, 2002 at 03:40:54PM +0200, Oded Arbel wrote: > Yaouch ! this will still not work - it doesn't matter where mySQL > include files are, as long as mysql.h and mysql_version.h are on the > same directory, kannel will not compile successful. Really? It works fine for me with them both in /usr/include/mysql: [dholland@geodude dholland]$ locate mysql.h /usr/include/mysql/mysql.h [dholland@geodude dholland]$ locate mysql_version.h /usr/include/mysql/mysql_version.h [dholland@geodude dholland]$ [dholland@geodude gateway]$ ./configure --with-mysql=/usr . checking for MySQL client support in... /usr checking for /usr/include/mysql/mysql.h... yes checking for mysql/mysql.h... yes checking for mysql/mysql_com.h... yes checking for mysql/mysql_version.h... yes . and the build succeeds. This is on Red Hat 7.1 with the mysql-devel-3.23.36-1 rpm. I am interested to know what the difference in file layouts is between the Red Hat packaged version and the default MySQL install. Dave -- David Holland =*= Systems Manager =*= tel: +44 01223 478900 http://www.3glab.com/ =*= 3G Lab, UK =*= fax: +44 01223 478901
RE: problems compiling kannel with mySQL.
You are right, sorry. by installing mySQL with --prefix=/usr it will compile while both files are in the same directory, because the configure script (when called with --with-mysql=/usr) will build a include switch for mysql by slapping /include/mysql on it's with-mysql dir, which will help gw/shared.c include mysql_version.h, and also - gcc always implicitly includes /usr/include which will allow gw/dlr.c to include mysql/mysql.h . I guess that a similar conicidence causes mySQL installation with --prefix=/usr/local to work also. but it still causes kannel to fail compilation with mysql installations to non-standard prefix (which does not mean that the installation is non standard - just that it's in a non-standard directory). the whole point of the --with-mysql switch to allow people to install mySQL to non-standard location, otherwise a simple search will do. Oded Arbel m-Wise ltd. -Original Message- From: David Holland [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 4:34 PM To: Oded Arbel Cc: [EMAIL PROTECTED] Subject: Re: problems compiling kannel with mySQL. On Tue, Jan 08, 2002 at 03:40:54PM +0200, Oded Arbel wrote: > Yaouch ! this will still not work - it doesn't matter where mySQL > include files are, as long as mysql.h and mysql_version.h are on the > same directory, kannel will not compile successful. Really? It works fine for me with them both in /usr/include/mysql: [dholland@geodude dholland]$ locate mysql.h /usr/include/mysql/mysql.h [dholland@geodude dholland]$ locate mysql_version.h /usr/include/mysql/mysql_version.h [dholland@geodude dholland]$ [dholland@geodude gateway]$ ./configure --with-mysql=/usr . checking for MySQL client support in... /usr checking for /usr/include/mysql/mysql.h... yes checking for mysql/mysql.h... yes checking for mysql/mysql_com.h... yes checking for mysql/mysql_version.h... yes . and the build succeeds. This is on Red Hat 7.1 with the mysql-devel-3.23.36-1 rpm. I am interested to know what the difference in file layouts is between the Red Hat packaged version and the default MySQL install. Dave -- David Holland =*= Systems Manager =*= tel: +44 01223 478900 http://www.3glab.com/ =*= 3G Lab, UK =*= fax: +44 01223 478901
Re: problems compiling kannel with mySQL.
>I am interested to know what the difference in file layouts is between >the Red Hat packaged version and the default MySQL install. I did (on MacOS X) tar -xvzf mysql-3.23.47.tar.gz cd mysql-3.23.47 ./configure make make install so far I got all include files /usr/local/include/mysql as the config script expects them. -- Andreas Fink Fink-Consulting -- Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [EMAIL PROTECTED] Homepage: http://www.finkconsulting.com -- Something urgent? Try http://www.smsrelay.com/ Nickname afink