Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886474 - dev-db/mysql-connector-c-8.0.31: build is locale-sensitive
Summary: dev-db/mysql-connector-c-8.0.31: build is locale-sensitive
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-12-17 10:14 UTC by Krzysztof Nowicki
Modified: 2023-04-09 20:14 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Nowicki 2022-12-17 10:14:48 UTC
mysql-connector-c fails to build if the system locale (LC_ALL) is set to a non-English language:

cd /var/tmp/portage/dev-db/mysql-connector-c-8.0.31/work/mysql-connector-c-8.0.31
_build-abi_x86_64.amd64/runtime_output_directory && ./build_id_test | egrep -o [0-9a-f]{40} > build_id_test_1 && /usr/bin/eu-readelf -n ./build_id_test | grep "Build ID:" | egrep -o [0-9a-f]{40} > build_id_test_2 && diff build_id_test_1 b
uild_id_test_2
FAILED: runtime_output_directory/build_id_test

The build tries to extract the BuildID from the build_id_test using eu-readelf. Unfortunately when the output of this utility is translated and on my system (pl_PL.UTF-8) it looks like this:

# /usr/bin/eu-readelf -n ./build_id_test

Segment notatki [ 2] „.note.gnu.build-id” o długości 36 B pod offsetem 0x2c4:
  Właściciel     Rozmiar danych  Typ
  GNU                   20  GNU_BUILD_ID
    Identyfikator kopii: 30a263b513d446932564db7b8b8ac396cc7b1b0e

Segment notatki [ 3] „.note.ABI-tag” o długości 32 B pod offsetem 0x2e8:
  Właściciel     Rozmiar danych  Typ
  GNU                   16  GNU_ABI_TAG
    System operacyjny: Linux, ABI: 3.2.0

The grep is looking for the line with "Build ID:", but sees the translated version "Identyfikator kopii:" instead and fails.

Reproducible: Always

Steps to Reproduce:
1. USE="nls" emerge dev-libs/elfutils
2. LC_ALL=pl_PL.UTF-8 emerge dev-db/mysql-connector-c
Actual Results:  
The build fails with the error described above

Expected Results:  
The build should succeeds.

To work around the problem set LC_ALL=C before emerging mysql-connector-c
Comment 1 Larry the Git Cow gentoo-dev 2023-04-09 05:31:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=016648eda578932e93becd587cbc9bc4e376c9e3

commit 016648eda578932e93becd587cbc9bc4e376c9e3
Author:     orbea <orbea@riseup.net>
AuthorDate: 2023-04-07 19:55:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-09 05:27:14 +0000

    dev-db/mysql-connector-c: Build fixes
    
    * Adds -DWITH_BUILD_ID=OFF to workaround various build issues
    * Patches the source to work with musl
    
    Upstream-PR: https://github.com/mysql/mysql-server/pull/455
    Closes: https://bugs.gentoo.org/886474
    Closes: https://bugs.gentoo.org/903415
    Closes: https://bugs.gentoo.org/885035
    Signed-off-by: orbea <orbea@riseup.net>
    Closes: https://github.com/gentoo/gentoo/pull/30517
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/mysql-connector-c-8.0.32-musl.patch      | 25 ++++++++++++++++++++++
 .../mysql-connector-c-8.0.32-r1.ebuild             |  2 ++
 2 files changed, 27 insertions(+)