Bug 248609

Summary: math/libflame: line 54: Malformed conditional (${CHOSEN_COMPILER_TYPE} == clang)
Product: Ports & Packages Reporter: Gian-Simon Purkert <gspurki>
Component: Individual Port(s)Assignee: Johannes M Dieterich <jmd>
Status: Closed Feedback Timeout    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (jmd)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Gian-Simon Purkert 2020-08-11 21:10:28 UTC
'make install clean' trows that error:

make[2]: "/usr/ports/math/libflame/Makefile" line 54: Malformed conditional (${CHOSEN_COMPILER_TYPE} == clang)
make[2]: Fatal errors encountered -- cannot continue
make[2]: stopped in /usr/ports/math/libflame
*** Error code 1
Comment 1 tigersharke 2020-10-08 22:47:03 UTC
Interaction with the Makefile whether directly (via make) or through ports-mgmt tools (including portlint) will cause the described error.

The section of the Makefile which causes the error (below) seems to need an update to reflect that devel/openmp is now deleted, was "Deprecated: Part of base system since FreeBSD 11.3/12.1" and I believe directly supported by clang now.

--
.if ${PORT_OPTIONS:MOPENMP}
.if ${CHOSEN_COMPILER_TYPE} == clang
IGNORE=         clang does not support OPENMP, use THREADS instead
.endif
OPENMP_CFLAGS ?=        -fopenmp
CFLAGS+=                ${OPENMP_CFLAGS}
LDFLAGS+=               ${OPENMP_CFLAGS}
CONFIGURE_ARGS+=        --enable-multithreading=openmp
.elif ${PORT_OPTIONS:MTHREADS}
CONFIGURE_ARGS+=        --enable-multithreading=pthreads
.elif ${PORT_OPTIONS:MNONE}
CONFIGURE_ARGS+=        --enable-multithreading=no
.endif
--

From https://www.openmp.org/resources/openmp-compilers-tools/
Support for all non-offloading features of OpenMP 4.5 has been available since Clang 3.9. Support for offload constructs that run on the host is available in Clang 7.0.  Support for offloading to GPU devices is available with some limitations is available in Clang 8.0. Support for OpenMP 5.0 is under active development.