List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 26 1999 12:37pm
Subject:RE: Installation Problem(s) on AIX 4.2.1-04
View as plain text  
>>>>> "Mark" == Mark Chesterfield <mark@stripped> writes:

>> -----Original Message-----
>> From: Michael Widenius [mailto:monty@stripped]

>> >>>>> "Mark" == Mark Chesterfield <mark@stripped>
> writes:
>> 
>> >> Description:
Mark> I'm trying to install mysql-3.22.26a for the first time and
Mark> have hit one or more problems. I run safe_mysqld and the daemons
Mark> seem to start ok, but programs such as mysqladmin fail very early
Mark> in the system routine getservbyname.

Mark> [details deleted]

>> One thing that is confusing is that the MySQL clients (like mysql)
>> aren't normally compiled with threads. Could you mail the line where
>> mysqld is linked so that we can check this?
>> 
>> The output from the following would give us this:
>> 
>> cd client
>> rm mysql
>> make mysql

Mark> /bin/sh ../libtool --mode=link
Mark> gcc  -felide-constructors -fno-exceptions -fno-rtti  -fno-implicit-templates
Mark>  -DSAFEMALLOC -g  -o mysql  mysql.o readline.o sql_string.o
Mark> completion_hash.o ../readline/libreadline.a -lcurses -lgcc
Mark> libmysqlclient.la -lm   -lbind
Mark> libtool: link: warning: this platform does not like uninstalled shared
Mark> libraries
Mark> libtool: link: `mysql' will be relinked during installation
Mark> gcc -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -
Mark> DSAFEMALLOC -g -o .libs/mysql mysql.o readline.o sql_string.o
Mark> completion_hash.o
Mark> ../readline/libreadline.a -lcurses -lgcc -L/usr/local/src/mysql-3.22.26a/cli
Mark> ent/.libs -lmysqlclient -lm -lbind -lm -lbind -L/usr/local/src/mysql-3.22.26
Mark> a/client/.libs -L/usr/local/lib/mysql
Mark> creating mysql

The above looks ok; I can't understand why AIX wants to use the
thread library in this case :(

Mark> I also have the full make log if that would be useful.

Lets first check if the removal of getservbyname() helps..

Mark> I did note that the getservbyname manual page has
>> this statement:
Mark> "Attention: Do not use the getservbyname subroutine in a
>> multithreaded environment."
>> 
>> Did they offer any solutions to this?

Mark> No.

Mark> Here's an online version of the page for AIX4.3. I assume the AIX 4.2 would
Mark> be the same.

Mark> http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/libs/commtrf2/getservbyna
Mark> me.htm#Iu7190cher

Mark> Another interesting point from the manual page is:
Mark> "All applications containing the getservbyname subroutine must be compiled
Mark> with _BSD set to a specific value. Acceptable values are 43 and 44. In
Mark> addition, all socket applications must include the BSD libbsd.a library."

Mark> I haven't found my way thru the code yet to check to see if _BSD is defined
Mark> correctly, but libbsd.a doesn't appear to be in the above link statemtent.
Mark> (unless its been prelinked somewhere)

You can fix this by doing:

CFLAGS=-D_BSD=44 CXXFLAGS=-D_BSD=44  --with-client-ldflags=-lbsd
--with-mysqld-ldflags=-lbsd

>> Anyway, you can safely remove the getservbyname() code for AIX if you
>> want.  Just add the following to include/global.h
>> 
>> #define getservbyname(A,B) 0
>> 
>> and recompile

Mark> I'll give that a try now.

Mark> Thanks for hearing my cry for help

Hope you get this to work!

Regards,
Monty
Thread
Installation Problem(s) on AIX 4.2.1-04Mark Chesterfield24 Sep
  • Installation Problem(s) on AIX 4.2.1-04Michael Widenius25 Sep
    • RE: Installation Problem(s) on AIX 4.2.1-04Mark Chesterfield26 Sep
      • RE: Installation Problem(s) on AIX 4.2.1-04Mark Chesterfield26 Sep
      • RE: Installation Problem(s) on AIX 4.2.1-04Michael Widenius26 Sep
        • RE: Installation Problem(s) on AIX 4.2.1-04Mark Chesterfield28 Sep
          • RE: Installation Problem(s) on AIX 4.2.1-04Michael Widenius29 Sep
        • Re: Installation Problem(s) on AIX 4.2.1-04Adrian Phillips29 Sep
        • Re: Installation Problem(s) on AIX 4.2.1-04Adrian Phillips29 Sep
    • RE: Installation Problem(s) on AIX 4.2.1-04Mark Chesterfield28 Sep
      • RE: Installation Problem(s) on AIX 4.2.1-04Michael Widenius29 Sep