Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 685170

Summary: qt5-build.eclass fails src_prepare() on CXXFLAGS=-falign-functions=32:25:16
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 685160    
Attachments: 0001-qt5-build.eclass-use-safer-sed-delimiter-not.patch

Description Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-06 07:45:33 UTC
Fallout from https://bugs.gentoo.org/685160

$ LANG=C CXXFLAGS=-falign-functions=32:25:16 ebuild qtcore-5.12.3.ebuild clean prepare

>>> Preparing source in /tmp/portage/dev-qt/qtcore-5.12.3/work/qtbase-everywhere-src-5.12.3 ...
sed: -e expression #1, char 373: unknown option to `s'
 * ERROR: dev-qt/qtcore-5.12.3::gentoo failed (prepare phase):
 *   sed failed (respect env for qmake build)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_prepare
 *   environment, line 2872:  Called qt5-build_src_prepare
 *   environment, line 2449:  Called die
 * The specific snippet of code:
 *           sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s:):                    ${MAKEOPTS} ${EXTRA_EMAKE} 'CC=$(tc-getCC)' 'CXX=$(tc-getCXX)'                  'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&:" -e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' configure || die "sed failed (respect env for qmake build)";
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-26 07:43:11 UTC
Created attachment 577812 [details, diff]
0001-qt5-build.eclass-use-safer-sed-delimiter-not.patch

The following patch seems to be enough to fix src_prepare().
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-26 07:53:45 UTC
Sent for review as https://archives.gentoo.org/gentoo-dev/message/23a2b1acfc0802a52285494b15b96773
Comment 3 Michael Palimaka (kensington) gentoo-dev 2019-06-01 10:25:16 UTC
If it works, ship it!
Comment 4 Larry the Git Cow gentoo-dev 2019-06-01 17:33:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21eb6a8e43e6bf1d75dcf728afdbcfbf9fe422a1

commit 21eb6a8e43e6bf1d75dcf728afdbcfbf9fe422a1
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-05-26 07:41:12 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 17:32:49 +0000

    qt5-build.eclass: use safer '|' sed delimiter, not ':'
    
    CC: qt@gentoo.org
    Closes: https://bugs.gentoo.org/685170
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/qt5-build.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2019-06-08 19:36:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/qt.git/commit/?id=bd1dfde90f4b128ca3faa7c5a9295b244bf96d0f

commit bd1dfde90f4b128ca3faa7c5a9295b244bf96d0f
Author:     Jimi Huotari <chiitoo@gentoo.org>
AuthorDate: 2019-06-08 19:26:46 +0000
Commit:     Jimi Huotari <chiitoo@gentoo.org>
CommitDate: 2019-06-08 19:34:23 +0000

    qt5-build.eclass: sync with the main Gentoo ebuild repo tree
    
    Use '|' sed delimiter instead of ':', which leads to a failure in
    'src_prepare()' with 'CXXFLAGS=-falign-functions=32:25:1'.
    
    - https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21eb6a8e
    
    Bug: https://bugs.gentoo.org/685170
    Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>

 eclass/qt5-build.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)