Bug 248609 - math/libflame: line 54: Malformed conditional (${CHOSEN_COMPILER_TYPE} == clang)
Summary: math/libflame: line 54: Malformed conditional (${CHOSEN_COMPILER_TYPE} == clang)
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Johannes M Dieterich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-11 21:10 UTC by Gian-Simon Purkert
Modified: 2021-02-01 10:32 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (jmd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.