Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828887 - media-libs/libmypaint does not necessarily need sys-devel/gcc[+openmp]
Summary: media-libs/libmypaint does not necessarily need sys-devel/gcc[+openmp]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-11 08:50 UTC by Alec Ari
Modified: 2022-01-11 12:17 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 Alec Ari 2021-12-11 08:50:48 UTC
media-libs/libmypaint can use libomp (Clang+LLD tested, confirmed works)

Reproducible: Always

Steps to Reproduce:
1. Try to build gcc without openmp, have libmypaint installed
2. Portage dependency conflict
Comment 1 Alec Ari 2021-12-11 09:11:33 UTC
Relevant flags:

CFLAGS="-O2 -fopenmp=libomp"
CXXFLAGS="-O2 -fopenmp=libomp"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -fopenmp=libomp -lomp"

`-lomp` is needed for LDFLAGS though if you specified -fopenmp=libomp in C{XX}FLAGS+LDFLAGS, otherwise you get undefined symbol for omp_get_max_threads

I'm weeding through all the quirks right now with Clang+LLD system wide, OpenMP seems to be the weirdest thing right now but I'm fixing those as I go, avoiding any GCC dependencies I can find.
Comment 2 Alec Ari 2021-12-11 09:21:36 UTC
Forgot to mention, I'm building libmypaint with USE="openmp" enabled. I know that probably seems obvious, just putting that out in there in case this comes up.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-16 04:38:01 UTC
I'd expect it to handle -lomp for us given it's using AC_OPENMP. I can't reproduce your issue either.

I can fix the dependency issue, of course, but could you show me the underlinking issue? Is it failing at runtime instead?
Comment 4 Larry the Git Cow gentoo-dev 2021-12-16 04:39:05 UTC
The bug has been referenced in the following commit(s):

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

commit f19472c25655279ce8dd1ea88d44a2c55cdfe071
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-16 04:38:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-16 04:38:48 +0000

    media-libs/libmypaint: fix openmp handling
    
    Bug: https://bugs.gentoo.org/828887
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{libmypaint-1.6.1.ebuild => libmypaint-1.6.1-r1.ebuild}      | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Comment 5 Alec Ari 2021-12-16 05:34:35 UTC
`-fopenmp=libomp -lomp` isn't needed, I was migrating a system from GCC+LD to Clang+LLD and needed to recompile more of the system against the new toolchain, sorry about that bit. I may have needed to re-build libomp but anyway, that issue is gone now.

Thanks!
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-11 12:17:49 UTC
(In reply to Alec Ari from comment #5)
> `-fopenmp=libomp -lomp` isn't needed, I was migrating a system from GCC+LD
> to Clang+LLD and needed to recompile more of the system against the new
> toolchain, sorry about that bit. I may have needed to re-build libomp but
> anyway, that issue is gone now.
> 
> Thanks!

No problem! Thank you!