Linux.com

Author Message
Joined: Apr 10, 2008
Posts: 9
Other Topics
Posted Apr 28, 2008 at 7:19:06 AM
Subject: Error building libmysql.a statically with glibc

Hi !
I have downloaded the MySQL-devel-5.0.51a-0.glibc23.i386.rpm and I am trying to build my application statically with glibc. I get the following error during the linking time.

./lib/out/linux/debug32/mysql/libmysqlclient_r.a(mf_pack.o)(.text+0x8dc): In function `expand_tilde':
: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/out/linux/debug32/mysql/libmysqlclient_r.a(libmysql.o)(.text+0xdff): In function `read_user_name':
: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/out/linux/debug32/mysql/libmysqlclient_r.a(mf_pack.o)(.text+0x8e9): In function `expand_tilde':
: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ymail.o(.text+0x27d6): In function `wyMail::GetName(char**) const':
./lib/webyog/src/ymail.cpp:393: warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ymail.o(.text+0x26e1): In function `wyMail::ConnectToServer(char*, unsigned int)':
./lib/webyog/src/ymail.cpp:331: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/out/linux/debug32/mysql/libmysqlclient_r.a(my_gethostbyname.o)(.text+0x3e): In function `my_gethostbyname_r':
: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/out/linux/debug32/mysql/libmysqlclient_r.a(libmysql.o)(.text+0xd9): In function `mysql_server_init':
: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

please help me to solve this problem. Is there any libmysql library that will not require glibc library at runtime so that I can statically include the library in my program.

How can I create an application that will be universal and can run in any linux distro.

Thanks & Regards

Supratik

Back to top Profile Email Website
Shashank Sharma
Joined Jan 01, 1970
Posts: 1536
Location:New Delhi, India

Other Topics
Posted: May 05, 2008 9:50:17 AM
Subject: Error building libmysql.a statically with glibc

What glibc are you running? Try using 2.2 if you're using something newer.

Coauthor of Beginning Fedora: From Novice to Professional published by Apress.

Please follow the Forum Guidelines

Back to top Profile Email Website Yahoo!
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya