SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm compiling asterisk-addons, which requires mysql_devel. However I can't find a mysql_devel package anywyere on slackware.com or linuxpackages.net or using swaret...
Is there a package out there which I can install, and if not, how do I install mysql_devel from the mysql source tarball? I already have a mysql server running on this machine, but seemingly not the mysql-devel stuff.
unpack the source (make sure it's the same version as the libs on your system) and point your CFLAGS to include that directory that the headers are in (if the libraries are in your LD_LIBRARY_PATH or have been cached by ldconfig you shouldn't have any problems as long as you have the libs on your system).
Thanks for the reply. I'm afraid I'm a bit confused by some of this stuff..
Quote:
unpack the source
okay - got that far!
[quote]
(make sure it's the same version as the libs on your system)
Quote:
the source I downloaded was for mysql version 4.0.23a. What are the 'libs' that you're referring to? How to I know their version?
[quote[
and point your CFLAGS to include that directory that the headers are in (if the libraries are in your LD_LIBRARY_PATH or have been cached by ldconfig you shouldn't have any problems as long as you have the libs on your system).
I guess you mean in the asterisk-addons Makefile. Well at the moment I already have some lines which appear to do this job - for example
MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi)
MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
There are 9 lines like this which attempt to find the mysql libraries, and one of them points to /usr/include/mysql which contains 30 or so .h files. Do I still need to do something here?
Maybe it would help for you to see what error i get when I try to compile asterisk-addons:
Quote:
root@jones:/usr/src/asterisk-addons# make install
./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls *.c`
app_addon_sql_mysql.c:164:64: macro "AST_LIST_REMOVE" requires 4 arguments, but only 3 given
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o cdr_addon_mysql.o cdr_addon_mysql.c
cdr_addon_mysql.c:50: warning: parameter names (without types) in function declaration
cdr_addon_mysql.c:50: warning: data definition has no type or storage class
cdr_addon_mysql.c: In function `mysql_log':
cdr_addon_mysql.c:109: `mysql_lock' undeclared (first use in this function)
cdr_addon_mysql.c:109: (Each undeclared identifier is reported only once
cdr_addon_mysql.c:109: for each function it appears in.)
cdr_addon_mysql.c: In function `my_load_module':
cdr_addon_mysql.c:269: warning: assignment makes pointer from integer without a cast
cdr_addon_mysql.c: In function `usecount':
cdr_addon_mysql.c:439: `mysql_lock' undeclared (first use in this function)
make: *** [cdr_addon_mysql.o] Error 1
I have tried that - in fact the header files are located under /usr/src/asterisk/include/aterisk, but I have tried comiling with both of the following in my makefile:
CFLAGS+=$(shell if [ -d ../asterisk/include/asterisk ]; then echo "-I../asterisk/include/asterisk"; fi)
CFLAGS+=$(shell if [ -d ../asterisk/include ]; then echo "-I../asterisk/include"; fi)
I still get the following error:
Quote:
root@jones:/usr/src/asterisk-addons# make install
./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I../asterisk/include/asterisk -I../asterisk/include -I/usr/include/mysql `ls *.c`
app_addon_sql_mysql.c:164:64: macro "AST_LIST_REMOVE" requires 4 arguments, but only 3 given
cc -fPIC -I../asterisk -D_GNU_SOURCE -I../asterisk/include/asterisk -I../asterisk/include -I/usr/include/mysql -c -o cdr_addon_mysql.o cdr_addon_mysql.ccdr_addon_mysql.c:50: warning: parameter names (without types) in function declaration
cdr_addon_mysql.c:50: warning: data definition has no type or storage class
cdr_addon_mysql.c: In function `mysql_log':
cdr_addon_mysql.c:109: `mysql_lock' undeclared (first use in this function)
cdr_addon_mysql.c:109: (Each undeclared identifier is reported only once
cdr_addon_mysql.c:109: for each function it appears in.)
cdr_addon_mysql.c: In function `my_load_module':
cdr_addon_mysql.c:269: warning: assignment makes pointer from integer without a cast
cdr_addon_mysql.c: In function `usecount':
cdr_addon_mysql.c:439: `mysql_lock' undeclared (first use in this function)
make: *** [cdr_addon_mysql.o] Error 1
I'm wondering if this is because I need to install mysql-devel? This suggests that it's not installed:
Quote:
root@jones:~# which mysql-devel
which: no mysql-devel in (/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games)
As a note mysql header files are already inclued in the official slackware package, no
need to install additional files when you want to compile and link a program with
mysql library
header files are installed in : /usr/include/mysql
As I said, no need to install additional packages to compile and link a program to
mysql lib, the official slackware package install all required files
In other word the mysql package has 'devel' built-in as any other slackware packages
(and it is one of thousand reasons I chose Slackware as Linux distribution)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.