[MacPorts] #69905: gpsd @3.25_0+python312 build failure due to int conversion error

MacPorts noreply at macports.org
Sun May 5 17:42:38 UTC 2024


#69905: gpsd @3.25_0+python312 build failure due to int conversion error
---------------------+-----------------------
  Reporter:  M-Rick  |      Owner:  michaelld
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.9.3
Resolution:          |   Keywords:
      Port:  gpsd    |
---------------------+-----------------------

Comment (by ryandesign):

 From the gpsd config.log on my macOS 12 system when using the newer
 MacPorts clang 18:

 {{{
 scons: Configure: Checking if strerror_r() returns int...
 .sconf_temp/conftest_1d61eab1ffed995e90ff3652a575a466_0.c <-
   |
   |        #define _GNU_SOURCE
   |
   |        #include <stddef.h>
   |        #include <string.h>
   |
   |        int main() {
   |            char buf[100];
   |            int ret;
   |
   |            ret = strerror_r(24, buf, sizeof(buf));
   |            return ret;
   |        }
   |
 /opt/local/bin/clang-mp-18 -arch x86_64 -o
 .sconf_temp/conftest_1d61eab1ffed995e90ff3652a575a466_0_75cb1c7629a9486be0851ef046169149.o
 -c -Werror -Os -stdlib=libc++ -O2
 .sconf_temp/conftest_1d61eab1ffed995e90ff3652a575a466_0.c
 clang: error: argument unused during compilation: '-stdlib=libc++'
 [-Werror,-Wunused-command-line-argument]
 scons: Configure: no
 }}}

 Certainly `-stdlib=libc++` should not be passed to a C compiler.

 I initially thought the problem was going to be the `main` function
 prototype missing the arguments. Even though that doesn't appear to have
 been the problem, fixing the function declaration (`int main(void)`) is a
 good idea.

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


More information about the macports-tickets mailing list