Hi!
>>>>> "Ralf" == Ralf Hupfer <hupfer@stripped> writes:
Ralf> Hi,
Ralf> I do face problems building MySQL 3.22.32 with gcc 3.2.2 on an Alpha-
Ralf> DEC-OSF4 workstation.
MySQL 3.22 ?
Ralf> CC="cc -pthread" CXX="cxx -pthread -O" ./configure --with-named-t
Ralf> hread-libs="-lpthread -lmach -lexc -lc" --with-low-memory
Ralf> Everything run's smoothly, till mysqld is to be build. The linker produces:
Ralf> __cxa_pure_virtual
Ralf> operator delete[](void*)
Ralf> operator new[](unsigned long)
Ralf> operator delete(void*)
Ralf> operator new(unsigned long)
Ralf> collect2: ld returned 1 exit status
Ralf> gnumake[3]: *** [mysqld] Error 1
The above happens becasue gcc 3.2.x has the code for the operators new
and delete in a external library that is not included by the linker if
you link c++ code with gcc.
Fixes:
- Use cxx to link mysqld.
- Use MySQL 4.0 or 3.23, both of which has a fix to enable you to link
c++ code with 'gcc'.
(This is done by declaring our own delete and new operators when you
are compiling c++ code with gcc).
The advantage of compiling c++ code with gcc instead of cxx are:
- Smaller executable as there are no c++ libraries included.
- No chance of getting exception handling into the c++ code, which
usually doesn't work with threads.
I saw a later email from you that you had not got 3.23 to compile.
Please try 4.0 instead; MySQL 4.0 is know to compile without any
problems on a lot of platforms and I am think that I have myself
compiled MySQL 4.0 on DEC-OSF4 not that long ago.
Regards,
Monty
--
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius <monty@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com