I knew after I sent that first email to you that I had better check my gcc install. When I first starting updating some packages using src instead of rpm's, I neglected to remove the rpm first. My install of GCC was one of them ;-(

I had a g++ of 3.2 and a 2.9 left over from the rpm. Once I got that straightened out, it compiled just fine.

One other question.  I noticed the following when you run make:

[EMAIL PROTECTED]:~/mysql-5.0.15/sql$ make
make  all-recursive

Should I be using the "all-recursive"?  what does it do??

Thanks!

Ed

At 08:02 AM Monday, 11/7/2005, you wrote -=>
Ed,

please post all this email traffic to mysql@lists.mysql.com

In my office computer, both gcc and g++ give 3.3.5 as the version.

[EMAIL PROTECTED]:~/mysql-5.0.15/sql$ gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[EMAIL PROTECTED]:~/mysql-5.0.15/sql$ g++ --version
g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The linking phase in my computer looks like below.

Regards,

Heikki

[EMAIL PROTECTED]:~/mysql-5.0.15/sql$ rm mysqld
[EMAIL PROTECTED]:~/mysql-5.0.15/sql$ make
make  all-recursive
make[1]: Entering directory `/home/heikki/mysql-5.0.15/sql'
Making all in share
make[2]: Entering directory `/home/heikki/mysql-5.0.15/sql/share'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/heikki/mysql-5.0.15/sql/share'
make[2]: Entering directory `/home/heikki/mysql-5.0.15/sql'
/bin/sh ../libtool --preserve-dup-deps --mode=link g++ -O3 -DDBUG_OFF -O3 -g -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o mysqld sql_lex.o sql_handler.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 item_subselect.o item_row.o item_geofunc.o field.o strfunc.o key.o sql_class.o sql_list.o net_serv.o protocol.o sql_state.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o set_var.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o sql_prepare.o sql_error.o sql_update.o sql_delete.o uniques.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 des_key_file.o discover.o time.o opt_range.o opt_sum.o records.o filesort.o handler.o ha_heap.o ha_myisam.o ha_myisammrg.o ha_berkeley.o ha_innodb.o ha_ndbcluster.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 sql_union.o sql_derived.o client.o sql_client.o mini_client_errors.o pack.o stacktrace.o repl_failsafe.o sql_olap.o sql_view.o gstream.o spatial.o sql_help.o sql_cursor.o tztime.o my_time.o my_decimal.o sp_head.o sp_pcontext.o sp_rcontext.o sp.o sp_cache.o parse_file.o sql_trigger.o ha_example.o ha_archive.o ha_tina.o ha_blackhole.o ha_federated.o ../innobase/usr/libusr.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/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 ../innobase/ut/libut.a -lrt ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -ldl -lpthread -lcrypt -lnsl -lm -lpthread g++ -O3 -DDBUG_OFF -O3 -g -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o mysqld sql_lex.o sql_handler.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 item_subselect.o item_row.o item_geofunc.o field.o strfunc.o key.o sql_class.o sql_list.o net_serv.o protocol.o sql_state.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o set_var.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o sql_prepare.o sql_error.o sql_update.o sql_delete.o uniques.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 des_key_file.o discover.o time.o opt_range.o opt_sum.o records.o filesort.o handler.o ha_heap.o ha_myisam.o ha_myisammrg.o ha_berkeley.o ha_innodb.o ha_ndbcluster.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 sql_union.o sql_derived.o client.o sql_client.o mini_client_errors.o pack.o stacktrace.o repl_failsafe.o sql_olap.o sql_view.o gstream.o spatial.o sql_help.o sql_cursor.o tztime.o my_time.o my_decimal.o sp_head.o sp_pcontext.o sp_rcontext.o sp.o sp_cache.o parse_file.o sql_trigger.o ha_example.o ha_archive.o ha_tina.o ha_blackhole.o ha_federated.o ../innobase/usr/libusr.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/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 ../innobase/ut/libut.a -lrt ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -ldl -lpthread -lcrypt -lnsl -lm -lpthread
make[2]: Leaving directory `/home/heikki/mysql-5.0.15/sql'
make[1]: Leaving directory `/home/heikki/mysql-5.0.15/sql'
[EMAIL PROTECTED]:~/mysql-5.0.15/sql$


Ed Kasky wrote:
Heikki,
Thanks for the reply...
gcc (GCC) 3.2 and c++ is 2.96
Being somewhat of a novice at compiling, where in the output should I see wether or not it links ./innobase/libut.a in? Would you know if it is early on in the compilation or closer to where my error is?
Best,
Ed
At 09:39 PM Sunday, 11/6/2005, you wrote -=>

Ed,

what does

gcc --version

say? I am able to compile with gcc-3.3.1.
in ut0dbg.h we have:

#if defined(__GNUC__) && (__GNUC__ > 2)
# define UT_DBG_FAIL(EXPR) UNIV_UNLIKELY(!((ulint)(EXPR)))
#else
extern ulint    ut_dbg_zero; /* This is used to eliminate
                               compiler warnings */
# define UT_DBG_FAIL(EXPR) !((ulint)(EXPR) + ut_dbg_zero)
#endif

and in ut0dbg.c:

#if defined(__GNUC__) && (__GNUC__ > 2)
#else
/* This is used to eliminate compiler warnings */
ulint   ut_dbg_zero     = 0;
#endif

Looks like your compiler does define __GNUC__ > 2 when you compile ut0dbg.c, but it does NOT define it when you compile ha_innodb.cc. This could be because ha_innodb.cc is C++ code.

Another explanation would be that for some reason make fails to link ./innobase/libut.a in. If you look at the gcc output in compilation, do you see it being linked in?

Regards,

Heikki
Oracle/Innobase


----- Original Message ----- From: "Ed Kasky" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Sunday, November 06, 2005 10:08 PM
Subject: Error compiling 5.0.15


I am experiencing problems when trying to compile 5.0.15 on RH 7.3.
I run
"configure --prefix /usr/local/mysql" with no apparent errors.  when I run
make I get the following error:

ha_innodb.o: In function `check_trx_exists(THD *)':
ha_innodb.o(.text+0x30a): undefined reference to `ut_dbg_zero'
ha_innodb.o: In function `innobase_query_caching_of_table_permitted(THD *,
char *, unsigned int, unsigned long long *)':
ha_innodb.o(.text+0x3ab): undefined reference to `ut_dbg_zero'
ha_innodb.o(.text+0x3b6): undefined reference to `ut_dbg_zero'
ha_innodb.o: In function `innobase_init(void)':
ha_innodb.o(.text+0x69c): undefined reference to `ut_dbg_zero'
ha_innodb.o(.text+0x72e): undefined reference to `ut_dbg_zero'
ha_innodb.o(.text+0x98c): more undefined references to `ut_dbg_zero' follow
collect2: ld returned 1 exit status
make[4]: *** [mysqld] Error 1
make[4]: Leaving directory `/usr/src/mysql-5.0.15/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/mysql-5.0.15/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/mysql-5.0.15/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mysql-5.0.15'
make: *** [all] Error 2

Any ideas are greatly appreciated.

Also, I know I can use the binary but I have been instaling from src for
quite a while and would like to continue if my current OS can handle it.

Thanks in advance....

Ed

. . . . . . . . . . . . . . . . . .
Randomly Generated Quote (614 of 1009):
It is bad luck to be superstitious.
                -- Andrew W. Mathis



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

. . . . . . . . . . . . . . . . . .
Randomly Generated Quote (416 of 1009):
Better to be nouveau than never to have been riche at all.

Ed Kasky
~~~~~~~~~
Randomly Generated Quote (409 of 490):
Some books are to be tasted, others to be swallowed, and some
few to be chewed and digested. -Francis Bacon, essayist,
philosopher, and statesman (1561-1626)


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to