Hi Giulio !

Giulio Troccoli wrote:
Since my original post has been hijacked I'm writing a new one with
maybe some more info.

I have downloaded the GNU TAR source code. I'm using gcc 3.0.2 and GNU
make 3.76.1

I have configure as follows

CC=gcc CFLAGS="-O3" \
CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql-5.0.45 \
--with-low-memory \
--enable-assembler \
--without-docs \
--without-man \
--without-bench \
--without-extra-tools \
--without-server

I just need the client to connect to a server on another machine.

When I do make I get this
if gcc -DUNDEF_THREADS_HACK
-DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-5.0.45\""
-DDATADIR="\"/usr/local/mysql-5.0.45/var\"" -I. -I. -I.. -I../include
-I../include -I../regex     -DDBUG_OFF -O3 -felide-constructors
-fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions
-fno-rtti -DHAVE_RWLOCK_T  -MT mysql.o -MD -MP -MF ".deps/mysql.Tpo" -c
-o mysql.o mysql.cc; \
then mv -f ".deps/mysql.Tpo" ".deps/mysql.Po"; else rm -f
".deps/mysql.Tpo"; exit 1; fi
mysql.cc: In function `int sql_connect(char*, char*, char*, char*,
unsigned int)':
mysql.cc:3334: `sleep' undeclared (first use this function)
mysql.cc:3334: (Each undeclared identifier is reported only once for
each function it appears in.)
make: *** [mysql.o] Error 1

I had a look at client/mysql.cc and it looks like sleep is declared in
unistd.h, so I change the Makefile to add -DHAVE_TERMIOS_H to CFLAGS and
CXXFLAGS. I ran make clean; make but it failed again (another error
though). So I added -I/usr/include to CXXFLAGS (maybe it couldn't find
the header file), but to no avail. Finally I took the -DHAVE_TERMIOS_H
but left the -I/usr/include. Again, it failed. So now I'm stuck. I don't
know what to do. I just need a new version of MySql client (I'm
currently on 3.22.32) because the new server (5.0.27) uses privileges
that my client does not support.

I don't know how old Solaris 6 is, but most likely it is too old for many people to care about (including us at MySQL AB building releases).

In your place, I would *not* change Makefiles etc, and not mess with the "configure" output - even though it may be incorrect for Solaris 6, changing it might introduce more inconsistencies.


IMO, you should restart your work in a new tree (to be sure you start with the original files), and then try this:

What I would do with such an undeclared function (missing prototype) is
1) search for the system header file defining it,
2) add an "#include ..." line for this header file into the module for
   which the compiler complained, *after* all other include lines,
3) re-run "make" (no new "configure", that is still valid)
and repeat these steps for each new such error message.


We had issues on Solaris (Solaris 8, AFAIR) that some function was available in the C and C++ runtime libraries, but was not defined in the system header files (at least not for C++), so C++ compilation failed. If you encounter such a case (and I fear Solaris 6 may have more of these than Solaris 8), your best chance is to find the correct prototype for this function and explicitly add it to the source module without using a header file.


Please help.

I hope it does,
Jörg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to