# [solved] mysql emerge fails in XEN domU. Is CFLAG necessary?

## massctrl

Hi,

Referring to the gentoo wiki about installing xen, the author mentions to put -mno-tls-direct-seg-refs" in the CFLAGS for performace reasons.

I've done this building my xen0 domain.  All working well.

When I compile in a domU domain, do I still need that compilerflag?

Apparently mysql fails to emerge in domU with the  -mno-tls-direct-seg-refs compile flag set. (see bolow )

so quid?

Cheers,

*note: in my original post I asked if the -mno-tls-direct-seg-refs is needed as a compile flag in a domU environment.Last edited by massctrl on Tue Feb 13, 2007 8:09 pm; edited 3 times in total

----------

## James Wells

Greetings,

   Yes you do, unless you wish to use the tls lib removal.

----------

## nixnut

Moved from Installing Gentoo to Kernel & Hardware.

Not about getting gentoo installed, so moved here.

----------

## massctrl

Well with that flag turned on mysql fails when emerging....

```

        then mv -f ".deps/hostname.Tpo" ".deps/hostname.Po"; else rm -f ".deps/hostname.Tpo"; exit 1; fi

if i386-pc-linux-gnu-g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\"" -DDATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../bdb/build_unix -I../innobase/include -I../include -I../include -I../regex -I.     -DDBUG_OFF -O2 -mtune=i686 -pipe -mno-tls-direct-seg-refs -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti -MT set_var.o -MD -MP -MF ".deps/set_var.Tpo" -c -o set_var.o set_var.cc; \

        then mv -f ".deps/set_var.Tpo" ".deps/set_var.Po"; else rm -f ".deps/set_var.Tpo"; exit 1; fi

if i386-pc-linux-gnu-g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\"" -DDATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../bdb/build_unix -I../innobase/include -I../include -I../include -I../regex -I.     -DDBUG_OFF -O2 -mtune=i686 -pipe -mno-tls-direct-seg-refs -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti -MT sql_parse.o -MD -MP -MF ".deps/sql_parse.Tpo" -c -o sql_parse.o sql_parse.cc; \

        then mv -f ".deps/sql_parse.Tpo" ".deps/sql_parse.Po"; else rm -f ".deps/sql_parse.Tpo"; exit 1; fi

Note: The following compile may take a long time.

If it fails, re-run configure with --with-low-memory

i386-pc-linux-gnu-g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\"" -DDATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../bdb/build_unix -I../innobase/include -I../include -I../include -I../regex -I.     -DDBUG_OFF -O2 -mtune=i686 -pipe -mno-tls-direct-seg-refs -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti -fno-inline -c sql_yacc.cc

i386-pc-linux-gnu-g++: Internal error: Killed (program cc1plus)

Please submit a full bug report.

See <URL:http://bugs.gentoo.org/> for instructions.

make[4]: *** [sql_yacc.o] Error 1

make[4]: Leaving directory `/var/tmp/portage/mysql-5.0.26-r2/work/mysql/sql'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/var/tmp/portage/mysql-5.0.26-r2/work/mysql/sql'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/var/tmp/portage/mysql-5.0.26-r2/work/mysql/sql'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/mysql-5.0.26-r2/work/mysql'

make: *** [all] Error 2

!!! ERROR: dev-db/mysql-5.0.26-r2 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  ebuild.sh, line 1255:   Called mysql_src_compile

  mysql.eclass, line 633:   Called die

!!! emake failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

```

----------

## bocacorazon

I have exctly the same problem.

----------

## jmbsvicetto

Hi.

Please check if this bug applies to you.

----------

## bocacorazon

Well, I've found what caused my problem.

I have not configured the swap file correctly before passing it to the domU.

Once that was fixed, mysql emerged without problem.

This is consistent with the bug diagnosis: you run out of memory.

Thanks

----------

## massctrl

Right,....

Nice one, ... apparently my swap isn't working the way it should be.

Thanks everyone

----------

