Opened 3 years ago

Closed 3 years ago

#64031 closed defect (fixed)

Can't compile vtk-m: OpenMP_CXX error

Reported by: Pippetta87 Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: chrstphrchvz (Christopher Chavez), Pippetta87
Port: vtk-m

Description

Hi, cant compile vtk-m (+native+openmp+tbb) due error reported below.

:info:configure -- Detecting CXX compile features - done
:info:configure -- Found Git: /opt/local/bin/git (found version "2.33.1") 
:info:configure -- Could not use git to determine source version, using version 1.6.0
:info:configure CMake Error at /opt/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
:info:configure   Could NOT find OpenMP_CXX: Found unsuitable version "3.1", but required is
:info:configure   at least "4.0" (found -fopenmp=libomp)
:info:configure Call Stack (most recent call first):
:info:configure   /opt/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)
:info:configure   /opt/local/share/cmake-3.21/Modules/FindOpenMP.cmake:544 (find_package_handle_standard_args)
:info:configure   CMake/VTKmDeviceAdapters.cmake:82 (find_package)
:info:configure   CMake/VTKmWrappers.cmake:14 (include)
:info:configure   CMakeLists.txt:179 (include)
:info:configure -- Configuring incomplete, errors occurred!

Same problem with macos 10.15.5 and 12.0.

Let me know if more info needed.

Attachments (1)

main.log (85.7 KB) - added by Pippetta87 3 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 years ago by Pippetta87

Port: vtk-m added

comment:2 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Please assign this ticket to the maintainer (reneeotten).

Posting main.log may help.

comment:3 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

Changed 3 years ago by Pippetta87

Attachment: main.log added

comment:4 Changed 3 years ago by Pippetta87

Cc: Pippetta87 added
Owner: set to reneeotten
Status: newassigned

comment:5 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

https://github.com/macports/macports-ports/pull/13082

See https://stackoverflow.com/a/58855440/4896937#comment104139661_58855440: although OpenMP 4.5 support exists in Clang < 10, a flag like -fopenmp-version=45 has to be specified, otherwise an earlier version is used by default (OpenMP 3.1 for Clang 3.9 through 9.0).

(TODO: check for other ports using compiler.openmp_version which are affected by this)

comment:6 Changed 3 years ago by reneeotten (Renee Otten)

Christopher: I started looking at this stuff already and would appreciate it you would either give me a heads-up that you want to take care of this so that I don't need to spend my time on it, or otherwise give me the opportunity to actually do something about it... Thanks for the PR though and I will take a look at it when I have the time to do so.

comment:7 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: assignedclosed

In ba5d233c962be9b42b44314f4ba5a012b240e53a/macports-ports (master):

vtk-m: fix +openmp build

Clang < 10 require -fopenmp-version for OpenMP > 3.1

Add missing linker flags

Fixes: #64031

Note: See TracTickets for help on using tickets.