Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Can't compile with MYSQL support  (Read 6545 times)

0 Members and 1 Guest are viewing this topic.

James

  • Anope User
  • Offline Offline
  • Posts: 6
Can't compile with MYSQL support
« on: January 16, 2013, 06:31:52 PM »

I'm running freebsd, though, I don't think that matters.  The version of anope I'm trying to install is 1.8.7.  I compiled and installed mysql from source into /usr/local/software/mysql

my ./configure line is as follows:
Code: [Select]
./configure --with-bindir=/home/ircd/services --with-datadir=/home/ircd/services --with-rungroup=ircd --with-permissions=007 --mandir=/usr/local/man --with-mysql=yes --with-mysqlconfig-path=/usr/local/software/mysql/bin
After the configure script runs, I get

Modules: Yes
  MySQL: No

The permissions inside /usr/local/software/mysql look like this
Code: [Select]
ircd@ircd:/home/ircd/anope-1.8.7 % ls -la /usr/local/software/mysqltotal 92
drwxr-xr-x  13 root   wheel    512 Jan 16 13:59 .
drwxr-xr-x   4 root   wheel    512 Jan 16 13:45 ..
-rw-r--r--   1 root   wheel  17987 Dec 10 06:16 COPYING
-rw-r--r--   1 root   wheel   7605 Dec 10 06:16 INSTALL-BINARY
-rw-r--r--   1 root   wheel   2552 Dec 10 06:16 README
drwxr-xr-x   2 root   wheel   1024 Jan 16 14:03 bin
drwxr-xr-x   4 mysql  mysql    512 Jan 16 18:19 data
drwxr-xr-x   2 root   wheel    512 Jan 16 13:45 docs
drwxr-xr-x   3 root   wheel   1024 Jan 16 13:45 include
drwxr-xr-x   3 root   wheel    512 Jan 16 13:46 lib
-rw-r--r--   1 root   wheel   4740 Jan 16 13:52 my.cnf
drwxr-xr-x  10 root   wheel    512 Jan 16 13:47 mysql-test
drwxr-xr-x   3 root   wheel    512 Jan 16 13:58 scripts
drwxr-xr-x  27 root   wheel   1024 Jan 16 13:47 share
drwxr-xr-x   4 root   wheel   1024 Jan 16 13:47 sql-bench
drwxr-xr-x   2 root   wheel    512 Jan 16 13:47 support-files
drwxr-xr-x   2 mysql  mysql    512 Jan 16 18:19 tmp

The permissions for mysql_config is as follows:
Code: [Select]
ircd@ircd:/home/ircd/anope-1.8.7 % ls -la /usr/local/software/mysql/bin/mysql_config-rwxr-xr-x  1 root  wheel  6788 Jan 16 13:25 /usr/local/software/mysql/bin/mysql_config

I'm at a loss here.  I don't know what I need to do to make it work.  Any help would be appreciated.

Thanks,

James
Logged

James

  • Anope User
  • Offline Offline
  • Posts: 6
Re: Can't compile with MYSQL support
« Reply #1 on: January 16, 2013, 07:10:11 PM »

I dropped the --with-mysql=yes line from the ./configure script.  That seemed to get the configure script to run the 2 mysql_config checks in the configure script.  However, now, I'm getting:

./configure: /usr/local/software/mysql/bin: Permission denied
./configure: /usr/local/software/mysql/bin: Permission denied

Not sure why.  Running the commands against mysql_config from the command line provides positive results.  Running the commands via the ./configure script produces permission denied.  I'm still going to keep poking away and see what I can come up with.
Logged

James

  • Anope User
  • Offline Offline
  • Posts: 6
Re: Can't compile with MYSQL support
« Reply #2 on: January 16, 2013, 07:14:42 PM »

Well, I got farther.  I changed the the --with-mysqlconfig-path=/usr/local/software/bin part to /usr/local/software/mysql/bin/mysql_config and that got me past the permission denied errors.  Now it's reporting this:

checking for mysql_config... /usr/local/software/mysql/bin/mysql_config
checking if mysql_config produces valid values... no

So now I'm going to see if I can find that second line in the configure script and see if I can get this sorted.  Meanwhile, if anyone can help, I'd appreciate it.
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: Can't compile with MYSQL support
« Reply #3 on: January 16, 2013, 07:24:25 PM »

Anope is designed to be installed as and run as a non-root user. Also you don't need to run ./configure. Please run ./Config instead.
Logged

James

  • Anope User
  • Offline Offline
  • Posts: 6
Re: Can't compile with MYSQL support
« Reply #4 on: January 16, 2013, 07:50:07 PM »

I can't use ./Config because I need to pass a user-defined path to mysql_config and ./Config doesn't allow me to do that, and I was installing it as a non-root user called ircd.
Logged

James

  • Anope User
  • Offline Offline
  • Posts: 6
Re: Can't compile with MYSQL support
« Reply #5 on: January 16, 2013, 08:20:38 PM »

From config.log
242:Shared object "libmysqlclient.so.18" not found, required by "conftest"

I think that has something to do with it, but in /usr/local/software/mysql/lib it's there

ircd@ircd:/usr/local/software/mysql/lib % pwd
/usr/local/software/mysql/lib
ircd@ircd:/usr/local/software/mysql/lib % ls -la
total 9780
drwxr-xr-x   3 root  wheel      512 Jan 16 13:46 .
drwxr-xr-x  13 root  wheel      512 Jan 16 13:59 ..
-rw-r--r--   1 root  wheel  5975332 Jan 16 13:44 libmysqlclient.a
lrwxr-xr-x   1 root  wheel       20 Jan 16 13:46 libmysqlclient.so -> libmysqlclient.so.18
-rwxr-xr-x   1 root  wheel  3929401 Jan 16 13:44 libmysqlclient.so.18
lrwxr-xr-x   1 root  wheel       16 Jan 16 13:46 libmysqlclient_r.a -> libmysqlclient.a
lrwxr-xr-x   1 root  wheel       17 Jan 16 13:46 libmysqlclient_r.so -> libmysqlclient.so
lrwxr-xr-x   1 root  wheel       17 Jan 16 13:46 libmysqlclient_r.so.18 -> libmysqlclient.so
-rw-r--r--   1 root  wheel     6868 Jan 16 13:43 libmysqlservices.a
drwxr-xr-x   3 root  wheel      512 Jan 16 13:45 plugin

Any ideas as to why conftest can't find a file that's there?  The file may be owned by root, but it's world readable.  So it's not a permissions issue.  This stumps me.
Logged

James

  • Anope User
  • Offline Offline
  • Posts: 6
Re: Can't compile with MYSQL support
« Reply #6 on: January 16, 2013, 10:44:05 PM »

I found the solution:

setenv LD_LIBRARY_PATH "/usr/local/software/mysql/lib"

That caused these 2 things to occur:

1)checking if mysql_config produces valid values... yes
2)Modules: Yes
  MySQL: Yes

So, I fixed my own problem.  You can mark this topic as solved.
Logged
Pages: [1]   Go Up