NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: Installation on Linux  (Read 7257 times)

inadiyat

  • Newbie
  • *
  • Posts: 15
    • View Profile
Installation on Linux
« on: November 13, 2006, 08:44:20 am »

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
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 910
    • View Profile
Installation on Linux
« Reply #1 on: November 13, 2006, 09:56:30 am »

Hello.

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

inadiyat

  • Newbie
  • *
  • Posts: 15
    • View Profile
Installation on Linux
« Reply #2 on: November 13, 2006, 10:23:20 am »

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
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 910
    • View Profile
Installation on Linux
« Reply #3 on: November 13, 2006, 11:03:43 am »

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
Logged

inadiyat

  • Newbie
  • *
  • Posts: 15
    • View Profile
Installation on Linux
« Reply #4 on: November 13, 2006, 11:30:51 am »

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 <bugs@netxms.org>"
| #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
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 910
    • View Profile
Installation on Linux
« Reply #5 on: November 13, 2006, 01:08:38 pm »

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?
Logged

inadiyat

  • Newbie
  • *
  • Posts: 15
    • View Profile
Installation on Linux
« Reply #6 on: November 13, 2006, 01:52:09 pm »

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
Logged

inadiyat

  • Newbie
  • *
  • Posts: 15
    • View Profile
Installation on Linux
« Reply #7 on: November 13, 2006, 01:56:33 pm »

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

Thanks & Best regards,
Adiyat
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 910
    • View Profile
Installation on Linux
« Reply #8 on: November 13, 2006, 03:16:48 pm »

...
/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,'>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.
Logged

inadiyat

  • Newbie
  • *
  • Posts: 15
    • View Profile
Installation on Linux
« Reply #9 on: November 14, 2006, 01:44:55 am »

Again, thank you very much...
Logged