Bug #37606 my_pthread.c compiling crash
Submitted: 24 Jun 2008 13:08 Modified: 30 Jun 2008 10:47
Reporter: Susanne Ebrecht Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0 OS:Linux (Ubuntu and FreeBSD 64bit)
Assigned to: CPU Architecture:Any

[24 Jun 2008 13:08] Susanne Ebrecht
Description:
I already recognised this on Friday on FreeBSD. But today I got same during compiling 5.0 on Ubuntu:

gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include    -O3 -DDBUG_OFF    -MT factorial.o -MD -MP -MF .deps/factorial.Tpo -c -o factorial.o factorial.c
mv -f .deps/factorial.Tpo .deps/factorial.Po
/bin/bash ../libtool --preserve-dup-deps --tag=CC   --mode=link gcc  -O3 -DDBUG_OFF     -rdynamic  -o factorial my_main.o factorial.o libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm  -lpthread 
gcc -O3 -DDBUG_OFF -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_pthread.o): In function `my_pthread_getprio':
/home/miracee/mysqlsrc/mysql50bzrsrc/mysys/my_pthread.c:54: undefined reference to `_db_pargs_'
/home/miracee/mysqlsrc/mysql50bzrsrc/mysys/my_pthread.c:54: undefined reference to `_db_doprnt_'
collect2: ld returned 1 exit status
make[2]: *** [factorial] Error 1
make[2]: Verlasse Verzeichnis '/home/miracee/mysqlsrc/mysql50bzrsrc/dbug'
make[1]: *** [all-recursive] Error 1
make[1]: Verlasse Verzeichnis '/home/miracee/mysqlsrc/mysql50bzrsrc'
make: *** [all] Error 2

How to repeat:
$ ./configure --without-ndbcluster --with-charset=latin1 --prefix=/PATH
$ make

configure options doesn't matter here.

On FreeBSD I got it after bzr pull

I copied the fresh source into a fresh directory and then tried to compile.

On Ubuntu I made a bzr pull yesterday. Then I copied source into a fresh directory and used our Build script compile_amd64_debug_max and a prefix.

This installation is working fine.

Today I took the same source to compile it with another prefix and with some other configure values and I got this error.

Suggested fix:
...
[24 Jun 2008 13:23] Susanne Ebrecht
Workaround on Linux is: compiling from a fresh tree and not from an old tree.
[24 Jun 2008 13:29] Susanne Ebrecht
sorry, big thinking error from me.

Workaround is make clean of course.

I will analyse it again on FreeBSD and will close this if I don't get the error on a really fresh tree there.
[30 Jun 2008 10:47] Susanne Ebrecht
Yes, using a fresh tree on FreeBSD also works fine.

Sorry for my confusiness. I will close this bug.