Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 759058 - dev-db/mysql-connector-c-8.0.22 fails to build if CFLAGS or CXXFLAGS are empty
Summary: dev-db/mysql-connector-c-8.0.22 fails to build if CFLAGS or CXXFLAGS are empty
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-08 14:41 UTC by Igor Franchuk
Modified: 2024-04-27 12:54 UTC (History)
1 user (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 Igor Franchuk 2020-12-08 14:41:22 UTC
mysql-connector fails to build if either CFLAGS or CXXFLAGS are unset in a misleading way throwing 
CMake Error at CMakeLists.txt:879 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
CMake Error at CMakeLists.txt:881 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.


Reproducible: Always




I suggest to add a direct check weather CFLAGS/CXXFLAGS are empty before proceeding with configure and if they are - throw a meaningful message like CFLAGS are empty, please configure CFLAGS/CXXFLAGS
Comment 1 Jose Roberto 2023-06-19 11:38:35 UTC
I can confirm this REGEX problem with arm64, more specifically with 8.0.32-r1 ebuild. I fixed it by replacing 

  STRING(REGEX REPLACE "-specs=/usr/lib/rpm/redhat/.*"  ""
    CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
  STRING(REGEX REPLACE "-specs=/usr/lib/rpm/redhat/.*"  ""
    CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

with 

  STRING(REGEX REPLACE "-specs=/usr/lib/rpm/redhat/.*"  ""
    CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  STRING(REGEX REPLACE "-specs=/usr/lib/rpm/redhat/.*"  ""
    CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

Please note the added "". I hope someone benefit from this. Seeya.
Comment 2 Jose Roberto 2023-06-19 11:41:11 UTC
I have edited the file:
/var/tmp/portage/dev-db/mysql-connector-c-8.0.32-r1/work/mysql-8.0.32/CMakeLists.txt
Comment 4 Larry the Git Cow gentoo-dev 2024-04-27 12:54:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65e810c9b1123f6c07d92328dfdf1e60498bc392

commit 65e810c9b1123f6c07d92328dfdf1e60498bc392
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2024-04-08 14:37:50 +0000
Commit:     Petr Vaněk <arkamar@gentoo.org>
CommitDate: 2024-04-27 12:53:24 +0000

    dev-db/mysql-connector-c: add 8.0.36
    
    Changes:
    - musl patch upstreamed, see [1-3]
    - mysql.info not present any more, see [4]
    - lz4 patch updated
    
    [1] https://github.com/mysql/mysql-server/commit/dc6b9e2556bf247cda80670b824cb24b271946f2
    [2] https://bugs.mysql.com/bug.php?id=110808
    [3] https://github.com/mysql/mysql-server/pull/455
    [4] https://github.com/mysql/mysql-server/commit/18b2dd3ddfbe06bef9a378f1a87e63d494514b0b
    
    Closes: https://bugs.gentoo.org/893912
    Closes: https://bugs.gentoo.org/900667
    Closes: https://bugs.gentoo.org/759058
    Closes: https://bugs.gentoo.org/882743
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/36160
    Signed-off-by: Petr Vaněk <arkamar@gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   1 +
 ...-8.0.36-always-build-decompress-utilities.patch |  23 ++++
 .../mysql-connector-c-8.0.36.ebuild                | 123 +++++++++++++++++++++
 3 files changed, 147 insertions(+)