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

Bug 532020

Summary: media-libs/mesa USE=openmp CFLAGS=-fopenmp - ?
Product: Gentoo Linux Reporter: Vlad Horko <scjthm>
Component: [OLD] LibraryAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vlad Horko 2014-12-09 06:00:38 UTC
Added openmp to USE flags and -fopenmp to CFLAGS and LDFLAGS recently. 
Mesa stops building with the following problems:
Mesa-10.3.5-abi_x86_64.amd64/src/mesa/swrast/s_aatritemp.h  
needs an exter int omp_get_num_threads();
.../src/mesa/swrast/s_context.c and .../src/mesa/swrast/s_texcombine.c
 need an #include <omp.h>


Reproducible: Always

Steps to Reproduce:
1. Put USE=openmp
2. Put CFLAGS=-fopenmp
3. Put LDFLAGS=-fopenmp
Actual Results:  
no build.
Comment 1 Patrick Lauer gentoo-dev 2014-12-09 06:03:00 UTC
You shouldn't add random things to CFLAGS/LDFLAGS like this. As you see it breaks things.
Comment 2 Vlad Horko 2014-12-09 07:43:00 UTC
(In reply to Patrick Lauer from comment #1)
> You shouldn't add random things to CFLAGS/LDFLAGS like this. As you see it
> breaks things.

I don't think that -fopenmp is random. 

This was expected, and for your information https://bugs.freedesktop.org/show_bug.cgi?id=87137 has been accepted as valid. QED.
Comment 3 Vlad Horko 2014-12-09 07:52:09 UTC
FYI: The problem was the code missing support for openmp. The use flag enabled that - all the -fopenmp flag does is enable support for openmp directives were they not provided. Any developer worth his salt knows that this would be a noop in this case, and would not cause harm. In fact this eliminated the need to check that the autotools were adding support for this flag in this case.

All I wanted to show was that gentoo is all about fault finding and not about helping and fixing issues.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-09 08:09:01 UTC
-fopenmp is not random, it's just not something you add to your global CFLAGS.