Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-02-2007, 06:03 AM   #1
LQ Newbie
Registered: Nov 2007
Posts: 9

Rep: Reputation: 0
mysql integrate syslog-ng program error

Hello fends ,
I am working on a syslog-ng 1.6.11 code so that to a write a kernel log message directly to the mysql , for that i have write down the mysql program (#include "/usr/include/mysql mysql" ) , mean i have integrate with syslog-ng code .

Problem :- Syslog-ng need libol for complete installation and in libol there is a file called pkt_buffer.c which use to collect the kernel message and put into buffer.
In syslog-ng folder there is a Makefile which combine but libol and syslog-ng to compile the complete package .
For compilation of mysql porgram we need to provide library path -L/usr/lib/mysql -lmysqlclient -lz , and i have provide that path in Makefile of syslog -ng and libol but its gives same error ;

gcc -g -O2 -Wall -I/usr/local/include/libol -D_GNU_SOURCE -o syslog-ng main.o sources.o center.o filters.o destinations.o log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o afinet.o afinter.o afuser.o afstreams.o afprogram.o afremctrl.o nscache.o utils.o syslog-names.o macros.o -lrt -lnsl -lresolv /usr/local/lib/libol.a -lnsl -Wl,-Bstatic -lfl -Wl,-Bdynamic
/usr/local/lib/libol.a(pkt_buffer.o)(.text+0x229): In function `do_flush':
/usr/local/src/syslog-ng/libol-0.3.16/src/pkt_buffer.c:121: undefined reference to `mysql_init'
/usr/local/lib/libol.a(pkt_buffer.o)(.text+0x25a):/usr/local/src/syslog-ng/libol-0.3.16/src/pkt_buffer.c:127: undefined reference to `mysql_real_connect'
/usr/local/lib/libol.a(pkt_buffer.o)(.text+0x285):/usr/local/src/syslog-ng/libol-0.3.16/src/pkt_buffer.c:129: undefined reference to `mysql_query'
/usr/local/lib/libol.a(pkt_buffer.o)(.text+0x2a5):/usr/local/src/syslog-ng/libol-0.3.16/src/pkt_buffer.c:131: undefined reference to `mysql_affected_rows'
/usr/local/lib/libol.a(pkt_buffer.o)(.text+0x393):/usr/local/src/syslog-ng/libol-0.3.16/src/pkt_buffer.c:133: undef

Can anyone provide me a solution regarding this issue
Old 11-03-2007, 02:06 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Did you try to dynamically link the mysql-stuff rather than

Old 11-04-2007, 05:02 AM   #3
LQ Newbie
Registered: Nov 2007
Posts: 9

Original Poster
Rep: Reputation: 0
i am knew to this field , that why i dont kown how to provide the dynamic and static link .....
but i think so i have provide the dynamic link in the Makefile of syslog-ng/src directory ......
thanx for reply since i am looking for solution for past 2 days .......


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
help to integrate php,apache&mysql badall Linux - Server 3 06-16-2007 03:53 AM
Integrate postfix with existing MySQL database EdMeister Linux - Software 0 04-21-2005 04:52 AM
Trying to integrate Apache w/ Tomcat....error message w/ mlhammer Linux - General 2 10-06-2003 03:10 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration