make[1]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem router modules.d # emerge info Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22) ================================================================= System uname: 2.4.22 i586 AMD-K6(tm) 3D processor Gentoo Base System version 1.4.3.10 distcc 2.11.1 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=k6-3 -pipe" CHOST="i586-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=k6-3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs distcc" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux /distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 crypt cups encode foomaticdb gif jpeg libg++ motif mpeg ncurses nls pdfl ib sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline postgres tcpd pam libwww ssl perl python 3dnow aalib apache2 dedicated imap java maildir m mx mysql odbc php samba sasl snmp -oss -apm arts avi -gpm gtk -imlib kde -gnome - mad -mikmod oggvorbis -opengl qt quicktime -X gd png" Reproducible: Always Steps to Reproduce: 1.emerge mysql 2. 3. Actual Results: !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem router modules.d # emerge info Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22) ================================================================= System uname: 2.4.22 i586 AMD-K6(tm) 3D processor Gentoo Base System version 1.4.3.10 distcc 2.11.1 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=k6-3 -pipe" CHOST="i586-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=k6-3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs distcc" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux /distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 crypt cups encode foomaticdb gif jpeg libg++ motif mpeg ncurses nls pdfl ib sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline postgres tcpd pam libwww ssl perl python 3dnow aalib apache2 dedicated imap java maildir m mx mysql odbc php samba sasl snmp -oss -apm arts avi -gpm gtk -imlib kde -gnome - mad -mikmod oggvorbis -opengl qt quicktime -X gd png"
please post more of the error
mv -f manager.o .libs/manager.lo gcc -DDEFAULT_CHARSET_HOME=\"/usr\" -DDATADIR=\"/var/lib/mysql\" -DSHAREDIR=\"/usr/share/mysql\" -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -march=k6-3 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS -c manager.c -MT manager.lo -MD -MP -MF .deps/manager.TPlo >/dev/null 2>&1 mv -f .libs/manager.lo manager.lo make[2]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/libmysql_r' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem
still need more of the error, as that fragment still doesn't show any error. it may help to do MAKEOPTS="-j1" in your make.conf, and then generate the error output.
E=1 -DUSE_OLD_FUNCTIONS -c my_init.c -MT my_init.lo -MD -MP -MF .deps/my_init.TPlo -fPIC -DPIC distcc[23353] (dcc_build_somewhere) Warning: failed to distribute, running locally instead In file included from /usr/include/sys/socket.h:35, from ../include/my_global.h:454, from mysys_priv.h:17, from my_init.c:17: /usr/include/bits/socket.h:166: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. distcc[23353] ERROR: compile on localhost failed make[2]: *** [my_init.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/libmysql_r' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem
1. how much ram/swap do you have? try to increase swap first (some parts of MySQL can take a LOT) 2. reduce your cflags to CFLAGS="-march=k6-2 -pipe" or CFLAGS="-march=k6 -pipe"
256K RAM CFLAGS="-march=k6-2 -pipe" or CFLAGS="-march=k6 -pipe" doesnt sort it. How do I increase the swap file?
you mean 256mb of ram? i didn't think normal linux fit in 256kb... try going down to CFLAGS="-march=i586 -O0" as well how big is your current swap space? include the output of 'free -m' here eg, my server says: total used free shared buffers cached Mem: 1515 1482 32 0 597 605 -/+ buffers/cache: 278 1236 Swap: 972 31 941 which is that i've got approx 1.5gb of memory, and 972mb of swap.
for more rough details on swap stuff, see http://dev.panopticsearch.com/swapfile-notes.html
router tmp # free -m total used free shared buffers cached Mem: 124 43 80 0 3 23 -/+ buffers/cache: 17 107 Swap: 256 0 256 router tmp # dd if=/dev/zero of=/tmp/swap bs=1K count=1024 1024+0 records in 1024+0 records out router tmp # ls -sh /tmp/swap 1.1M /tmp/swap router tmp # mkswap /tmp/swap Setting up swapspace version 1, size = 1044 kB router tmp # swapon /tmp/swap router tmp # free -m total used free shared buffers cached Mem: 124 45 79 0 3 24 -/+ buffers/cache: 17 107 Swap: 257 0 257 router tmp # emerge mysql .... iosocket.o viossl.o viosslfactories.o net.o make[2]: *** [libmysqlclient_r.la] Error 139 make[2]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/libmysql_r' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem router tmp # router tmp # cat /etc/make.conf |grep CF |grep -v '#' CFLAGS="-march=i586 -O0" CXXFLAGS="${CFLAGS}" router tmp #
got the memroy correct (I think) router critical # free -m total used free shared buffers cached Mem: 124 112 11 0 5 85 -/+ buffers/cache: 21 103 Swap: 769 0 769 router critical # ./include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -march=i586 -O0 -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS -c my_sleep.c -MT my_sleep.lo -MD -MP -MF .deps/my_sleep.TPlo -o my_sleep.o >/dev/null 2>&1 make[2]: *** [my_sleep.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/libmysql_r' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem
you're definetly short of memory. run the emerge, and _before_ it crashes, in another window, keep track of the memory usage. use "free -t -s .5" and see low the the free amount gets. somebody else reported the mysql compile to use upwards of 800mb at one point. and this is even with low-memory compile option. one last ditch idea on getting around the memory usage, namely: set CFLAGS="-march=i586 -O0 -save-temps" and MAKEOPTS="-j1" ebuild (full path to ebuild file) compile then, when it crashes, look very carefully at what failed, and go and use the temporary files to build the next big file manually.
Created attachment 22203 [details] free -t -s 1 >>myfile during emerge mysql added a 1.5GB swap file .edited a load of stuff from the middle of the file. I'll run memtest overnight
This happens to me also. Although I have enough ram/swap. The command I run is "USE="-ssl -static" emerge mysql" "free -m" outputs: total used free shared buffers cached Mem: 376 297 79 0 45 119 -/+ buffers/cache: 132 243 Swap: 494 0 494 When I ran the "free -t -s .5" it showed that the swap file was never touched. desktop root # emerge info Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-test11-gentoo-r2) ================================================================= System uname: 2.6.0-test11-gentoo-r2 i686 AMD Athlon(TM) XP1700+ Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss crypt encode foomaticdb libg++ mikmod ncurses nls xml2 xmms zlib gdbm berkdb slang readline arts aalib svga gpm tcpd pam ssl esd imlib oggvorbis gtk qt motif 3dnow alsa apache2 apm avi bonobo dr cups directfb dvd flash gnome gd gif gphoto2 imap jikes java jpeg kde libwww lirc mad mmx mozilla mpeg mysql nocd opengl pa ppds pdflib perl png quicktime samba sdl snmp spell static tiff truetype us video wmf X gtk2 xv python ruby" This is the Error Message I get: /usr/include/tcpd.h: In function `void* handle_connections_sockets(void*)': /usr/include/tcpd.h:131: too many arguments to function `void sock_host()' mysqld.cc:2915: at this point in file /usr/include/tcpd.h:69: too many arguments to function `int hosts_access()' mysqld.cc:2916: at this point in file /usr/include/tcpd.h:124: too many arguments to function `char* eval_client()' mysqld.cc:2924: at this point in file make[4]: *** [mysqld.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[4]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/sql' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/sql' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14/sql' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mysql-4.0.14-r2/work/mysql-4.0.14' make: *** [all] Error 2 !!! ERROR: dev-db/mysql-4.0.14-r2 failed. !!! Function src_compile, Line 140, Exitcode 2 !!! compile problem Any Ideas?
pdcooper: any results from memtest? Patrick Davis: you have a different problem, try a newer mysql ebuild. if that fails, please open a new bug for your problem.
no response from users, closing old bugs.