| Summary: | dev-db/mariadb fails to compile on multilib x86_64 with systemtap enabled | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Andrew John Hughes <gnu_andrew> |
| Component: | [OLD] Development | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Set CC before calling the dtrace subprocess | ||
Created attachment 390222 [details, diff]
Set CC before calling the dtrace subprocess
With CC set:
30325 execve("/usr/bin/x86_64-pc-linux-gnu-gcc", ["x86_64-pc-linux-gnu-gcc", "-m32", "-g", "-fPIC", "-I.", "-I/usr/include", "\
-c", "/tmp/.private/root/tmpCZ_rHG.c", "-o", "probes_mysql.o"], [/* 84 vars */] <unfinished ...>
*** This bug has been marked as a duplicate of bug 530132 *** |
When systemtap is enabled, the configure step runs dtrace -G which in turn runs a gcc subprocess to generate probes_msyql.o. The way gcc is called is controlled by environment variables. The build only sets CFLAGS so 'gcc' is used as the compiler and any march flag is lost: 30135 execve("/usr/bin/gcc", ["gcc", "-g", "-fPIC", "-I.", "-I/usr/include", "-c", "/tmp/.private/root/tmpTLoF2S.c", "-o", "pr\ obes_mysql.o"], [/* 83 vars */] <unfinished ...> This causes the 32-bit build to later fail when the 64-bit probes_mysql.o is added to several ar archives and then one of these (libclientlib.a) is linked against a binary. The solution is for the build to set CC in the environment as well using the values from cmake. With the attached patch, the build completes. Reproducible: Always Steps to Reproduce: 1. Build mariadb with USE="systemtap" enabled for both x86_32 and x86_64 ABIs on x86_64. 2. 3. Actual Results: Build fails as a 64-bit probes_mysql.o is built as part of the 32-bit build. Expected Results: Build succeeds. Portage 2.2.14 (python 2.7.8-final-0, hardened/linux/amd64, gcc-4.9.1, glibc-2.20, 3.17.2-hardened.rivendell x86_64) ================================================================= System uname: Linux-3.17.2-hardened.rivendell-x86_64-Intel-R-_Xeon-R-_CPU_X5482_@_3.20GHz-with-gentoo-2.2 KiB Mem: 8216340 total, 463760 free KiB Swap: 6147416 total, 3161872 free Timestamp of tree: Mon, 24 Nov 2014 07:45:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.3_p30 dev-java/java-config: 2.2.0 dev-lang/perl: 5.20.1 dev-lang/python: 2.7.8, 3.4.2 dev-util/cmake: 2.8.12.2 dev-util/pkgconfig: 0.28-r2 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.13.1 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.14.1 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.8.2, 4.9.1 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.3-r2 sys-devel/make: 4.1-r1 sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers) sys-libs/glibc: 2.20 CFLAGS="-O2 -pipe -march=core2 -ggdb" CFLAGS_amd64="-m64" CFLAGS_x32="-mx32" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x32="x86_64-pc-linux-gnux32" CHOST_x86="i686-pc-linux-gnu"