List:Internals« Previous MessageNext Message »
From:Joerg Bruehe Date:October 7 2010 5:20pm
Subject:Re: Make without debug code
View as plain text  
Hi Hiromichi,

Hiromichi Watari wrote:
> Hi,
> I'm trying to build the server without debug code,
>> ./configure    .....  (without --with-debug)
>> make
> but then I get the following error, does anybody have any idea about this or a
> workaround ?

You might really have told us the version you are using ...

I tried to reproduce it using current MySQL 5.1.

> ------------------------------------------------------------------------
> libtool: link: gcc -g -O2 -DUNIV_LINUX -DUNIV_LINUX -rdynamic -o factorial my_main.o
> factorial.o  libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a -lpthread -lcrypt
> -lnsl -lm -lpthread
> ../mysys/libmysys.a(my_thr_init.o): In function `my_thread_end':
> /home/hwatari/mysql-server/mysql-5.1-build-modified/mysys/my_thr_init.c:340:
> undefined reference to `_db_pop_'
> collect2: ld returned 1 exit status
> make[1]: *** [factorial] Error 1

I could reproduce it by doing a debug build first, then a non-debug one.

So you hit a bug in the Makefile, some dependency isn't coded properly,
and the non-debug build is using a debug object module "my_thr_init.o"
which still contains a reference to "_db_pop_()".

You prevent this by running a "make clean" before you do the non-debug

As an alternative, you might also just remove the old (debug) module
"mysys/my_thr_init.o" and then call "make" again, this should force a
(non-debug) rebuild of that module and then of "mysys/libmysys.a", but
who knows whether there are similar dependencies missing?


Joerg Bruehe,  MySQL Build Team,  joerg.bruehe@stripped
ORACLE Deutschland B.V. & Co. KG,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven
Amtsgericht Muenchen: HRA 95603

Make without debug codeHiromichi Watari7 Oct
  • Re: Make without debug codeJoerg Bruehe7 Oct
    • Re: Make without debug codeHiromichi Watari7 Oct