News:

We really need your input in this questionnaire

Main Menu

Installation on Linux

Started by inadiyat, November 13, 2006, 08:44:20 AM

Previous topic - Next topic

inadiyat

Hi,

Now I would like to install on Linux Box (uname -a shows: Linux saivrap2 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:04:33 EDT 2005 i686 athlon i386 GNU/Linux). I want to install NetXMS server and agent using mysql database.

I have installed following MySQL modules using rpm -i :
- MySQL-server-standard-5.0.27-0.rhel4.i386.rpm
- MySQL-client-standard-5.0.27-0.rhel4.i386.rpm
- MySQL-devel-standard-5.0.27-0.rhel4.i386.rpm
- MySQL-shared-standard-5.0.27-0.rhel3.i386.rpm

But when I run:

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

I got this error:

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

Path to the libmysqlclient already there...

What am I missing ? Please help...

Thanks.

Best regards,
Adiyat

Alex Kirhenshtein

Hello.

You also need to install development packages (MySQL-devel-standard-5.0.27-0.rhel4.rpm).

inadiyat

Yes, I did... (as I post in my question above)

But the problem still there....

Any other idea ?

Thank you very much in advance...

Best regards,
Adiyat

Alex Kirhenshtein

Sorry, i was inattentive.

Please show your config.log, lines between:

configure:4714: checking for mysql_init in -lmysqlclient

and

configure:4786: error: libmysqlclient is requred for MySQL support

inadiyat

Thanks for your quick reply, below is the data you asked for (from config.log):

configure:4714: checking for mysql_init in -lmysqlclient
configure:4744: gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS -fno-rtti -fno-exceptions -I/usr/local/include -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 -s -L/usr/local/lib -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 conftest.c -lmysqlclient  -lm  >&5
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x65): In function `my_compress_alloc':
/home/mysqldev/rpm/BUILD/mysql-5.0.27/libmysql/my_compress.c:58: undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x178): In function `my_uncompress':
/home/mysqldev/rpm/BUILD/mysql-5.0.27/libmysql/my_compress.c:85: undefined reference to `uncompress'
collect2: ld returned 1 exit status
configure:4750: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "NetXMS"
| #define PACKAGE_TARNAME "netxms"
| #define PACKAGE_VERSION "0.2.13"
| #define PACKAGE_STRING "NetXMS 0.2.13"
| #define PACKAGE_BUGREPORT "NetXMS Team <[email protected]>"
| #define PACKAGE "netxms"
| #define VERSION "0.2.13"
| #ifdef __cplusplus
| extern "C" void std::exit (int) throw (); using std::exit;
| #endif
| #define HAVE_LIBM 1
| #define WITH_MYSQL
| /* end confdefs.h.  */
|
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char mysql_init ();
| int
| main ()
| {
| mysql_init ();
|   ;
|   return 0;
| }
configure:4776: result: no
configure:4786: error: libmysqlclient is requred for MySQL support

Best regards,
Adiyat

Alex Kirhenshtein

Looks like zlib is not detected. Try to configure it that way:

LDFLAGS=-lz ./configure --with-server --with-agent --with-mysql

If it fails, check, if zlib-devel is installed?

inadiyat

YES !!!!

It works now....

I just need to install zlib-devel-1.1.4-8.7x.i386.rpm (www.zlib.net).

Thank you very much for your great support.

Best regards,
Adiyat

inadiyat

BTW, how do you get to this conclusion ? (Need zlib-devel). I have to learn something from this...

Thanks & Best regards,
Adiyat

Alex Kirhenshtein

...
/home/mysqldev/rpm/BUILD/mysql-5.0.27/libmysql/my_compress.c:58: undefined reference to `compress'
...
/home/mysqldev/rpm/BUILD/mysql-5.0.27/libmysql/my_compress.c:85: undefined reference to `uncompress'
...

"undefined reference" means that linker was unable to resolve (=find) functions "compress" and "decompress" in all given libraries - mysql probably use them for client/server protocol compression.

Next steps can vary:
1) search google: "mysql undefined reference compress uncompress" will take you to the http://dev.mysql.com/doc/refman/5.0/en/link-errors.html, "Problems Linking to the MySQL Client Library" with solution: "If you get undefined reference errors for the uncompress or compress  function, add -lz to the end of your link command and try again."
2) grep *.so/*.a files in your /usr/lib (/lib, etc) for missing symbol. You can later check exact library using "nm" tool:

alk@ns$ nm libz.a | grep "T compress"
000000a4 T compress
00000000 T compress2

"T" means that this function exist in this exact library.

inadiyat

Again, thank you very much...