Installation on Linux
-
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 supportPath to the libmysqlclient already there...
What am I missing ? Please help...
Thanks.
Best regards,
Adiyat -
Hello.
You also need to install development packages (MySQL-devel-standard-5.0.27-0.rhel4.rpm).
-
-
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
-
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 supportBest regards,
Adiyat -
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?
-
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 -
-
...
/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:
- 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."
- 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.
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login