LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-08-2005, 05:41 AM   #1
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Rep: Reputation: 30
install mysql-devel


Guys,


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.


thanks


christo
 
Old 02-08-2005, 05:49 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
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).
 
Old 02-08-2005, 06:01 AM   #3
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
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

Hope you can help,
thanks

christo
 
Old 02-08-2005, 06:16 AM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
http://lists.digium.com/pipermail/as...ne/051487.html
 
Old 02-08-2005, 06:31 AM   #5
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
Thanks for the link __J.

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)

thanks
christo
 
Old 02-08-2005, 06:33 AM   #6
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
here's another clue..

http://lists.digium.com/pipermail/as...ne/051659.html


c
 
Old 02-08-2005, 06:49 AM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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

Last edited by keefaz; 02-08-2005 at 06:50 AM.
 
Old 02-08-2005, 07:54 AM   #8
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
so to conclude this discussion, does anybody out there know how to install mysql-devel on slackware?




christo
 
Old 02-08-2005, 09:19 AM   #9
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
ok


some how I fixed it..

just by not using the cvs versions of stuff from digium, but rather getting the latest source bundles from their ftp site.



christo
 
Old 02-08-2005, 11:39 AM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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)
 
Old 02-08-2005, 11:48 AM   #11
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
nice

thanks for pointing that out keefaz. That has made things much simpler.


ta


christo
 
  


Reply



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
Need help to install mysql devel in Solaris 8 hkuha Solaris / OpenSolaris 3 02-22-2005 10:29 PM
libXorg devel doesn't exist - until I try to install it! Ygarl Linux - Software 1 02-22-2005 02:34 PM
How to install fluxbox-devel? h1tman Linux - Software 6 11-01-2004 10:06 AM
Package fam-devel needs libselinux-devel belkins Linux - Newbie 2 10-18-2004 03:02 PM
mplayer and gtk-devel and libpng-devel ... purpleburple Linux - Software 1 03-16-2003 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:19 PM.

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