[MacPorts] #57009: ImageMagick @6.9.9-40_1: inserts -lgomp into pkgconfig files, which breaks build when using clang

MacPorts noreply at macports.org
Thu Sep 12 05:28:21 UTC 2019


#57009: ImageMagick @6.9.9-40_1: inserts -lgomp into pkgconfig files, which breaks
build when using clang
--------------------------+------------------------
  Reporter:  kencu        |      Owner:  ryandesign
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:  ImageMagick  |
--------------------------+------------------------

Comment (by kencu):

 Yes -- just a minor typo. I see it's still in ImageMagick master. No
 wonder `omp` is such a headache in `ImageMagick`! It has never been
 correctly autodetected, it would appear.

 This patch fixes it:
 {{{
 --- configure.ac.old    2019-09-11 21:50:21.000000000 -0700
 +++ configure.ac        2019-09-11 21:50:52.000000000 -0700
 @@ -1413,9 +1413,9 @@
        fi
      fi
      # Clang (passes for GCC but uses different OpenMP implementation)
 -    if test "x$LIB_OMP" = x ; then
 +    if test "x$GOMP_LIBS" = x ; then
        if $CC --version 2>&1 | grep clang > /dev/null ; then
 -        AC_CHECK_LIB(omp,GOMP_parallel_start,LIB_OMP="-lomp",,)
 +        AC_CHECK_LIB(omp,GOMP_parallel_start,GOMP_LIBS="-lomp",,)
        fi
      fi
      # GCC
 }}}
 And then `clang` passes the `-lomp` test (if capable), and `-lomp` gets
 inserted into the default link flags instead of `-lgomp`, as it should be
 for clang:
 {{{
 $ pkg-config ImageMagick --libs --static
 -L/opt/local/lib -lMagickCore-6.Q16 -llcms2 -lfreetype -lfftw3 -lxml2
 -lfontconfig -lfreetype -lXext -lSM -lICE -lX11 -lXt -llzma -lbz2 -lz
 -lltdl -lm -lomp -lm
 }}}
 and, back to the original problem, `virtuoso-7` builds now without any
 ImageMagick library trickery, as it should.

 See: <https://github.com/macports/macports-ports/pull/5257>

-- 
Ticket URL: <https://trac.macports.org/ticket/57009#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list