Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 869167 - dev-db/postgresql-14.5: selects invalid llvm version despite constraint in CDEPEND
Summary: dev-db/postgresql-14.5: selects invalid llvm version despite constraint in CD...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 11:00 UTC by Holger Hoffstätte
Modified: 2022-09-08 13:20 UTC (History)
0 users

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 Holger Hoffstätte 2022-09-08 11:00:08 UTC
Commit 5d20e0d35b27 constrained the LLVM version for building with USE="llvm". Apart from the fact that this does not work when the full package is supposed ot be built with clang (easily fixed by using clang-14..), it unfortunately also does not work when building with gcc, as the configure script still selects the unconstrained (i.e. latest) version installed, in this case llvm-15 instead of -14.


Reproducible: Always

Steps to Reproduce:
1. install llvm/clang-15 in parallel to -14
2. try to build postgres with USE="llvm"
3. build failure

Actual Results:  
$USE="llvm server" ebuild /var/db/repos/gentoo/dev-db/postgresql/postgresql-14.5.ebuild clean configure
...
checking whether x86_64-pc-linux-gnu-gcc supports -Wstringop-truncation, for NOT_THE_CFLAGS... yes
checking whether /usr/lib/llvm/15/bin/clang supports -fno-strict-aliasing, for BITCODE_CFLAGS... yes
checking whether /usr/lib/llvm/15/bin/clang -xc++ supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... yes
...

As you can see llvm-15 is picked up.


Expected Results:  
The ebuild should force llvm/clang-14 to be used.
I noticed that the configure script can accept something like
LLVM_CONFIG=/usr/lib/llvm/14/bin/llvm-config but this only affects the libs & other flags, not the toolchain itself.


Not sure if this is worth th effort or configure/Makefile surgery?
Comment 1 Larry the Git Cow gentoo-dev 2022-09-08 12:25:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d750a248fde0ee84c9bf862749caac6209ca0b

commit 07d750a248fde0ee84c9bf862749caac6209ca0b
Author:     Patrick Lauer <patrick@gentoo.org>
AuthorDate: 2022-09-08 12:24:46 +0000
Commit:     Patrick Lauer <patrick@gentoo.org>
CommitDate: 2022-09-08 12:25:32 +0000

    dev-db/postgresql: Fix llvm behaviour properly for :14 and :15
    
    Closes: https://bugs.gentoo.org/869167
    Signed-off-by: Patrick Lauer <patrick@gentoo.org>

 dev-db/postgresql/postgresql-14.5.ebuild     | 5 ++++-
 dev-db/postgresql/postgresql-15_beta3.ebuild | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
Comment 2 Holger Hoffstätte 2022-09-08 13:20:02 UTC
Works, thanks you!