Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Odd behaviour with mysql_config  (Read 2575 times)

0 Members and 1 Guest are viewing this topic.

ShelLuser

  • Guest
Odd behaviour with mysql_config
« on: January 11, 2008, 12:32:04 PM »

OS: Solaris 10/x86
Anope version: 1.7.21
GCC version: 3.4.3

Hi guys,
Its been a while since I compiled Anope on Solaris, last time it had some difficulties with grokking the data from mysql_config. However, when I tried it again with the current version (1.7.21) the script picks up the location of the libraries quite well, but then starts using a rather odd (to me at least) gcc language which makes the configure script ignore mysql support.

Here's what I'm talking about (from config.log after using the Config front-end script):

Code: [Select]

configure:3211: checking for mysql_config
configure:3229: found /usr/sfw/bin/mysql_config
configure:3242: result: /usr/sfw/bin/mysql_config
configure:3293: gcc -o conftest -pipe -g -O2 -I/usr/sfw/include/mysql -xstrconst -mt   -R
/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -
lposix4 -lcrypt -lgen -lsocket -lnsl -lm conftest.c  >&5
gcc: language strconst not recognized
ld: fatal: file conftest.c: unknown file type
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status


As you can see it finds the mysql_config program just fine, it also picks up the correct location of the libraries (/usr/sfw/lib/mysql) but fails when its trying to use -xstrconst. I looked this up in the manpage and indeed; -x is used to specify a language and strconst obviously isn't one.

Can anyone shed some light as to whats going on here?

With kind regards, Peter
Logged

ShelLuser

  • Guest
(No subject)
« Reply #1 on: January 11, 2008, 01:11:29 PM »

Ok, the usual mistake of writing first and re-reading later. The problem is pretty easily explained:

magi:/home/peter $ mysql_config --cflags
-I/usr/sfw/include/mysql -xstrconst -mt

As noted before gcc doesn't grok this and there is the problem. But this time it would seem to be a specific Solaris problem because on Linux the --cflags doesn't respond this way.

However; it does make me wonder why only the options from --cflags are being used in Anope and why you're seemingly ignoring --include and --libs to get both the correct include and library options. --cflags only gives you the include directory but does not specify the needed libraries.
Logged
Pages: [1]   Go Up