Changes between Version 12 and Version 13 of WimplicitFunctionDeclaration


Ignore:
Timestamp:
Mar 21, 2024, 8:02:10 PM (6 weeks ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Fix typos and reword some sentences.

Legend:

Unmodified
Added
Removed
Modified
  • WimplicitFunctionDeclaration

    v12 v13  
    2424}}}
    2525
    26 MacPorts displays the same warning message, "Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled", for every port. The following lines summarise each separate indication which MacPorts found. Each indication is of a separate place in the source code which might be using a function name as an "implicit function declaration". The indication gives the function name. It is a clue for investigating the situation. The "implicit function declaration" could potentially cause the port to configure incorrectly, especially on Apple Silicon Macs, or on macOS Big Sur or newer versions.
    27 
    28 In this example, there are three indications. They are related to the functions "strcmp", "exit", and "at_quick_exit".
     26MacPorts displays the same warning message, "Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled", for every port. Each of the following lines gives the name of a function the configure script accessed without declaring it first. It is a clue for investigating the situation. The implicit function declaration could potentially cause the port to configure incorrectly when using Xcode 12 or newer. Each function name will only be listed once even if the configure script accesses that function multiple times.
     27
     28In this example, there are three indications. They are related to the functions `strcmp`, `exit`, and `at_quick_exit`.
    2929
    3030The message "found in freeciv-2.6.6/config.log" gives the final part of the path to the log file which contains the message. This log file is in the port's work directory, which only exists while the port is being built and prepared for installation. Once installation is complete, MacPorts deletes the work directory and the log file. The command `port work `''portname'' tells MacPorts to print out the path to the work directory. Thus, to open the log file in editor, you can use a command combining `port work` and the final part of the path:
     
    7373The -Wimplicit-function-declaration warning could be a serious bug in a port. It is worth reporting such problems. This lets other users of the same port know that the problem is recognised, and it lets port maintainers (and you, if you want) diagnose the problem further, and report it to the upstream developers of the port's source code. So, please consider filing a MacPorts ticket about the problems.
    7474
    75 You have a choice of filing a a separate MacPorts ticket for each indication in the message, or a single ticket for all the indications. Each indication is evidence of a separate problem, which might get fixed or languish independent of the others. But, someone who works on one problem might well work on the others at the same time. And filing a single ticket is less work than filing multiple. Choosing to file a single ticket for all the indications is perfectly fine.
     75You have a choice of filing a separate MacPorts ticket for each indication in the message, or a single ticket for all the indications. Each indication is evidence of a separate problem, which might get fixed or languish independent of the others. But, someone who works on one problem might well work on the others at the same time. And filing a single ticket is less work than filing multiple. Choosing to file a single ticket for all the indications is perfectly fine.
    7676
    7777Follow the instructions for [https://guide.macports.org/#project.tickets filing a MacPorts ticket]. Be sure to check for existing tickets on this port about the -Wimplicit-function-declaration warnings. There is no point in filing a redundant report.
     
    216216== Add names to implicit declaration whitelist ==
    217217
    218 In cases where you have confirmed that a function name is not declared by the include file which should declare it, for a certain macOS SDK, then add that name to whitelists in the MacPorts ports tree. This means that, when the compiler generates a `-Wimplicit-function-declaration` warning for that name, MacPorts will not display that warning in the terminal output. Thus it will not cause concern to MacPorts users who use ports which test for that fucntion name.
     218In cases where you have confirmed that a function name is not declared by the include file which should declare it, for a certain macOS SDK, then add that name to whitelists in the MacPorts ports tree. This means that, when the compiler generates a `-Wimplicit-function-declaration` warning for that name, MacPorts will not display that warning in the terminal output. Thus it will not cause concern to MacPorts users who use ports which test for that function name.
    219219
    220220The whitelists are [browser:macports-ports/_resources/port1.0/checks/implicit_function_declaration in the ports tree]. There is a separate whitelist for each version of the macOS SDK: Mac OS X 10.5, macOS 10.14, macOS 11, etc. Each whitelist is a text file containing a list of C language function names, one per line, in lexical order.
     
    288288=== MacPorts code ===
    289289
    290 Want to learn how a feature really works? As the wise teachers say, "Read the source, Luke."  Here are links to MacPorts source code which relates to the -Wimplicit-function-declaration warning.
    291 
    292   * [https://github.com/macports/macports-base/blob/13b4fc42766bfb15fe6aa7b8e5aa1364dc632158/src/port1.0/portconfigure.tcl#L1785-L1835 portconfigure.tcl#L1785-L1835], where the `port` base code reads the whitelist and issues the -Wimplicit-function-declaration warning.
     290Here are links to MacPorts source code which relates to the -Wimplicit-function-declaration warning.
     291
     292  * [https://github.com/macports/macports-base/blob/77505416e4dd1d695677de49c5d25c331bf2075f/src/port1.0/portconfigure.tcl#L1905-L1947 portconfigure.tcl#L1905-L1947], where the `port` base code reads the whitelist and issues the -Wimplicit-function-declaration warning.