>Description:
Performing a VPATH build on Solaris 8/SPARC with innobase support and
the previously reported VPATH build problem (no -I options for $srcdir) fixed
by editing the generated innobase Makefiles adding -I$(srcdir)/../../include
-I$(srcdir)/../include to INCLUDES proceeds, but fails to link mysqld:

g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_CURSES_H 
-I/vol/mysql/obj/mysql-3.23.55-dist/include -DHAVE_RWLOCK_T -o mysqld sql_lex.o item.o 
item_sum.o item_buff.o item_func.o item_cmpfunc.o item_strfunc.o item_timefunc.o 
thr_malloc.o item_create.o field.o key.o sql_class.o sql_list.o net_serv.o violite.o 
net_pkg.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o 
hash_filo.o hostname.o convert.o sql_parse.o sql_yacc.o sql_base.o table.o 
sql_select.o sql_insert.o sql_update.o sql_delete.o sql_do.o procedure.o item_uniq.o 
sql_test.o log.o log_event.o init.o derror.o sql_acl.o unireg.o time.o opt_range.o 
opt_sum.o opt_ft.o records.o filesort.o handler.o ha_heap.o ha_myisam.o ha_myisammrg.o 
ha_berkeley.o ha_innobase.o ha_gemini.o ha_isam.o ha_isammrg.o sql_db.o sql_table.o 
sql_rename.o sql_crypt.o sql_load.o mf_iocache.o field_conv.o sql_show.o sql_udf.o 
sql_analyse.o sql_cache.o slave.o sql_repl.o mini_client.o mini_client!
_errors.o md5.o stacktrace.o  -L/vol/mysql/obj/mysql-3.23.55-dist/bdb/build_unix -ldb 
../innobase/usr/libusr.a ../innobase/odbc/libodbc.a ../innobase/srv/libsrv.a 
../innobase/dict/libdict.a ../innobase/que/libque.a ../innobase/srv/libsrv.a 
../innobase/ibuf/libibuf.a ../innobase/row/librow.a ../innobase/pars/libpars.a 
../innobase/btr/libbtr.a ../innobase/trx/libtrx.a ../innobase/read/libread.a 
../innobase/usr/libusr.a ../innobase/buf/libbuf.a ../innobase/ibuf/libibuf.a 
../innobase/eval/libeval.a ../innobase/log/liblog.a ../innobase/fsp/libfsp.a 
../innobase/fut/libfut.a ../innobase/fil/libfil.a ../innobase/lock/liblock.a 
../innobase/mtr/libmtr.a ../innobase/page/libpage.a ../innobase/rem/librem.a 
../innobase/thr/libthr.a ../innobase/com/libcom.a ../innobase/sync/libsync.a 
../innobase/data/libdata.a ../innobase/mach/libmach.a ../innobase/ha/libha.a 
../innobase/dyn/libdyn.a ../innobase/mem/libmem.a ../innobase/sync/libsync.a 
../innobase/ut/libut.a ../innobase/os/libos.a ../innob!
ase/ut/libut.a ../isam/libnisam.a ../merge/libmerge.a ../myisam/libmyisam.a 
../myisammrg/libmyisammrg.a ../heap/libheap.a ../mysys/libmysys.a ../dbug/libdbug.a 
../regex/libregex.a ../strings/libmystrings.a -ldl -lpthread -lthread -lcrypt -lgen 
-lsocket -lnsl -lm -lpthread -lthread
Undefined                       first referenced
 symbol                             in file
sched_yield                         ../innobase/os/libos.a(os0thread.o)
ld: fatal: Symbol referencing errors. No output written to mysqld

This is confusing since the configure test for sched_yield correctly found
that the function does not exist:

checking for sched_yield... no

Looking at the gcc -g3 -E output for os0thread.c, it turns out that
HAVE_SCHED_YIELD is defined as 1 despite the configure test.  The problem turns
out to be that innobase/include/univ.h includes "../ib_config.h" and the 
source distribution incorrectly contains an innobase/ib_config.h files (although
it's a generated file and thus doesn't belong there).

Besides, Solaris 2.5 and up provide a definition of sched_yield, but the
function is defined in either -lposix4 or -lrt.  So a correct test would find
it for real.
>How-To-Repeat:
mkdir objdir
cd objdir
<path to srcdir>/configure --with-innobase
cd innobase
perl -i.bak -p -e 's%INCLUDES = -I../../include -I../include%INCLUDES = 
-I../../include -I../include -I\$(srcdir)/../../include -I\$(srcdir)/../include%' 
`find . -name Makefile.in`
cd ..
make
        
>Fix:
Remove innobase/ib_config.h in $srcdir, remove $builddir/innobase/os/os0thread.o
and continue build.
        

>Submitter-Id:  net
>Originator:    Rainer Orth
>Organization:  Faculty of Technology, Bielefeld University
>
>MySQL support: none
>Synopsis:      VPATH build with innobase fails to link mysqld (sched_yield missing)
>Severity:      non-critical
>Priority:      medium
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.55 (Source distribution)

>Environment:
        
System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880
Architecture: sun4

Some paths:  /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc 
/opt/SUNWspro/bin/cc
GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs
Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu 
--with-local-prefix=/vol/gnu --disable-nls
Thread model: posix
gcc version 3.1
Compilation info: CC='gcc'  CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs 
-Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings 
-Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer'  CXX='gcc'  
CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts 
-Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors 
-fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer'  LDFLAGS=''
LIBC: 
-rw-r--r--   1 root     bin       1766784 Aug  8  2002 /lib/libc.a
lrwxrwxrwx   1 root     root           11 Oct  8 15:59 /lib/libc.so -> ./libc.so.1
-rwxr-xr-x   1 root     bin       1146168 Aug  8  2002 /lib/libc.so.1
-rw-r--r--   1 root     bin       1766784 Aug  8  2002 /usr/lib/libc.a
lrwxrwxrwx   1 root     root           11 Oct  8 15:59 /usr/lib/libc.so -> ./libc.so.1
-rwxr-xr-x   1 root     bin       1146168 Aug  8  2002 /usr/lib/libc.so.1
Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' 
'--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-innodb' 
'--with-berkeley-db' 'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment 
-W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused 
-mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type 
-Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses 
-Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder 
-Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti 
-mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXX=gcc'


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to