delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/27/13:59:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 27 Jul 2002 20:00:17 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <156281280509.20020727200017@familiehaase.de>
To: Christopher Faylor <cygwin AT cygwin DOT com>
Subject: Re: MySQL server under cygwin
In-Reply-To: <20020727160737.GF16216@redhat.com>
References: <00b201c2352f$71e9d4c0$3400a8c0 AT sknet01>
<190247813356 DOT 20020727104230 AT familiehaase DOT de>
<137257096795 DOT 20020727131713 AT familiehaase DOT de>
<20020727160737 DOT GF16216 AT redhat DOT com>
MIME-Version: 1.0

Hallo Christopher,

Am Samstag, 27. Juli 2002 um 18:07 schriebst du:

>>After trying a new build with 3.23.51 I see that there are some
>>problems with gcc-3,

> Boy do I miss Chuck Wilson.  He seems to be the only person on the
> planet who understands that it is necessary to to provide specific
> bug reports with (ohmigod) test cases when he encountered a problem
> with gcc.

> These "...of course gcc 3.1 doesn't work and then I told Maude, Maude,
> did you see try the bean dip! It's scrumptious" messages are not
> helping in any way.

I'm sorry.  Ok.  They MySQL folks add a flag if GCC version is >3, if
you are compiling statically and if you use gcc instead of g++, looks
like this:

if test "$GXX" = "yes"
then
  # mysqld requires -fno-implicit-templates.
  # Disable exceptions as they seams to create problems with gcc and threads.
  # mysqld doesn't use run-time-type-checking, so we disable it.
  CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"

  # If you are using 'gcc' 3.0 (not g++) to compile C++ programs,
  # we will gets some problems when linking static programs.
  # The following code is used to fix this problem.

  if test "$CXX" = "gcc"
  then
    if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1
    then
      CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW"
      CXXLDFLAGS="$CXXLDFLAGS -Wl,--defsym -Wl,__cxa_pure_virtual=0"
    fi
  fi
fi

What is causing problems then is the message from the compiler that
there is an undefined reference to __cxa_pure_virtual during the link
stage.

Getting exactly this error then:

make[2]: Entering directory `/sourcecode/db/mysql-4.0.2-alpha/client'
gcc -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti  -fno-implicit-templates -fno-exceptions -fno-rtti  -DUSE_MYSYS_NEW -c mysqlbinlog.cc
`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mcpu=pentiumpro' instead.
sh ../libtool --mode=link gcc  -O3 -DDBUG_OFF -O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti  -fno-implicit-templates -fno-exceptions -fno-rtti  -DUSE_MYSYS_NEW  -o mysqlbinlog  mysqlbinlog.o ../libmysql/libmysqlclient.la -Wl,--defsym -Wl,__cxa_pure_virtual=0 -lz -lcrypt -lm  
gcc -O3 -DDBUG_OFF -O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -o mysqlbinlog mysqlbinlog.o ../libmysql/.libs/libmysqlclient.a -lz -lcrypt -Wl,--defsym -Wl,__cxa_pure_virtual=0 -lz -lcrypt
mysqlbinlog.o(.data$_ZTV9Log_event+0x8):mysqlbinlog.cc: undefined reference to `___cxa_pure_virtual'
mysqlbinlog.o(.data$_ZTV9Log_event+0x18):mysqlbinlog.cc: undefined reference to `___cxa_pure_virtual'
mysqlbinlog.o(.data$_ZTV9Log_event+0x1c):mysqlbinlog.cc: undefined reference to `___cxa_pure_virtual'
collect2: ld returned 1 exit status
make[2]: *** [mysqlbinlog] Error 1
make[2]: Leaving directory `/sourcecode/db/mysql-4.0.2-alpha/client'

BTW, works well when using g++ instead of gcc.  God knows why they
think that using gcc instead of g++ is better.

So it is obviously a bug on the MySQL side, leaving out a lib at the
linkline or s.th. like this?


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019