#67499 closed defect (fixed)

libssh @0.10.4_0+kerberos5+universal: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

Reported by: ashterenli Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libssh

Description (last modified by ryandesign (Ryan Carsten Schmidt))

:debug:main Starting logging for libssh @0.10.4_0+kerberos5+universal
:debug:sysinfo macOS 13.4 (darwin/22.5.0) arch arm
:debug:sysinfo MacPorts 2.8.1
:debug:sysinfo Xcode 14.3, CLT 14.3.0.0.1.1679647830
:debug:sysinfo SDK 13
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 13.0 

I'm actually trying to build x2goclient, which pulls in libssh-0.10.4_0+kerberos5+universal.

libssh build fails with:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libssh/libssh/work/libssh-0.10.4/examples/sshnetcat.c:241:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

I'm not sure if I can remove -Werror with macports.

I'm attaching the full bld log.

Attachments (1)

main.log (340.6 KB) - added by ashterenli 18 months ago.
libssh build log

Download all attachments as: .zip

Change History (6)

Changed 18 months ago by ashterenli

Attachment: main.log added

libssh build log

comment:1 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: set to Ionic
Port: libssh added
Status: newassigned
Summary: libssh-0.10.4_0+kerberos5+universal fails to build: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]libssh @0.10.4_0+kerberos5+universal: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

I'm not sure if I can remove -Werror with macports.

Ports should not use -Werror. However, Xcode 12 and later consider implicit declaration of functions to be an error even without -Werror, and it looks like Xcode 14.3 may have become even more picky about this kind of thing. The code will need to be fixed.

Probably we should try updating the port to 0.10.5 first. The problem may already have been fixed there.

comment:2 in reply to:  1 Changed 18 months ago by jmroot (Joshua Root)

Replying to ryandesign:

However, Xcode 12 and later consider implicit declaration of functions to be an error even without -Werror, and it looks like Xcode 14.3 may have become even more picky about this kind of thing. The code will need to be fixed.

This is indeed because of the same arm64 ABI issues. Declaring a function without information on how many and what types of args it takes is just as bad as not declaring it.

comment:3 Changed 18 months ago by ghosthound

looks like libssh 0.10.5 resolved the implicit declaration problem. PR here: https://github.com/macports/macports-ports/pull/18892

comment:4 Changed 18 months ago by Eric Hall <eric+git@…>

In 9c73cfcc0b0240063f4e628310a596bacc3e4b7f/macports-ports (master):

devel/libssh: revbump to 0.10.5, resolves build error mentioned in #67499

comment:5 Changed 18 months ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.