List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 27 2003 3:25pm
Subject:building MySQL on Alpha-Dec-OSF4 with gcc
View as plain text  

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


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


MySQL 2003 Users Conference ->
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <monty@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland

building MySQL on Alpha-Dec-OSF4 with gccRalf Hupfer24 Mar
  • Re: building MySQL on Alpha-Dec-OSF4 with gccDan Nelson24 Mar
    • Re: building MySQL on Alpha-Dec-OSF4 with gccRalf Hupfer25 Mar
  • building MySQL on Alpha-Dec-OSF4 with gccMichael Widenius27 Mar
Re: building MySQL on Alpha-Dec-OSF4 with gccRalf Hupfer24 Mar