skipping incompatible libmysqlclient

Started by MVLeor, November 12, 2008, 02:58:30 PM

Previous topic - Next topic

MVLeor

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.


Victor Kirhenshtein

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

MVLeor

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?

Victor Kirhenshtein

Yes, try to google for

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

- it gives you a lot of compilation issues with various products.

MVLeor

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!

MVLeor


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

Thanks.


phungtan

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!

Victor Kirhenshtein

Please post your config.log

Best regards,
Victor

phungtan

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

Victor Kirhenshtein

Did you have libmysqlclient.so somewhere in the system? If yes, where?

Best regards,
Victor

lima25

I compiled using:

LDFLAGS=-lmysqlclient ./configure --with-server --with-nxhttpd --with-mysql --with-openssl --with-agent --with-client

possamai

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.....

possamai

#12
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

possamai

Still no solution?
Could it have something to do with the version of mysql?
I'm running Mysql 5.1

Victor Kirhenshtein

#14
Please try 1.0.0-rc2 (https://www.netxms.org/download/netxms-1.0.0-rc2.tar.gz) - this problem should be fixed.

Best regards,
Victor