Thanks for you reply. I have to say that I was expecting a reply anymore. Looking on the
internet I found an article that simply suggested adding the prototype for the sleep
function where the compiler was complaining. I did it and it compiled fine. And it seems
Although I did mess with the source code, I didn't before. I said that I change the
makefile and I did, but before that I tried to add the -DHAVE_TERMSIO_H option to
configure. I had the same results, that's when I tried and changed that specific makefile
Anywway, as I said I managed to build it and it seems to work. We're having some issues on
upgrading to Solaris 8, that's why we still have Solaris 6. I hope the pre-build package
for Solaris 8 will work without any intervention. But if it won't and I'll need to build
it I'll remember the issue you told me about.
Thanks for you help
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
> From: Joerg Bruehe [mailto:joerg@stripped]
> Sent: 02 August 2007 12:06
> To: Giulio Troccoli
> Cc: mysql@stripped
> Subject: Re: Building MySql 5.0.45 on Solaris 6
> 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,
> Joerg Bruehe, Senior Production Engineer
> MySQL AB, www.mysql.com