Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#59921 closed defect (fixed)

shellinabox @2.20: error: static declaration of 'ptsname_r' follows non-static declaration

Reported by: valorisa Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: highsierra Cc:
Port: shellinabox

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

sudo port -vvv install shellinabox or sudo port -vvv selfupdate && sudo port -vvv upgrade outdated

give same error

shellinabox/launcher.c:819:11: note: enclose 'ptsname_r' in a __builtin_available check to silence this warning
      if (ptsname_r (*pty, path, length)) {
          ^~~~~~~~~
1 warning and 1 error generated.
make[1]: *** [shellinabox/launcher.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-2.20" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build shellinabox: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port shellinabox failed

main.log

:info:build     ^
:info:build shellinabox/launcher.c:819:11: warning: 'ptsname_r' is only available on macOS 10.13.4 or newer [-Wunguarded-availability-new]
:info:build       if (ptsname_r (*pty, path, length)) {
:info:build           ^~~~~~~~~
:info:build /usr/include/stdlib.h:229:5: note: 'ptsname_r' has been explicitly marked partial here
:info:build int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3));
:info:build     ^
:info:build shellinabox/launcher.c:819:11: note: enclose 'ptsname_r' in a __builtin_available check to silence this warning
:info:build       if (ptsname_r (*pty, path, length)) {
:info:build           ^~~~~~~~~
:info:build 1 warning and 1 error generated.
:info:build make[1]: *** [shellinabox/launcher.o] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-2.20" && /usr/bin/make -j4 -w all 
:info:build Exit code: 2
:error:build Failed to build shellinabox: command execution failed
:debug:build Error code: CHILDSTATUS 2761 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/main.log for details.

Attachments (1)

main.log (145.4 KB) - added by valorisa 5 years ago.
main.log

Download all attachments as: .zip

Change History (29)

comment:1 Changed 5 years ago by valorisa

Cc: valorisa added

comment:2 Changed 5 years ago by valorisa

Cc: valorisa removed

comment:3 Changed 5 years ago by valorisa

Summary: Error: Failed to build shellinabox: command execution failedError: Failed to build shellinabox: command execution failed on High Sierra

comment:4 Changed 5 years ago by valorisa

sudo port -vvv selfupdate && sudo port -vvvv upgrade outdated

gives same error

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 5 years ago by valorisa

Attachment: main.log added

main.log

comment:5 Changed 5 years ago by valorisa

Cc: valorisa added

comment:6 Changed 5 years ago by valorisa

Cc: valorisa removed

comment:7 Changed 5 years ago by valorisa

Owner: set to ryandesign
Status: newassigned

comment:8 Changed 5 years ago by valorisa

Cc: valorisa added

comment:9 Changed 5 years ago by valorisa

Cc: valorisa removed

comment:10 Changed 5 years ago by valorisa

Cc: valorisa added

comment:11 Changed 5 years ago by valorisa

Cc: valorisa removed

comment:12 in reply to:  description Changed 5 years ago by valorisa

Replying to valorisa:

sudo port -vvv install shellinabox or sudo port -vvv selfupdate && sudo port -vvv upgrade outdated

give same error

shellinabox/launcher.c:819:11: note: enclose 'ptsname_r' in a __builtin_available check to silence this warning
      if (ptsname_r (*pty, path, length)) {
          ^~~~~~~~~
1 warning and 1 error generated.
make[1]: *** [shellinabox/launcher.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-2.20" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build shellinabox: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port shellinabox failed

main.log

:info:build     ^
:info:build shellinabox/launcher.c:819:11: warning: 'ptsname_r' is only available on macOS 10.13.4 or newer [-Wunguarded-availability-new]
:info:build       if (ptsname_r (*pty, path, length)) {
:info:build           ^~~~~~~~~
:info:build /usr/include/stdlib.h:229:5: note: 'ptsname_r' has been explicitly marked partial here
:info:build int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3));
:info:build     ^
:info:build shellinabox/launcher.c:819:11: note: enclose 'ptsname_r' in a __builtin_available check to silence this warning
:info:build       if (ptsname_r (*pty, path, length)) {
:info:build           ^~~~~~~~~
:info:build 1 warning and 1 error generated.
:info:build make[1]: *** [shellinabox/launcher.o] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-shellinabox-e45d8f2'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/work/shellinabox-2.20" && /usr/bin/make -j4 -w all 
:info:build Exit code: 2
:error:build Failed to build shellinabox: command execution failed
:debug:build Error code: CHILDSTATUS 2761 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_shellinabox/shellinabox/main.log for details.
Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:13 Changed 5 years ago by valorisa

Description: modified (diff)

comment:14 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: shellinabox removed
Summary: Error: Failed to build shellinabox: command execution failed on High Sierrashellinabox @2.20: error: static declaration of 'ptsname_r' follows non-static declaration

The actual error in the log is:

:info:build shellinabox/launcher.c:772:12: error: static declaration of 'ptsname_r' follows non-static declaration

This doesn't sound like an issue that is specific to MacPorts, so it should probably be reported to the developers of shellinabox at https://github.com/shellinabox/shellinabox/issues.

comment:15 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: highsierra added

Interestingly, the problem only occurs on macOS High Sierra. The problem does not occur on earlier or later versions of macOS.

comment:16 in reply to:  description Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to valorisa:

:info:build shellinabox/launcher.c:819:11: warning: 'ptsname_r' is only available on macOS 10.13.4 or newer [-Wunguarded-availability-new]

Which version of High Sierra are you running?

comment:17 Changed 5 years ago by kencu (Ken)

The replacement function is guarded, but obviously the guard is not being set properly -- possibly due to the unguarded availability warning?

#if !defined(HAVE_PTSNAME_R)
static int ptsname_r(int fd, char *buf, size_t buflen) {

comment:18 Changed 5 years ago by kencu (Ken)

Yes, looks like the warning makes the configure test fail.

One way to fix it is by disabling that warning, eg:

platform darwin 17 {
    configure.cppflags-append -Wno-unguarded-availability-new
}
$ port -v installed shellinabox
The following ports are currently installed:
  shellinabox @2.20_1 (active) platform='darwin 17' archs='x86_64' date='2020-01-07T09:05:07-0800'

comment:19 Changed 5 years ago by valorisa

High Sierra 10.13.6

comment:20 Changed 5 years ago by valorisa

shellinabox @2.20_0 (active) platform='darwin 17' archs='x86_64' date='2017-10-02T20:46:47+0200'

Last edited 5 years ago by valorisa (previous) (diff)

comment:22 in reply to:  14 Changed 5 years ago by valorisa

Replying to ryandesign:

The actual error in the log is:

:info:build shellinabox/launcher.c:772:12: error: static declaration of 'ptsname_r' follows non-static declaration

This doesn't sound like an issue that is specific to MacPorts, so it should probably be reported to the developers of shellinabox at https://github.com/shellinabox/shellinabox/issues.

When can we expect a bug fix please ?

comment:23 Changed 5 years ago by kencu (Ken)

Ryan knows we can fix it locally like this:

platform darwin 17 {
    configure.cppflags-append -Wno-unguarded-availability-new
}

while we wait for whatever upstream might care to do about it.

Feel free to do that yourself in the meantime if you want to.

comment:24 Changed 5 years ago by valorisa

I am not a coder but I want to do it myself

comment:25 Changed 5 years ago by valorisa

How to ?

comment:26 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 04f00439cc0339036d9d49c29f4160812f22d023/macports-ports (master):

shellinabox: Fix build on macOS 10.13

Closes: #59921

comment:27 Changed 5 years ago by valorisa

Thanks for the resolution

comment:28 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

In 04f00439cc0339036d9d49c29f4160812f22d023/macports-ports (dar, master, py38-reproject, revert-6945-rust-1.43.0, wireshark):

shellinabox: Fix build on macOS 10.13

Closes: #59921

Note: See TracTickets for help on using tickets.