NetXMS Support Forum

English Support => General Support => Topic started by: MVLeor on November 12, 2008, 02:58:30 PM

Title: skipping incompatible libmysqlclient
Post by: MVLeor on November 12, 2008, 02:58:30 PM
Hi,

I'm installing netxms-0.2.22 on Linux 2.6.25-14.fc9.x86_64.
After installing rpms for MySQL 5.0.67 and ZLib 1.2.3-18, I run:

sh ./configure --with-server --with-mysql --with-agent

and get this error:
checking for mysql_init in -lmysqlclient... no
configure: error: libmysqlclient is requred for MySQL support

config.log says:

/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient



I'd appreciate any insights on this,

Regards,

Lior Neuman
R&D Team
MailVision LTD.

Title: Re: skipping incompatible libmysqlclient
Post by: Victor Kirhenshtein on November 12, 2008, 03:26:06 PM
Hello!

Looks like you either have only 32-bit MySQL binaries, or bug in NetXMS configure. All these libraries skipped because they are 32 bit, but NetXMS compiles as 64bit application on x64 platforms. Do you have libmysqlclient.so somewhere under /usr/lib64? Btw, quick google search on error message impress me that it's quite common problem on FC.

Best regards,
Victor
Title: Re: skipping incompatible libmysqlclient
Post by: MVLeor on November 12, 2008, 03:57:44 PM
Hi,

Thanks for the swift reply!
No, I don't have any libmysql under /usr/lib64, and I think you are right about the versions,
let me check it and post the result.

BTW, I googled for 'netxms "skipping incompatible"', you're saying this isn't a netxms issue but something more general?
Title: Re: skipping incompatible libmysqlclient
Post by: Victor Kirhenshtein on November 12, 2008, 04:21:28 PM
Yes, try to google for

"skipping incompatible" libmysqlclient.so "when searching for -lmysqlclient"

- it gives you a lot of compilation issues with various products.
Title: Re: skipping incompatible libmysqlclient
Post by: MVLeor on November 13, 2008, 03:43:10 PM
OK, I've installed mysql, now "ls /usr/lib64/mysql/  " gives:

libmysqlclient_r.so     libmysqlclient_r.so.15.0.0  libmysqlclient.so.15      mysqlbug
libmysqlclient_r.so.15  libmysqlclient.so           libmysqlclient.so.15.0.0  mysql_config
sh ./configure --with-server --with-mysql --with-agent
fails with this error:

checking for mysql_init in -lmysqlclient... yes
checking whether mysql clients can run... no
configure: error: Your MySQL client libraries aren't properly installed

config.log reads:

configure:33002: checking whether mysql clients can run
configure:33033: gcc -o conftest -g -O2  -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/i
conftest.c:141:19: error: mysql.h: No such file or directory
conftest.c: In function 'main':
conftest.c:144: error: 'MYSQL' undeclared (first use in this function)
conftest.c:144: error: (Each undeclared identifier is reported only once
conftest.c:144: error: for each function it appears in.)
conftest.c:144: error: 'a' undeclared (first use in this function)
configure:33036: $? = 1
configure: program exited with status 1

Thanks for any help!
Title: Re: skipping incompatible libmysqlclient
Post by: MVLeor on November 13, 2008, 04:46:19 PM

I was missing the correct version of mysql-devel
The missing includes gave it in..

Thanks.

Title: Re: skipping incompatible libmysqlclient
Post by: phungtan on December 26, 2009, 10:18:29 AM
I also was a bug like that.
Hope you help me solve.

after I run the command  $ cd: netxms-0.2.31
                                  $ Sh. / Configure - with-server - with-mysql - with-agent
==> Checking for mysql_init in-lmysqlclient ... no
       configure: error: libmysqlclient is requred for MySQL support

Help me please!
Title: Re: skipping incompatible libmysqlclient
Post by: Victor Kirhenshtein on December 26, 2009, 11:05:19 AM
Please post your config.log

Best regards,
Victor
Title: Re: skipping incompatible libmysqlclient
Post by: phungtan on December 26, 2009, 03:28:37 PM
Myfile config.log
configure:30964: $? = 0
configure:30970: ./conftest
configure:30974: $? = 0
configure:30976: result: yes
configure:31002: checking for iconv declaration
configure:31036: gcc -c -g -O2  -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql -D_GNU_SOURCE -I/usr/local/include  conftest.c >&5
configure:31043: $? = 0
configure:31058: result:
configure:31091: checking for mysql_init in -lmysqlclient
configure:31126: gcc -o conftest -g -O2  -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql -D_GNU_SOURCE -I/usr/local/include   -L/usr/local/mysql/lib -L/usr/lib64/mysql -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql -L/usr/local/lib -lpthread conftest.c -lmysqlclient  -lz -ldl -lcrypto -lcrypto -lcrypto  >&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure:31133: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "NetXMS"
| #define PACKAGE_TARNAME "netxms"
| #define PACKAGE_VERSION "0.2.31"
| #define PACKAGE_STRING "NetXMS 0.2.31"
| #define PACKAGE_BUGREPORT "NetXMS Team <[email protected]>"
/* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char mysql_init ();
| int
| main ()
| {
| return mysql_init ();
|   ;
|   return 0;
| }
configure:31154: result: no
configure:31164: error: libmysqlclient is requred for MySQL support
Title: Re: skipping incompatible libmysqlclient
Post by: Victor Kirhenshtein on December 26, 2009, 04:05:43 PM
Did you have libmysqlclient.so somewhere in the system? If yes, where?

Best regards,
Victor
Title: Re: skipping incompatible libmysqlclient
Post by: lima25 on February 27, 2010, 12:13:38 AM
I compiled using:

LDFLAGS=-lmysqlclient ./configure --with-server --with-nxhttpd --with-mysql --with-openssl --with-agent --with-client
Title: Re: skipping incompatible libmysqlclient
Post by: possamai on February 28, 2010, 03:36:01 PM
same problem on FreeBSD :-(


checking whether iconv supports UCS-2BE... yes
checking whether iconv supports UCS-2LE... yes
checking whether iconv supports UCS-4-INTERNAL... yes
checking whether iconv supports UCS-4... yes
checking whether iconv supports UCS4... no
checking whether iconv supports UCS-4BE... yes
checking whether iconv supports UCS-4LE... yes
checking whether iconv supports ISO8859-1... yes
checking whether iconv supports ISO-8859-1... yes
checking whether iconv supports ASCII... yes
checking whether iconv supports //IGNORE... yes
checking for iconv declaration... const
checking for mysql_init in -lmysqlclient... no
configure: error: libmysqlclient is requred for MySQL support
$
$
$ find / -name libmysqlclient.so
/usr/local/lib/mysql/libmysqlclient.so


The commandline I used
./configure --with-server --with-agent --with-mysql=/usr/local/lib/mysql/ --prefix=/usr/local/netxms/

I tried with and without the path to the mysql libs but it doesn't matter..

It's all 32bit so that's not the issue.....
Title: Re: skipping incompatible libmysqlclient
Post by: possamai on February 28, 2010, 10:00:22 PM
Got some info from config.log that 'might' be interesting.. I'm no coder so I'm not sure, but it looks like something going bad..
configure:34878: checking whether mysql clients can run
configure:34909: gcc -o conftest -g -O2  -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/i
nclude/mysql -I/usr/mysql/include/mysql -I/usr/local/include -D_THREAD_SAFE  -L/usr/local/mysql/lib -L/usr/lib64/mysql -L/usr/lib/mysql -L/usr/mysql/lib -L/u
sr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql -L/usr/local/lib -pthread -liconv conftest.c -lkvm -lexpat -lz -lreadline -ltermcap -l
crypto -lcrypto -lcrypto -lcrypto  >&5
/var/tmp//cc8sb5NG.o(.text+0x19): In function `main':
/root/netxms/netxms-1.0.0-rc1/conftest.c:183: undefined reference to `mysql_init'
configure:34912: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */


If more info is needed, let me know
Title: Re: skipping incompatible libmysqlclient
Post by: possamai on March 06, 2010, 11:07:31 PM
Still no solution?
Could it have something to do with the version of mysql?
I'm running Mysql 5.1
Title: Re: skipping incompatible libmysqlclient
Post by: Victor Kirhenshtein on March 07, 2010, 08:24:27 PM
Please try 1.0.0-rc2 (https://www.netxms.org/download/netxms-1.0.0-rc2.tar.gz (https://www.netxms.org/download/netxms-1.0.0-rc2.tar.gz)) - this problem should be fixed.

Best regards,
Victor
Title: Re: skipping incompatible libmysqlclient
Post by: possamai on March 13, 2010, 04:52:04 AM
It is.
Works great