>Description:
        Two compile problems.  The second one has me stumped.  I am pasting in error
        info on both at the end of this form.
        Problem #1: snprintf error in client/sql_string.cc.  I substituted sprintf,
                    hope it's safe.
        Problem #2: myisam/mi_open.c has parse error.  I can't find the reason, my C 
skills are poor.

>How-To-Repeat:
        gnu-make
>Fix:
        I do not really know if my fix to #1 is safe.  I can't find a fix for #2.

>Submitter-Id:  License #7307
>Originator:    Ann Cantelow, System Admin
>Organization:  CSD Internet - www.csd.net
 
>MySQL support: Basic licence for ISP's
>Synopsis:      2 compile problems for 3.23.33 on Tru64 v4.0G (no patches)
>Severity:      critical
>Priority:      medium
>Category:      mysql
>Class:         support
>Release:       mysql-3.23.33 (Source distribution)
>Server: Compile not successful  (Previous: /usr/local/bin/mysqladmin  Ver 7.11 
>Distrib 3.22.27, for dec-osf4.0d on alphaev5)
TCX Datakonsult AB, by Monty

Server version          3.22.30-log  <---  I'm trying to replace this with 3.23.33.
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 10 days 1 hour 7 min 22 sec

Threads: 25  Questions: 2970644  Slow queries: 152  Opens: 585  Flush tables: 1  Open 
tables: 63
>Environment:
        
System: OSF1 hermes.csd.net Tru64 V4.0G(no patches) 1530 alpha
Machine: alpha
Some paths:  /usr/local/bin/perl /usr/bin/make /usr/local/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Wrong -- Compilation info: CC='cc -pthread -std1'  CFLAGS='-I./include 
-DDONT_USE_THR_ALARM'  CXX='gcc'  CXXFLAGS='-O3 -DDONT_USE_THR_ALARM'  LDFLAGS= ''
Wrong -- Configure command: ./configure  --with-low-memory 
'--with-named-thread-libs=-lpthread -lmach -lexc'

Above is the 3.22.30-patched version I'm trying to replace.  Current info:

Configure command: ./configure --localstatedir=/usr/local/var/mysql 
--with-unix-socket-path=/usr/var/mysql/tmp/mysql.sock
Compilation info:  How to get this?  These are in Top level Makefile:
                    CC = gcc
                    CFLAGS = -O6 -DDBUG_OFF
                    CPP = gcc -E
                    CXX = c++ 
                    CXXFLAGS = -O3 -DDBUG_OFF   -fno-implicit-templates
                    CXXLDFLAGS =

                  Do you need anything else?

Perl: This is perl, version 5.004_04 built for alpha-dec_osf



1) ----------- in client/sql_string compile 
----------------------------------------------
c++ -DUNDEF_THREADS_HACK -I./../include                                 -I../include 
-I./.. -I..                                -I..    -O3 -DDBUG_OFF
   -fno-implicit-templates -c sql_string.cc
In file included from ../include/global.h:186,
                 from sql_string.cc:24:
/usr/include/alloca.h:68: warning: declaration of `void * alloca(int)'
/usr/include/alloca.h:68: warning: conflicts with built-in declaration `void * 
alloca(long unsigned int)'
sql_string.cc: In method `bool String::set(double, unsigned int = 2)':
sql_string.cc:182: implicit declaration of function `int snprintf(...)'
gnu-make: *** [sql_string.o] Error 1

   ---- Solution?  This seems to work: -----
   Change this:
-------
ifdef HAVE_SNPRINTF
  buff[sizeof(buff)-1]=0;                       // Safety
  snprintf(buff,sizeof(buff)-1, "%.*f",(int) decimals,num);
#else
-------
   To this:
-------
ifdef HAVE_SNPRINTF
  buff[sizeof(buff)-1]=0;                       // Safety
  sprintf(buff, "%.*f",(int) decimals,num);
#else
-------
  
  Looks safe to me because of "Safety" line-- ?

2) ------------- in myisam/mi_open.c compile 
----------------------------------------------------
hermes.csd.net> gnu-make
gcc -DMAP_TO_USE_RAID -I./../include -I../include     -O6 -DDBUG_OFF   -c mi_open.c
In file included from 
/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.95.2/include/stdarg.h:36,
                 from ../include/my_sys.h:42,
                 from ../include/my_base.h:29,
                 from ../include/myisam.h:27,
                 from myisamdef.h:20,
                 from fulltext.h:21,
                 from mi_open.c:19:
/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.95.2/include/va-alpha.h:36: warning: 
redefinition of `va_list'
/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.95.2/include/va_list.h:7: warning: 
`va_list' previously declared here
In file included from fulltext.h:21,
                 from mi_open.c:19:
myisamdef.h:202: parse error before `pthread_rwlock_t'
myisamdef.h:202: warning: no semicolon at end of struct or union
myisamdef.h:204: warning: data definition has no type or storage class
myisamdef.h:218: parse error before `MYISAM_SHARE'
myisamdef.h:218: warning: no semicolon at end of struct or union
myisamdef.h:234: `checksum' redeclared as different kind of symbol
../include/my_sys.h:576: previous declaration of `checksum'
myisamdef.h:269: parse error before `}'
myisamdef.h:477: parse error before `*'
myisamdef.h:634: parse error before `MYISAM_SHARE'
myisamdef.h:635: parse error before `*'
mi_open.c:33: parse error before `*'
mi_open.c: In function `test_if_reopen':
mi_open.c:51: `share' undeclared (first use in this function)
mi_open.c:51: (Each undeclared identifier is reported only once
mi_open.c:51: for each function it appears in.)
mi_open.c:51: dereferencing pointer to incomplete type
mi_open.c: In function `mi_open':
mi_open.c:73: storage size of `info' isn't known
mi_open.c:74: `MYISAM_SHARE' undeclared (first use in this function)
mi_open.c:74: parse error before `share_buff'
mi_open.c:84: `share_buff' undeclared (first use in this function)
mi_open.c:91: `share' undeclared (first use in this function)
mi_open.c:258: `pthread_rwlock_t' undeclared (first use in this function)
mi_open.c:423: dereferencing pointer to incomplete type
mi_open.c:436: sizeof applied to an incomplete type
mi_open.c:507: dereferencing pointer to incomplete type
mi_open.c:509: dereferencing pointer to incomplete type
mi_open.c:511: dereferencing pointer to incomplete type
mi_open.c:512: dereferencing pointer to incomplete type
mi_open.c: At top level:
mi_open.c:567: parse error before `*'
mi_open.c: In function `setup_functions':
mi_open.c:569: `share' undeclared (first use in this function)
mi_open.c: At top level:
mi_open.c:993: parse error before `MYISAM_SHARE'
mi_open.c: In function `mi_open_datafile':
mi_open.c:996: `share' undeclared (first use in this function)
mi_open.c:1011: `info' undeclared (first use in this function)
mi_open.c: At top level:
mi_open.c:1018: parse error before `*'
mi_open.c: In function `mi_open_keyfile':
mi_open.c:1020: `share' undeclared (first use in this function)
gnu-make: *** [mi_open.o] Error 1
-----

myisql-3.23.22-beta did not have this problem, with same compiler.  I moved in a 
version
of 3.23.22-beta from another machine and compiled on the same machine to be sure.

Is there anything else I can provide?

Many Thanks,

Ann Cantelow

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