[MacPorts] #61316: poppler doesn't use MacPorts flags on 10.10 and earlier

MacPorts noreply at macports.org
Wed Oct 14 10:05:46 UTC 2020


#61316: poppler doesn't use MacPorts flags on 10.10 and earlier
------------------------+----------------------
 Reporter:  ryandesign  |      Owner:  dbevans
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.3
 Keywords:              |       Port:  poppler
------------------------+----------------------
 poppler does not use the MacPorts-specified flags on 10.10 and earlier. On
 some systems, like 10.5, this causes a build failure. This was
 [https://lists.macports.org/pipermail/macports-
 users/2020-October/048893.html discussed on the mailing list] but I'll
 file a ticket so you can track the fix properly.

 For example, here's the log of the build on 10.10 (with MacPorts clang)
 showing that MacPorts flags like `-Os` are being set by MacPorts but are
 not being used by the build.

 https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/122524/steps
 /install-port/logs/stdio

 But here's the build on 10.11 (with Xcode clang) showing the flags being
 used:

 https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/120909/steps
 /install-port/logs/stdio

 In
 [https://github.com/freedesktop/poppler/blob/master/cmake/modules/PopplerMacros.cmake#L148
 cmake/modules/PopplerMacros.cmake] there is a block that takes effect only
 `if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")` (which would only be
 when the compiler is MacPorts clang, not Xcode clang). If I change
 `STREQUAL` to `MATCHES` then the problem affects Xcode clang as well. A
 patch should be added to make this change so that everyone gets the same
 flags. This change should be sent upstream for inclusion in their code.

 The
 [https://github.com/freedesktop/poppler/commit/d03f5ab76b0d0dee199b65fc801236a38830b5fc
 last change to this code block] claims to preserve user-supplied flags,
 but only implements this for standard cmake build types like "Debug",
 "Release", "RelWithDebInfo", etc. The cmake 1.1 portgroup defaults to the
 nonstandard build type "MacPorts" (I do not know why it does this) hence
 flags are not preserved. The fix would be to have the portfile set
 `cmake.build_type Release`. Since this will change the flags the port
 builds with on some systems (for example adding an optimization flag where
 previously there was none) the port's revision should be increased when
 making this change, or combine it with a version update.

 P.S: The line `configure.cxxflags-append -std=c++14` could be removed from
 the portfile since the build system now adds this automatically. The line
 `compiler.c_standard 1999` could be added. The lines `PortGroup
 compiler_blacklist_versions 1.0` and `compiler.blacklist-append {clang <
 800.0.38}` could be replaced by the line `compiler.thread_local_storage
 yes`.

-- 
Ticket URL: <https://trac.macports.org/ticket/61316>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list