Opened 13 days ago

Last modified 13 days ago

#69905 assigned defect

gpsd @3.25_0+python312 build failure due to int conversion error

Reported by: M-Rick Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: fhgwright (Fred Wright)
Port: gpsd

Description

I tried to build GPSD but it's uncorking.

First I tried using the +universal variant and discovered it didn't existed with this variant.

Then and tried again from a fresh install no variant, it's suing the default arm64 variant in my case. Didn't work neither, not with x86_64…

Log file joined.

Attachments (1)

main.log (265.2 KB) - added by M-Rick 13 days ago.

Download all attachments as: .zip

Change History (6)

Changed 13 days ago by M-Rick

Attachment: main.log added

comment:1 Changed 13 days ago by jmroot (Joshua Root)

Cc: fhgwright added
Keywords: gpsd removed
Owner: set to michaelld
Status: newassigned
Summary: Can't build GPSDgpsd @3.25_0+python312 build failure due to int conversion error
:info:build gpsd-3.25/gpsd/ppsthread.c:162:12: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const char *' [-Wint-conversion]
:info:build     return strerror_r(errnum, buf, len);
:info:build            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

comment:2 Changed 13 days ago by jmroot (Joshua Root)

Looks like it's because this configure check gets an incorrect result.

:info:build Checking if strerror_r() returns int... no

comment:3 Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

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.

comment:4 Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

I've reported it to gpsd here but it's also a scons bug which I've reported to them here and will apply that fix to the scons port.

comment:5 Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

[696195e54d2a1528691e8c151785c9cf3f48ad4e/macports-ports] should have fixed it. Wait another 30 minutes, then sudo port clean gpsd and sudo port selfupdate and then try again.

Note: See TracTickets for help on using tickets.