[MacPorts] #71165: meson: py-meson: Default FrameworkPath not found when using -std=C++<ver> or std=gnu++<ver>

MacPorts noreply at macports.org
Fri Oct 25 09:24:32 UTC 2024


#71165: meson: py-meson: Default FrameworkPath not found when using -std=C++<ver>
or std=gnu++<ver>
-----------------------------+------------------------
  Reporter:  christophecvr   |      Owner:  reneeotten
      Type:  defect          |     Status:  assigned
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.10.99
Resolution:                  |   Keywords:
      Port:  py-meson meson  |
-----------------------------+------------------------

Comment (by christophecvr):

 Replying to [comment:1 ryandesign]:
 > Are there any MacPorts tickets filed for build failures that are caused
 by this? Can you give those ticket numbers?

 No there are no tickets filled for this issue since it breaks
 (unfortunately) not many builds. This cause meson will in a lot of cases
 ignore modules who can't be build due to a missing thing but well build
 the project in a very degraded result. Or even worse when video elements
 require the sdk or Systems video modules off Macos framework validations
 issue may occur who may brake the package self with segfault11 . That is a
 Apple thing which is even not a real segfault but well ends whit such
 crash reports.

 Lucky that for example the gstreamer1-gst-plugins-bad package (configured
 with all options also the restricted licensed one) build breaks due to not
 find framework path which on it is caused cause meson did not found (the
 present and existing) frameworkpath since option -std=c++11 or
 -std=gnu++11 is required for that package. Thanks to that the reason could
 be found.

 log of what is really happening then : \\

 {{{
 Called: `/opt/local/bin/pkg-config --modversion CoreFoundation` -> 1
 stderr:
 Package CoreFoundation was not found in the pkg-config search path.
 Perhaps you should add the directory containing `CoreFoundation.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'CoreFoundation' found
 -----------
 Finding framework path by running:  /usr/bin/clang++ -v -E - -pipe -Os
 -std=gnu++11 -stdlib=libc++
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch
 x86_64 -I/opt/local/include -L/opt/local/lib -Wno-unused-command-line-
 argument -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

 CMake binary for host machine is cached.
 Preliminary CMake check failed. Aborting.
 Run-time dependency corefoundation found: NO (tried pkgconfig, framework
 and cmake)

 sys/applemedia/meson.build:42:21: ERROR: Dependency "CoreFoundation" not
 found, tried pkgconfig, framework and cmake
 }}}

 Further analyse shows the failed command:


 {{{
 Apple clang version 12.0.0 (clang-1200.0.32.29)
 Target: x86_64-apple-darwin19.6.0
 Thread model: posix
 InstalledDir:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 <whole command ...>
 error: invalid argument '-std=gnu++11' not allowed with 'C'
 }}}

 The clang error can't be silenced or changed to warning only.
 When using other compiler with same command gcc for example it is just a
 warning not a error.

 However every port using meson build system, needing options -std=c++<all>
 will if it still builds build without any linking to a framework. Quit
 possible that there are tickets for those packages with run-time issues
 and then the real cause is very difficult to find.

 If You will analyse it you-self try the build from source of: (configuring
 is already enough to trace)

 gstreamer1-gst-plugins-bad

 with all restricted licensed options enabled. You will see that not any
 framework is found.

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


More information about the macports-tickets mailing list