Opened 8 weeks ago

Last modified 8 weeks ago

#64040 assigned enhancement

vtk-m: upstream issues prevent using Xcode clang for +openmp variant

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

Description

I am creating this ticket mainly to inform the port maintainer and anyone else who is curious. It may not require much (if any) action on MacPorts’ end.

I am interested in compiler.openmp_version allowing use of Xcode clang: https://github.com/macports/macports-base/pull/247. To get an idea of what issues a port may run into, I tried vtk-m +openmp as an example (after applying changes proposed in https://github.com/macports/macports-ports/pull/13082 and https://github.com/macports/macports-ports/pull/13093#issuecomment-976190084).

I believe I have identified a couple of issues in how VTK-m configures with OpenMP support. I would like to report and suggest fixes for them upstream.

  1. VTK-m does not use the OpenMP_CXX_INCLUDE_DIRS variable. This causes omp.h to not be found during build, even though the OpenMP_CXX_INCLUDE_DIR variable was specified (as a configure argument -DOpenMP_CXX_INCLUDE_DIR=${prefix}/include/libomp)
  1. VTK-m uses the space-separated OpenMP_CXX_FLAGS variable without converting it to a semicolon-separated list before appending it to the desired target property. This causes -Xclang -fopenmp to be treated as a single command line argument rather than two arguments, leading to warnings during build:
    clang: warning: argument unused during compilation: '-Xclang -fopenmp' [-Wunused-command-line-argument]
    

I will attach a brief patch here containing possible fixes for these two issues.

Attachments (1)

xcode-openmp.patch (1.4 KB) - added by chrstphrchvz (Christopher Chavez) 8 weeks ago.

Download all attachments as: .zip

Change History (2)

Changed 8 weeks ago by chrstphrchvz (Christopher Chavez)

Attachment: xcode-openmp.patch added

comment:1 Changed 8 weeks ago by chrstphrchvz (Christopher Chavez)

Note: See TracTickets for help on using tickets.