Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668400 - dev-db/mariadb-10.3.8: build failure on ppc64 - xtra/crc32-vpmsum/vec_crc32.c:113:71: error: vector undeclared (first use in this function)
Summary: dev-db/mariadb-10.3.8: build failure on ppc64 - xtra/crc32-vpmsum/vec_crc32.c...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 649038
  Show dependency tree
 
Reported: 2018-10-11 22:38 UTC by ernsteiswuerfel
Modified: 2019-07-06 22:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (mariadb-10.3.8:20181011-220612.log,237.10 KB, text/plain)
2018-10-11 22:38 UTC, ernsteiswuerfel
Details
emerge --info (file_668400.txt,5.86 KB, text/plain)
2018-10-11 22:39 UTC, ernsteiswuerfel
Details
build.log (mariadb-10.3.9) (mariadb-10.3.9:20181011-224148.log,233.14 KB, text/plain)
2018-10-11 22:47 UTC, ernsteiswuerfel
Details
build.log (mariadb-10.3.10) (mariadb-10.3.10:20181106-072912.log,240.98 KB, text/plain)
2018-11-06 07:35 UTC, ernsteiswuerfel
Details
Remove "extra crc32" module from MariaDB 10.x (crc32-power.patch,330 bytes, patch)
2019-07-06 22:10 UTC, A. Wilcox (awilfox)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2018-10-11 22:38:59 UTC
Created attachment 550800 [details]
build.log

/usr/bin/powerpc-unknown-linux-gnu-ar qc libstrings.a  CMakeFiles/strings.dir/bchange.c.o CMakeFiles/strings.dir/bmove_upp.c.o CMakeFiles/strings.dir/ctype-big5.c.o CMakeFiles/strings.dir/ctype-bin.c.o CMakeFiles/strings.dir/ctype-cp932.c.o CMakeFiles/strings.dir/ctype-czech.c.o CMakeFiles/strings.dir/ctype-euc_kr.c.o CMakeFiles/strings.dir/ctype-eucjpms.c.o CMakeFiles/strings.dir/ctype-extra.c.o CMakeFiles/strings.dir/ctype-gb2312.c.o CMakeFiles/strings.dir/ctype-gbk.c.o CMakeFiles/strings.dir/ctype-latin1.c.o CMakeFiles/strings.dir/ctype-mb.c.o CMakeFiles/strings.dir/ctype-simple.c.o CMakeFiles/strings.dir/ctype-sjis.c.o CMakeFiles/strings.dir/ctype-tis620.c.o CMakeFiles/strings.dir/ctype-uca.c.o CMakeFiles/strings.dir/ctype-ucs2.c.o CMakeFiles/strings.dir/ctype-ujis.c.o CMakeFiles/strings.dir/ctype-utf8.c.o CMakeFiles/strings.dir/ctype-win1250ch.c.o CMakeFiles/strings.dir/ctype.c.o CMakeFiles/strings.dir/decimal.c.o CMakeFiles/strings.dir/dtoa.c.o CMakeFiles/strings.dir/int2str.c.o CMakeFiles/strings.dir/is_prefix.c.o CMakeFiles/strings.dir/llstr.c.o CMakeFiles/strings.dir/longlong2str.c.o CMakeFiles/strings.dir/my_strtoll10.c.o CMakeFiles/strings.dir/my_vsnprintf.c.o CMakeFiles/strings.dir/str2int.c.o CMakeFiles/strings.dir/strcend.c.o CMakeFiles/strings.dir/strend.c.o CMakeFiles/strings.dir/strfill.c.o CMakeFiles/strings.dir/strmake.c.o CMakeFiles/strings.dir/strmov.c.o CMakeFiles/strings.dir/strnmov.c.o CMakeFiles/strings.dir/strxmov.c.o CMakeFiles/strings.dir/strxnmov.c.o CMakeFiles/strings.dir/xml.c.o CMakeFiles/strings.dir/strmov_overlapp.c.o CMakeFiles/strings.dir/my_strchr.c.o CMakeFiles/strings.dir/strcont.c.o CMakeFiles/strings.dir/strappend.c.o CMakeFiles/strings.dir/json_lib.c.o
/usr/bin/powerpc-unknown-linux-gnu-ranlib libstrings.a
make[2]: Leaving directory '/var/tmp/portage/dev-db/mariadb-10.3.8/work/mariadb-10.3.8_build'
[ 13%] Built target strings
make[1]: Leaving directory '/var/tmp/portage/dev-db/mariadb-10.3.8/work/mariadb-10.3.8_build'
make: *** [Makefile:163: all] Error 2
 * ERROR: dev-db/mariadb-10.3.8::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2018-10-11 22:39:43 UTC
Created attachment 550802 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2018-10-11 22:47:05 UTC
Created attachment 550804 [details]
build.log (mariadb-10.3.9)

mariadb-10.3.9 fails too, but at a slightly later stage:

[...]
Scanning dependencies of target gen_lex_token
make[2]: Leaving directory '/var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build'
make -f sql/CMakeFiles/gen_lex_token.dir/build.make sql/CMakeFiles/gen_lex_token.dir/build
make[2]: Entering directory '/var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build'
[ 13%] Building CXX object sql/CMakeFiles/gen_lex_token.dir/gen_lex_token.cc.o
cd /var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build/sql && /usr/bin/powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_OPENSSL -DHAVE_POOL_OF_THREADS -DHAVE_SYSTEMD -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -I/var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build/include -I/var/tmp/portage/dev-db/mariadb-10.3.9/work/mysql/include -I/var/tmp/portage/dev-db/mariadb-10.3.9/work/mysql/sql -I/var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build/sql   -O2 -mcpu=powerpc -pipe -felide-constructors -fno-strict-aliasing -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-rtti -DNDEBUG -DDBUG_OFF   -o CMakeFiles/gen_lex_token.dir/gen_lex_token.cc.o -c /var/tmp/portage/dev-db/mariadb-10.3.9/work/mysql/sql/gen_lex_token.cc
[ 13%] Linking CXX executable gen_lex_token
cd /var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build/sql && /usr/bin/cmake -E cmake_link_script CMakeFiles/gen_lex_token.dir/link.txt --verbose=1
/usr/bin/powerpc-unknown-linux-gnu-g++  -O2 -mcpu=powerpc -pipe -felide-constructors -fno-strict-aliasing -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-rtti -DNDEBUG -DDBUG_OFF  -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu CMakeFiles/gen_lex_token.dir/gen_lex_token.cc.o  -o gen_lex_token -lpthread 
make[2]: Leaving directory '/var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build'
[ 13%] Built target gen_lex_token
make[1]: Leaving directory '/var/tmp/portage/dev-db/mariadb-10.3.9/work/mariadb-10.3.9_build'
make: *** [Makefile:163: all] Error 2
 * ERROR: dev-db/mariadb-10.3.9::gentoo failed (compile phase):
 *   emake failed
Comment 3 ernsteiswuerfel archtester 2018-11-06 07:35:54 UTC
Created attachment 554252 [details]
build.log (mariadb-10.3.10)

Same build failure on mariadb-10.3.10.
Comment 4 A. Wilcox (awilfox) 2019-07-06 21:58:12 UTC
This isn't a ppc64 failure.  It may be on 64-bit hardware, but from the toolchain triplet and the failure, it's 32-bit PowerPC.

We're hitting this on Adélie as well, in 32-bit PowerPC.  It seems to be something with AltiVec.  Still investigating.
Comment 5 A. Wilcox (awilfox) 2019-07-06 22:10:13 UTC
Created attachment 582082 [details, diff]
Remove "extra crc32" module from MariaDB 10.x

Okay.

First, if you are building for 32-bit PowerPC, ensure you 'setarch ppc' before running builds.  Not doing this will break a lot of build systems, but *especially* MariaDB.  That would fix the issue that the reporter is facing, as then MariaDB doesn't try to do POWER8 VMX things on 32-bit PowerPC.

However, the real bug is that MariaDB uses POWER8 VMX instructions unconditionally when CMAKE_SYSTEM_PROCESSOR is ppc64.  This will break any system that isn't a POWER8 (970/970fx, P5/P6/P7, etc).

Apply the patch I've attached to fix *that*.