>Description:
        A build of mysql-4.0.1-alpha on DEC Alpha OSF/1 4.0 failed
        like this:

        gcc -O3 -DDBUG_OFF -o ft_dump ft_dump.o libmyisam.a \
                ../mysys/libmysys.a ../dbug/libdbug.a \
                ../strings/libmystrings.a -lpthread -lmach -lexc -lz -lm \
                -lpthread -lmach -lexc
        /usr/ccs/bin/ld:
        Unresolved:
        snprintf

>How-To-Repeat:
        ./configure && make all check install
>Fix:
        The problem is that, while mysql checks for the availability
        of snprintf, there is exactly ONE place in the source code
        where snprintf was used without a wrapping conditional.  Here
        is a suitable patch:

        % diff -c myisam/ft_dump.c.~1~ myisam/ft_dump.c
        *** myisam/ft_dump.c.~1~        Sat Dec 22 18:22:07 2001
        --- myisam/ft_dump.c    Tue Mar 12 08:44:37 2002
        ***************
        *** 105,111 ****
        --- 105,116 ----
          #error
          #endif

        + #ifdef HAVE_SNPRINTF
        +       buf[MAX-1]=0;                   /* safety */
                snprintf(buf,MAX,"%.*s",(int) keylen,info->lastkey+1);
        + #else
        +       sprintf(buf,"%.*s",(int) keylen,info->lastkey+1);
        + #endif
                casedn_str(buf);
                total++;
                lengths[keylen]++;

        With that patch, the build, validation, and installation
        completed successfully.


>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, 110 LCB        [EMAIL PROTECTED]  [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: small build glitch on DEC Alpha OSF/1 4.0: snprintf 
>use, and a patch to fix it
>Severity:      non-critical
>Priority:      medium
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-4.0.1-alpha (Source distribution)
>Environment:
        
System: OSF1 XXXXXXXX.math.utah.edu V4.0 1229 alpha
Machine: alpha
Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gmake 
/usr/local/bin/gcc /usr/ccs/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0f/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxr-xr-x    1 root     system         17 Aug  5  1999 /lib/libc.a -> 
../ccs/lib/libc.a
lrwxr-xr-x    1 root     system         17 Aug  5  1999 /usr/lib/libc.a -> 
../ccs/lib/libc.a
Configure command: ./configure 

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