MySQL 5.5.28 compile on AIX 7.1

Hi,

I have an AIX 7.1 lpar with cmake, gmp, libmpc, mpfr on it and a gcc 4.6.2 compiler that was made with the no-dependency flag.
I am trying to complile MySql5.5.28 from Oracle. Cmake runs fine. Then when I run make, I get the following:

<nyissz>
Scanning dependencies of target strings
[  9%] Building C object strings/CMakeFiles/strings.dir/bchange.c.o
In file included from /prod/mysql/src/mysql-5.5.28/strings/bchange.c:27:0:
/prod/mysql/src/mysql-5.5.28/include/my_global.h: In function 'my_ulonglong2double':
/prod/mysql/src/mysql-5.5.28/include/my_global.h:289:74: error: expected ')' before 'A'
/prod/mysql/src/mysql-5.5.28/include/my_global.h:289:76: error: expected expression before ';' token
/prod/mysql/src/mysql-5.5.28/include/my_global.h:289:76: warning: control reaches end of non-void function [-Wreturn-type]
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
<nyassz>

Looking at the my_global.h at around line 289, I see this:

<nyissz>
/* Go around some bugs in different OS and compilers */
#ifdef _AIX                     /* By soren@t.dk */
#define _H_STRINGS
#define _SYS_STREAM_H
/* #define _AIX32_CURSES */     /* XXX: this breaks AIX 4.3.3 (others?). */
#define ulonglong2double(A) my_ulonglong2double(A)
#define my_off_t2double(A)  my_ulonglong2double(A)
C_MODE_START
inline double my_ulonglong2double(unsigned long long A) { return (double A); }
C_MODE_END
#endif /* _AIX */

#ifdef HAVE_BROKEN_SNPRINTF     /* HPUX 10.20 don't have this defined */
#undef HAVE_SNPRINTF
#endif
#ifdef HAVE_BROKEN_PREAD
/*
<nyassz>

Exactly on this line dies make:
inline double my_ulonglong2double(unsigned long long A) { return (double A); }

Looking the definition of this inline function:
<nyissz>

#if !defined(_WIN64)
inline double my_ulonglong2double(unsigned long long value)
{
 long long nr=(long long) value;
 if (nr >= 0)
   return (double) nr;
 return (18446744073709551616.0 + (double) nr);
}
#define ulonglong2double my_ulonglong2double
#define my_off_t2double  my_ulonglong2double
#endif /* _WIN64 */

<nyassz>
I do not really see whre is the problem.

Any good hint ?
Thanks ahead,
J�nos

Check this blog post, the version doesn't match exactly, but the symptoms seem quite similar, it says to change:

inline double my_ulonglong2double(unsigned long long A) { return (double A); }

to

inline double my_ulonglong2double(unsigned long long A) { return ((double) A); }
 

Hi Radoulov,

That took me from 9% to 65% :slight_smile: Thanks a lot. Now I have another problem with the compilation. Now the massage says:

[ 65%] Generating sql_yacc.cc, sql_yacc.h
        cd /prod/mysql/src/mysql-5.5.28/sql && /usr/bin/bison -y -p MYSQL --output=/prod/mysql/src/mysql-5.5.28/sql/sql_yacc.cc --defines=/prod/mysql/src/mysql-5.5.28/sql/sql_yacc.h /prod/mysql/src/mysql-5.5.28/sql/sql_yacc.yy
/usr/bin/m4: Not a recognized flag: -
Usage: m4 [-els] [-B Number] [-D Name[=Value]]... [-H Number]
       [-I Directory] [-S Number] [-T Number] [-U Name]... [File...] 
make: 1254-059 The signal code from the last command is 13.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.

Any good hint ?
Thanks ahead,
J�nos

Trying to guess: could you try with GNU m4 and gcc?

Just curious: MySQL on AIX ...., why not Linux?

Hi Radoulov,

I am using gcc 4.6.1:

{[root]palm:/:551}# gcc --version
gcc (GCC) 4.6.1

Looks like I already have the gcc version of m4,

{[root]palm:/:552}# find / -name m4 -print
/opt/freeware/bin/m4
/prod/gnutools/emacs-23.2/m4
/usr/bin/m4
/usr/ccs/bin/m4
/usr/linux/bin/m4
/usr/samples/tcpip/sendmail/m4

but the /usr/bin/m4 points to the IBM version of it:

{[root]palm:/:553}# ls -l /usr/bin/m4
lrwxrwxrwx    1 bin      bin              15 Jul 27 13:30 /usr/bin/m4 -> /usr/ccs/bin/m4

So, looks like I just have to modify the link. I will do it tomorrow, Monday and see how that goes.

The reason for AIX is, that it is "free" :slight_smile: We have a production server owned by the Hospital with all the /hardware/ support behind it and we already have mysql 5.1 on it. That was the latest officially supported version of mysql from Sun. Here folks do not want to jump to any other platform right now, because the support background is not there for them.

Thanks a lot,
J�nos

Hi J�nos,
instead of modifying the link to m4, you could try to modify the PATH.
Assuming the GNU m4 is in /usr/linux/bin, something like this may work (hopping not to break something else) :

export PATH=/usr/linux/bin:$PATH

However, as you already said, MySQL 5.5 is not supported on AIX, so I would suggest to use the latest supported version.

Hi Radoulov,

I managed to get to 87% :-). I needed a newer m4 (1.4.16) and a newer libsigsegv (2.7). Now it dies here:

Linking CXX executable pfs-t
cd /prod/mysql/src/mysql-5.5.28/storage/perfschema/unittest && /usr/local/cmake-2.8.9-AIX-powerpc/bin/cmake -E cmake_link_script CMakeFiles/pfs-t.dir/link.txt --verbose=1
/usr/bin/c++    -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exceptions -fno-rtti -O2 -g -DDBUG_OFF    CMakeFiles/pfs-t.dir/pfs-t.cc.o  -o pfs-t -Wl,-brtl,-bnoipath,-bexpfull -lpthread ../../../unittest/mytap/libmytap.a ../libperfschema.a ../../../mysys/libmysys.a ../../../dbug/libdbug.a ../../../mysys/libmysys.a ../../../dbug/libdbug.a ../../../strings/libstrings.a ../../../zlib/libzlib.a -lm -lpthread /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.6.1/libgcc_eh.a /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.6.1/libgcc_eh.a -Wl,-blibpath:/usr/lib:/lib 
ld: 0711-224 WARNING: Duplicate symbol: .my_ulonglong2double
ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
ld: 0711-224 WARNING: Duplicate symbol: my_ulonglong2double
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-224 WARNING: Duplicate symbol: .my_ulonglong2double
ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
ld: 0711-224 WARNING: Duplicate symbol: my_ulonglong2double
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .sql_print_error(char const*, ...)
ld: 0711-317 ERROR: Undefined symbol: .Query_tables_list::destroy_query_tables_list()
ld: 0711-317 ERROR: Undefined symbol: .plugin_unlock_list(THD*, st_plugin_int**, unsigned int)
ld: 0711-317 ERROR: Undefined symbol: vtable for st_select_lex_node
ld: 0711-317 ERROR: Undefined symbol: .MDL_request::init(MDL_key::enum_mdl_namespace, char const*, char const*, enum_mdl_type, enum_mdl_duration)
ld: 0711-317 ERROR: Undefined symbol: .LEX::LEX()
ld: 0711-317 ERROR: Undefined symbol: .lex_start(THD*)
ld: 0711-317 ERROR: Undefined symbol: vtable for DML_prelocking_strategy
ld: 0711-317 ERROR: Undefined symbol: .open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*)
ld: 0711-317 ERROR: Undefined symbol: .Table_check_intact::check(TABLE*, st_table_field_def const*)
ld: 0711-317 ERROR: Undefined symbol: .close_thread_tables(THD*)
ld: 0711-317 ERROR: Undefined symbol: .lex_end(LEX*)
ld: 0711-317 ERROR: Undefined symbol: THR_THD
ld: 0711-317 ERROR: Undefined symbol: lower_case_table_names
ld: 0711-317 ERROR: Undefined symbol: .Field_enum::store_type(unsigned long long)
ld: 0711-317 ERROR: Undefined symbol: .ACL_internal_schema_registry::register_schema(st_mysql_lex_string const*, ACL_internal_schema_access const*)
ld: 0711-317 ERROR: Undefined symbol: key_map_empty
ld: 0711-317 ERROR: Undefined symbol: vtable for handler
ld: 0711-317 ERROR: Undefined symbol: .calculate_key_len(TABLE*, unsigned int, unsigned char const*, unsigned long)
ld: 0711-317 ERROR: Undefined symbol: .handler::print_error(int, int)
ld: 0711-317 ERROR: Undefined symbol: .handler::ha_statistic_increment(unsigned long system_status_var::*) const
ld: 0711-317 ERROR: Undefined symbol: .handler::ha_table_share_psi(TABLE_SHARE const*) const
ld: 0711-317 ERROR: Undefined symbol: handler::clone(char const*, st_mem_root*)
ld: 0711-317 ERROR: Undefined symbol: handler::get_error_message(int, String*)
ld: 0711-317 ERROR: Undefined symbol: handler::column_bitmaps_signal()
ld: 0711-317 ERROR: Undefined symbol: handler::index_read_idx_map(unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function)
ld: 0711-317 ERROR: Undefined symbol: handler::index_next_same(unsigned char*, unsigned char const*, unsigned int)
ld: 0711-317 ERROR: Undefined symbol: handler::read_multi_range_first(st_key_multi_range**, st_key_multi_range*, unsigned int, bool, st_handler_buffer*)
ld: 0711-317 ERROR: Undefined symbol: handler::read_multi_range_next(st_key_multi_range**)
ld: 0711-317 ERROR: Undefined symbol: handler::read_range_first(st_key_range const*, st_key_range const*, bool, bool)
ld: 0711-317 ERROR: Undefined symbol: handler::read_range_next()
ld: 0711-317 ERROR: Undefined symbol: handler::read_first_row(unsigned char*, unsigned int)
ld: 0711-317 ERROR: Undefined symbol: handler::get_dynamic_partition_info(PARTITION_STATS*, unsigned int)
ld: 0711-317 ERROR: Undefined symbol: handler::get_auto_increment(unsigned long long, unsigned long long, unsigned long long, unsigned long long*, unsigned long long*)
ld: 0711-317 ERROR: Undefined symbol: handler::drop_table(char const*)
collect2: ld returned 8 exit status
gmake[2]: *** [storage/perfschema/unittest/pfs-t] Error 1
gmake[2]: Leaving directory `/prod/mysql/src/mysql-5.5.28'
gmake[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs-t.dir/all] Error 2
gmake[1]: Leaving directory `/prod/mysql/src/mysql-5.5.28'
gmake: *** [all] Error 2
{

Any good hint ? /I started to google for the errors, but looks like pfs-t has the issue.

Thanks ahead,
J�nos

Just a wild guess: could you try with newer version of autoconf?

IMHo the problem is this:

I am not sure about it, but if I'm not mistaken this is a call to IBMs compiler and not to gcc! Check your makefiles (or configure, whatever) if the correct compiler is used everywhere. Updating autoconf as radoulov already suggested might help this problem and is certainly a good idea anyway.

I hope this helps.

I am not using "knowingly" autoconfig. Autoconf is in /opt/freeware.

{[root]palm:/:759}# find / -name autoconf -print
/opt/freeware/bin/autoconf
/opt/freeware/share/autoconf
/opt/freeware/share/autoconf/autoconf
/usr/bin/autoconf
/usr/share/autoconf
{[root]palm:/:760}# ls -l /usr/bin/autoconf
lrwxrwxrwx    1 root     system           31 Jul 27 13:30 /usr/bin/autoconf -> ../../opt/freeware/bin/autoconf
{

I use cmake, then gmake. Maybe cmake is using autoconf. I will check on the prezl site if there is a newer version of it and will install it, if mine is old. Other than that, I do not see much room for improvement. I am using gcc's c++:

{[root]palm:/:577}# find / -name c++ -print     
/opt/freeware/bin/c++
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.6.1/include/c++
/usr/bin/c++
You have mail in /usr/spool/mail/root
{[root]palm:/:758}# ls -l /usr/bin/c++
lrwxrwxrwx    1 root     system           26 Aug 08 09:32 /usr/bin/c++ -> ../../opt/freeware/bin/c++

Thanks ahead,
J�nos

---------- Post updated at 09:55 AM ---------- Previous update was at 09:14 AM ----------

My autoconfig is 2.59. I try to install 2.69. I downloaded it into /tmp. Then when I try to force install it complains.

{[root]palm:/tmp:768}# rpm -fi autoconf-2.69-1.aix5.1.ppc.rpm
rpm: unexpected query source
{[root]palm:/tmp:769}# rpm -i autoconf-2.69-1.aix5.1.ppc.rpm 
file /opt/freeware/bin/autoheader from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/bin/autom4te from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/bin/autoreconf from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/bin/autoscan from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/bin/autoupdate from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/bin/ifnames from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/info/autoconf.info.gz from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/C4che.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/ChannelDefs.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/Channels.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/Configure_ac.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/FileUtils.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/General.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/Request.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/Autom4te/XFile.pm from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/INSTALL from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/autoconf.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/autoconf.m4f from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/autoheader.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/autoscan.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/autotest.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/autoupdate.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/c.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/fortran.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/functions.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/bin/autoconf from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/general.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/headers.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/lang.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/libs.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/oldnames.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/programs.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/specific.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/status.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoconf/types.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autom4te.cfg from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autoscan/autoscan.list from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autotest/autotest.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autotest/autotest.m4f from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/autotest/general.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/m4sugar/m4sh.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/m4sugar/m4sh.m4f from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/m4sugar/m4sugar.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/m4sugar/m4sugar.m4f from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
file /opt/freeware/share/autoconf/m4sugar/version.m4 from install of autoconf-2.69-1 conflicts with file from package autoconf-2.59-1
{[root]palm:/tmp:770}# 

So, what is the right way to install autoconf 2.69. I did not have this problem when I installed libsigsegv and m4.
Thanks ahead,
J�nos

Probably, despite their similar names, the two packages are not aware that they are versions of the same program and this is why the one doesn't want to overwrite the other. Remove 2.59 first ("rpm -e") and then install it ("-Uvh <filename>").

I hope this helps.

bakunin

I am looking this first undefined symbol error:

ld: 0711-317 ERROR: Undefined symbol: .sql_print_error(char const*, ...)

It is really undefined. I checked the namespace here:
mysql: Namespace List - doxygen documentation | Fossies Dox
and it finds only this function:

sql_print_error(const char*, ...)

So, I am really wondering where this ERROR message is coming from because both:

PFS_check_intact::report_error
PFS_engine_table_share::check_one_table

referes to sql_print_error(const char*, ...) and that function is defined in log.cc

I have Sybase 15 on this machine and the Sybase variables to the PATH are in front of mysql's variables. I need to check if Sybase 15 has a function called sql_print_error. In the whole mysql 5.5.28 tree grep is unable to find:

sql_print_error(char const*, ...)

Any good tip ? /Yes I know Oracle is not supporting it on AIX, but this is a task I have to do./

Thanks ahead,

J�nos

I doubt I could provide any further help here. But I wanted to add that
considering that MySQL 5.5 is not supported on AIX, even if you succeed with the compilation,
bugs or post installation problems could block you again
and that's definitely not acceptable for any environment - production, QA or dev.