>>>>> "Mark" == Mark Chesterfield <mark@stripped> writes:
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> Here's a stack backtrace from gdb:
Mark> #0 0xd080a5d0 in exit ()
Mark> #1 0xd0826d18 in abort ()
Mark> #2 0xd0161014 in _pthread_internal_error ()
Mark> #3 0xd0161ed4 in pthread_once ()
Mark> #4 0xd091b564 in is_data_there ()
Mark> #5 0xd091bd88 in which_net_data ()
Mark> #6 0xd093dcc0 in net_data_init ()
Mark> #7 0xd093ee58 in init ()
Mark> #8 0xd093f17c in getservbyname ()
Mark> #9 0xd0b2366c in mysql_once_init () at libmysql.c:935
Mark> #10 0xd0b23544 in mysql_init (mysql=0x2ff22ae8) at libmysql.c:904
Mark> #11 0x10000280 in main (argc=2, argv=0x2ff22d24) at mysqladmin.c:93
The above seams to be a bug in the AIX pthread implementation. You
must ask your OS distributor if they have any patches for this.
Mark> My first compile failed in sql_yacc.cc and that was fixed
Should be ok.
Mark> I've also downloaded a public version of ldd and to see which
Mark> shared libraries were being included and found that it
Mark> reported that __udivdi3 was not defined.
Mark> ldd mysql
Mark> exec(): 0509-036 Cannot load program mysql because of the following errors:
Mark> 0509-023 Symbol __udivdi3 in /usr/local/lib/mysql/libmysqlclient.a is no
If mysql starts, then this is probable a bug in ldd.
Mark> I tried solving this problem by using the
Mark> --with-mysqld-ldflags=-lgcc and --with-client-ldflags=-lgcc flags
Mark> but ldd still reports the above error and mysql fails in the
Mark> getservbyname routine.
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:
Mark> I did note that the getservbyname manual page has this statement:
Mark> "Attention: Do not use the getservbyname subroutine in a multithreaded
Did they offer any solutions to this?
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
Mark> I'm totally confused. Have I got a threads problem ? Have I got
Mark> a library problem, or perhaps a gcc issue ?
Mark> Any help would be appreciated. Thanks