bugGNU Networking Utilities - Bugs: bug #65093, inetutils 2.5 osx build failure

 
 

bug #65093: inetutils 2.5 osx build failure

Submitter:  Rui Chen <chenrui>
Submitted:  Fri 29 Dec 2023 11:03:38 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jas
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 30 Dec 2023 11:06:41 AM UTC, comment #4: 

Thanks for debugging!

Most likely some gnulib change caused new header files to be included on macOS which triggered the type conflict.

I believe the underlying reason is that libinetutils provides our own version of ttymsg() and instead of trying to fix it to use the same prototype as macOS ttymsg, I made the namespace difference explicit instead:

https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e158f9c70dbf0f8d2e09e4aa8e4ef73989c8b529

This all begs the question if we still need to replace ttymsg() or if system ttymsg() are working properly these days, but I chose to not go down into that rabbit hole.  The reason for our variant seems we want a double fork version of ttymsg, but manpages I read about ttymsg doesn't talk about that so I'm not sure anything is guaranteed.

Btw, to avoid future regressions on macOS (which, after GNU platforms, is probably the most important target these days), I have added a GitLab CI/CD job for macOS 12/13/14, and it now appears to build fine:

https://gitlab.com/gsasl/inetutils/-/pipelines/1122893784

/Simon

Simon Josefsson <jas>
Group administrator
Sat 30 Dec 2023 05:21:02 AM UTC, comment #3: 


> Did version 2.4 work?


Just tried locally on a macOS 14.2.1 (Darwin 23.2.0) machine (arm64). 2.4 compiles successfully from source while 2.5 does not.

I can confirm via bisect that the reported error started occurring with the introduction of 6947e2dc5d8a9bff694f8ec646cc6bef2ca74153, the gnulib update.

Caleb Xu <alebcay>
Sat 30 Dec 2023 04:46:45 AM UTC, comment #2: 

Hi Simon, this is the working patch

```
diff --git a/src/syslogd.c b/src/syslogd.c
index 918686d..dd8c359 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -278,7 +278,9 @@ void logerror (const char *);
 void logmsg (int, const char , const char , int);
 void printline (const char , const char );
 void printsys (const char *);
+#if !__APPLE__
 char ttymsg (struct iovec , int, char *, int);
+#endif
 void wallmsg (struct filed , struct iovec );
 char *crunch_list (char *oldlist, char *list);
 char *textpri (int pri);
```

Rui Chen <chenrui>
Sat 30 Dec 2023 12:58:16 AM UTC, comment #1: 

Thank you for the report!  Did version 2.4 work?  Maybe this is caused by gnulib changes.

I will try to include macOS in my GitLab CI/CD pipeline to make sure it is building properly.

Simon Josefsson <jas>
Group administrator
Fri 29 Dec 2023 11:03:38 PM UTC, original submission:  

???? trying to build the latest release, but run into some build issue. The error log is as below:


<details>
<summary>error build log</summary>

```
syslogd.c:281:7: error: conflicting types for 'ttymsg'
char ttymsg (struct iovec , int, char *, int);
      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/util.h:103:9: note: previous declaration is here
char   ttymsg(struct iovec , int, const char *, int);
        ^
1 error generated.
```

</details>

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/7359904454/job/20035380331
relates to https://github.com/Homebrew/homebrew-core/pull/158525

Rui Chen <chenrui>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by alebcay (Posted a comment)
  • -email is unavailable- added by jas (Posted a comment)
  • -email is unavailable- added by chenrui (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-30 jas StatusNone Fixed
        Assigned toNone jas
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code