>Description:
        mysql-4.0.1-alpha fails to build on IBM AIX 4.3 because of
        gcc'isms in the source code.  A fix for that problem is
        supplied below.

        However, configure says:

                checking for alloca.h... no
                checking for working alloca.h... (cached) no
                checking for alloca... yes

        and config.h contains

                /* Define if you have alloca, as a function or macro.  */
                #define HAVE_ALLOCA 1
                /* Define if you have <alloca.h> and it should be used (not on 
Ultrix).  */
                /* #undef HAVE_ALLOCA_H */

        However, alloca() is NOT supported by most non-gcc compilers,
        including IBM's cc, resulting in this subsequent link failure:

        cc -qlanglvl=ansi -O -DDBUG_OFF -Wa,-many \
                -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ -o \
                test_charset \
                
-DDEFAULT_BASEDIR=\"/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local\" \
                -DDATADIR=\"/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local/var\" \
                
-DDEFAULT_CHARSET_HOME=\"/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local\" \
                -DDATADIR=\"/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local/var\" \
                
-DSHAREDIR=\"/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local/share/mysql\" \
                -DHAVE_CONFIG_H -I./../include -I../include -I.. -I. -O \
                -DDBUG_OFF -Wa,-many -DUNDEF_HAVE_INITGROUPS \
                -DSIGNALS_DONT_BREAK_READ -DMAIN ./test_charset.c libmysys.a \
                ../dbug/libdbug.a ../strings/libmystrings.a -lcrypt -lm \
                -lpthread
        ld: 0711-317 ERROR: Undefined symbol: .alloca

        I don't have a workaround for that problem.


>How-To-Repeat:
        env CC=cc CXX=xlC ./configure && nice time make all
>Fix:
        Here is a patch for one of the problems: C++ comments in C
        code.

diff -c ./client/mysqldump.c.~1~ ./client/mysqldump.c 
*** ./client/mysqldump.c.~1~    Sat Dec 22 18:22:06 2001
--- ./client/mysqldump.c        Tue Mar 12 10:25:25 2002
***************
*** 1180,1186 ****
        fputs(");\n", md_result_file);
      }
  
!     //XML - close table tag and supress regular output
      if (opt_xml)
        fprintf(md_result_file, "\t</%s>\n", table);
      else if (extended_insert && row_break)
--- 1180,1186 ----
        fputs(");\n", md_result_file);
      }
  
!     /* XML - close table tag and supress regular output */
      if (opt_xml)
        fprintf(md_result_file, "\t</%s>\n", table);
      else if (extended_insert && row_break)
***************
*** 1283,1289 ****
    int result=0;
    for ( ; *db_names ; db_names++)
    {
!     //XML edit - add database element
      if (opt_xml)
        fprintf(md_result_file, "<%s>\n", *db_names);
      if (dump_all_tables_in_db(*db_names))
--- 1283,1289 ----
    int result=0;
    for ( ; *db_names ; db_names++)
    {
!     /* XML edit - add database element */
      if (opt_xml)
        fprintf(md_result_file, "<%s>\n", *db_names);
      if (dump_all_tables_in_db(*db_names))


>Submitter-Id:  net     
>Originator:    Nelson H.F. Beebe
>Organization:
  -------------------------------------------------------------------------------
  - Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
  - Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
  - University of Utah                    Internet e-mail: [EMAIL PROTECTED]  -
  - Department of Mathematics, 322 INSCC                   [EMAIL PROTECTED]        -
  - 155 S 1400 E RM 233                                    [EMAIL PROTECTED]       -
  - Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  - 
  -------------------------------------------------------------------------------
>
>MySQL support: none
>Synopsis:      mysql-4.0.1-alpha: native cc compiler build failure on IBM AIX 4.3 
>because of gcc'isms in source code
>Severity:      serious
>Priority:      medium
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-4.0.1-alpha (Source distribution)

>Environment:
        IBM SP2 (166 MHz);  AIX 4.3.2.0

System: AIX sp-i 3 4 000152774C00


Some paths:  /usr/bin/perl /uufs/inscc.utah.edu/common/home/mthnhb/ppc/local/bin/make 
/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local/bin/gcc /usr/vacpp/bin/cc
GCC: Reading specs from 
/uufs/inscc.utah.edu/common/home/mthnhb/ppc/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx    1 bin      bin            19 2001-03-30  /lib/libc.a -> 
/usr/ccs/lib/libc.a
lrwxrwxrwx    1 bin      bin            19 2001-03-30  /usr/lib/libc.a -> 
/usr/ccs/lib/libc.a
Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock 
--with-low-memory --with-mit-threads=yes --without-perl --enable-thread-safe-client 
--with-berkeley-db --with-innodb --with-vio --without-pstack --with-extra-tools 
--with-embedded-server
Perl: This is perl, version 5.005_03 built for aix

---------------------------------------------------------------------
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