1 message in com.mysql.lists.bugsCompile failure on Tru64 because of s...
FromSent OnAttachments
Michael Mauch14 Mar 2003 10:26 
Subject:Compile failure on Tru64 because of strtoll
From:Michael Mauch (mich@gmx.de)
Date:03/14/2003 10:26:56 AM
List:com.mysql.lists.bugs

Hi,

compiling MySQL 3.23.55 on Tru64 (OSF/1) 4.0g fails with:

cc -DDEFAULT_CHARSET_HOME=\"/house/elmicha/spe145\"
-DDATADIR=\"/house/elmicha/spe145/var\"
-DSHAREDIR=\"/house/elmicha/spe145/share/mysql\" -DUNDEF_THREADS_HACK
-DDONT_USE_RAID -I. -I../././libmysql -I.. -I../././libmysql/../include
-I../include -I../././libmysql/.. -I.././. -I.. -O -DDBUG_OFF
-DUNDEF_HAVE_GETHOSTBYNAME_R -c -MD strtoll.c -DPIC -o .libs/strtoll.lo cc: Error: strto.c, line 82: In this declaration, the type of "strtoll" is not
compatible with the type of a previous declaration of "strtoll" at line number
44 in file /usr/include.dtk/stdlib.h. (notcompat) function (const char *nptr,char **endptr,int base) ^

% cc -V Compaq C V6.5-207 (dtk) on Digital UNIX V4.0G (Rev. 1530) Compiler Driver V6.5-207 (dtk) (dtk) cc Driver

I tried it with just --prefix=/house/elmicha/spe145 and with the configure line mentioned for Tru64 5.1a in INSTALL-SOURCE:

CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -ed -speculate all" CXX="cxx
-pthread" CXXFLAGS="-O4 -ansi_alias -fast -inline speed -speculate all
-noexceptions -nortti" configure --prefix=$machdir --with-extra-charsets=complex
--enable-thread-safe-client --enable-local-infile
--with-named-thread-libs="-lpthread -lmach -lexc -lc" --disable-shared
--with-mysqld-ldflags=-all-static

The results were the same. The same error message appears in the libmysql that is bundled with PHP-4.3.2RC1, mysql_version.h says that's 3.23.49.

/usr/include.dtk/stdlib.h has:

extern long long int strtoll( const char * /*restrict*/ __nptr, char ** /*restrict*/ __endptr, int __base);

The declaration in strto.c is expanded to:

longlong strtoll (const char *nptr,char **endptr,int base)

If I change the line

#define longtype longlong

into

#define longtype long long

strto.c does compile.

How-To-Repeat:

a) Get a free shell account on a Tru64 machine from <http://testdrive.hp.com/>. b) Connect to the 192.233.54.145 machine, upload the tarball (or copy it from /house/elmicha/local/src/mysql-3.23.55.tar.gz). c) gunzip -c mysql-3.23.55.tar.gz | tar xf - d) See lots of "tar: ././@LongLink : Unknown filetype" e) Remember pax; gunzip -c mysql-3.23.55.tar.gz | pax -f - f) See lots of "pax: ././@LongLink : Unknown filetype" g) Find and upload GNU tar-1.13.25.tar.gz h) Try to compile tar-1.13.25, stare at error message, start swearing. i) Remember they also have Linux machines with GNU tools there, happily unpack the MySQL tarball, return to the Tru64 machine. j) configure --prefix=$HOME/somewhere; see above.

Regards... Michael