[MDEV-22887] compilation failure on xenial-ppc64le Created: 2020-06-13  Updated: 2020-06-23  Resolved: 2020-06-15

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - InnoDB
Affects Version/s: None
Fix Version/s: 10.5.4

Type: Bug Priority: Blocker
Reporter: Sergei Golubchik Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-22888 CLONE - compilation failure on xenial... Closed
Relates
relates to MDEV-22641 Provide SIMD optimized wrapper for zl... Closed
relates to MDEV-22876 buildbot kvm-deb-xenial-ppc64le updates Closed

 Description   

../../storage/innobase/libinnobase.a(ut0crc32.cc.o):(.data.rel+0x0): undefined reference to `crc32c_vpmsum'
collect2: error: ld returned 1 exit status



 Comments   
Comment by Marko Mäkelä [ 2020-06-14 ]

danblack suggests in MDEV-22876 that updating binutils on the builder should fix this.

Comment by Marko Mäkelä [ 2020-06-14 ]

danblack, I hope that you can help us with this. I do not quite understand how this is supposed to work.

git grep -l crc32c_vpmsum

will only list 2 files: mysys/CMakeLists.txt (where the symbol is supposed to be defined) and storage/innobase/ut/ut0crc32.cc (the user of the symbol).

In mysys/CMakeLists.txt there is the following lines:

  SET(MYSYS_SOURCES ${MYSYS_SOURCES} $<TARGET_OBJECTS:crc32c> $<TARGET_OBJECTS:crc32ieee>)
 
  ADD_LIBRARY(crc32c OBJECT crc32/crc32_ppc64.c)
  ADD_LIBRARY(crc32ieee OBJECT crc32/crc32_ppc64.c)

As far as I understand, one of these libraries should be generated for crc32_vpmsum() and another for crc32c_vpmsum(). But, for some reason the crc32c_vpmsum() fails to be added to the libmysys.

Also, it looks like CRC32_LIBRARY became unused in MDEV-22641, but some references were not removed.

Comment by Marko Mäkelä [ 2020-06-15 ]

The problem was that libinnobase.a depends on libmysys.a, but we failed to specify that dependency. Newer versions of the linker have apparently become more permissive. The libmysys.a had already been specified before libinnobase.a in the linker invocation.

Generated at Thu Feb 08 09:18:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.