This note is primarily meant to stuff something into the archives in case
other people have problems compiling mysql under AIX.

There are a number of changes that need to be made that aren't detailed in
the documentation, (some alteration to those docs could save someone a lot
of effort in the future).

I don't know how universal this is so I will say that this works under 
AIX 4.2.1 for mysql 3.23.37 using gcc 2.95.3

To begin with, you may need to use the following config as opposed to the
one given in the docs...

     CC="gcc -pipe -mcpu=power -Wa,-many" \
     CXX="gcc -pipe -mcpu=power -Wa,-many" \
     CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \
     ./configure --prefix=/usr/local/mysql --with-low-memory

The key change here is the -mcpu, the docs specify power2, but that causes
compiles on older equipment to toss out bad assembly code. Determine what
your cpu is if you are experiencing errors that indicate that problem.
Typically power2, power, or powerpc may need to be used, alternatively you
might need to use 604 or 604e. I'm not positive but I would think using
"power" would likely be safe most of the time, even on a power2 machine.

If you don't know what your cpu is then do a "uname -m", this will give you
back a string that looks like "000514676700", with a format of xxyyyyyymmss
where xx and ss are always 0's, yyyyyy is a unique system id and mm is the
id of the CPU Planar. A chart of these values can be found at
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds5/uname.htm
This will give you a machine type and a machine model you can use to
determine what type of cpu you have.

Next, after configuring, edit config.h and change the line that says

#define HAVE_SNPRINTF 1

to

#undef HAVE_SNPRINTF

Do the same for include/my_config.h

There is probably a better way to handle that that would address the issue
for the entire source but I didn't take the time to find it nor did I
stumble across it.

And finally, in mysqld.cc you need to add a prototype for initgoups.

#ifdef _AIX41
extern "C" int initgroups(const char *,int);
#endif


After doing this, I had a version of mysql that I could compile and install.
Hopefully there aren't any bugs waiting for me as a result of these changes.

I'm seeing test failures for tests rpl000015 and rpl000016 that I haven't
dug into yet but everything else looks ok.

________________________________________________________________________
Darren Henderson                                  [EMAIL PROTECTED]
                                            [EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to