Unable to compile mysql50-server

Roger Merritt mcrogerm at stjohn.ac.th
Tue Jan 31 22:46:46 PST 2006


I've been having some strange problems trying to upgrade my mysql-server on 
a Freebsd6.0-STABLE machine. When compiling mysql* I have a problem with 
the machine running out of swap space and stalling in some kind of infinite 
loop. I solved it for mysql50-client by going to the 
/usr/ports/databases/mysql50-client directory and running "make", rebooting 
to get out of the loop, and running make again. The second time it ran to 
completion and I was able to run "make install" without further problem. 
When I tried the same strategy with mysql50-server, after rebooting, make 
stopped on an error message:

>c++ -DDBUG_OFF -O -pipe -fconserve-space -O -pipe -felide-constructors 
>-fno-rtti -fno-exceptions -fno-implicit-templates -fno-exceptions 
>-fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -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 -pthread 
>-pthread 
>-L/usr/ports/databases/mysql50-server/work/mysql-5.0.18/bdb/build_unix 
>-ldb ../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 ../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 -lwrap -pthread -pthread 
>-lcrypt -lm -pthread -pthread
>sp_rcontext.o: file not recognized: File truncated
>*** Error code 1
>
>Stop in /usr/ports/databases/mysql50-server/work/mysql-5.0.18/sql.
>*** Error code 1
>
>Stop in /usr/ports/databases/mysql50-server/work/mysql-5.0.18/sql.
>*** Error code 1
>
>Stop in /usr/ports/databases/mysql50-server/work/mysql-5.0.18/sql.
>*** Error code 1
>
>Stop in /usr/ports/databases/mysql50-server/work/mysql-5.0.18.
>*** Error code 1

The first time this happened I deleted mysql-5.0.18.tar.gz from 
/usr/ports/distfiles and fetched the port again, but got exactly the same 
message in exactly the same place. I don't see how the file can be damaged, 
since the MD5 signature checks. It must not be a common problem, because I 
haven't seen a lot of questions here or in the ports list.

I'm not sure what the problem is. After the first few times of running out 
of swap space I enlarged my swap file from 128MB to 512MB. I don't really 
see why that's not enough swap space, but I don't think that's the real 
problem. Incidentally, I was getting the same problem with mysql41, but I 
wanted to upgrade to 5.0 anyway for the new features. Luckily, this is not 
a production maching, but it does act as the internet gateway for half a 
dozen other machines, so I would not want it down for long periods.

Any suggestions would be appreciated.

-- 
Roger




More information about the freebsd-questions mailing list