Bug 283949 - x11/pixman: build fail
Summary: x11/pixman: build fail
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-09 07:12 UTC by Ivan Rozhuk
Modified: 2025-01-17 09:03 UTC (History)
4 users (show)

See Also:
manu: maintainer-feedback+


Attachments
Make OpenMP optional (1.27 KB, patch)
2025-01-09 13:05 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2025-01-09 07:12:46 UTC
...
Checking if "GNU Inline ASM support." compiles: YES 
WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO (tried system)

meson.build:418:15: ERROR: Dependency "openmp" not found, tried system
...

My FBSD builded without OpenMP: src.conf have "WITHOUT_OPENMP="

Forcing "-Dopenmp=disabled" fix build issue.

Can port have autodetect for this or at least option to disable OpenMP?
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2025-01-09 07:25:57 UTC
Doesn't seems to be possible to have it autodetect, openmp is only used for tests it seems, so best option is to disable test for your setup.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2025-01-09 07:54:19 UTC
OpenMP is also used in pixman/dither/make-blue-noise.c, but we can ignore that.

We should make it a TEST_BUILD_DEPENDS and also tie the Meson option to the framework one.
Comment 3 Ronald Klop freebsd_committer freebsd_triage 2025-01-09 08:03:39 UTC
Some ports check for openmp:

$ find /usr/porsts -name Makefile | xargs grep -A 3 "omp.h
./math/tmv/Makefile:.if !exists(/usr/include/omp.h)
./math/tmv/Makefile-USES+=		compiler:gcc-c++11-lib
./math/tmv/Makefile-.endif

Can't this port do something similar?
.if !exists(/usr/include/omp.h)
CFLAGS+=-Dopenmp=disabled
.endif

(I think an architecture like armv7 doesn't have openmp at all so this construction fixes some ports on that platform.)
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2025-01-09 12:51:46 UTC
(In reply to Ronald Klop from comment #3)
I build base and ports with devel/llvm* and have WITHOUT_CLANG in src.conf so /usr/include/omp.h doesn't exist here either, but devel/llvm* does support OpenMP.  It's probably best to create an OPENMP option.
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2025-01-09 13:05:42 UTC
Created attachment 256573 [details]
Make OpenMP optional
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-01-17 09:00:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=01d3683c441704c1f2ed00c44a41ad94baf72a5b

commit 01d3683c441704c1f2ed00c44a41ad94baf72a5b
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2025-01-09 12:18:27 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2025-01-17 08:58:19 +0000

    x11/pixman: Make OpenMP optional

    OpenMP is not available when the base system has been built with
    WITHOUT_OPENMP in src.conf(5).

    PR:             283949
    Reviewed by:    manu

 x11/pixman/Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)