[MacPorts] #62320: openssh @8.4p1_1+gsskex: error: implicit declaration of function 'auth_get_canonical_hostname' is invalid in C99

MacPorts noreply at macports.org
Sat Feb 20 17:57:15 UTC 2021


#62320: openssh @8.4p1_1+gsskex: error: implicit declaration of function
'auth_get_canonical_hostname' is invalid in C99
----------------------+-----------------------------
  Reporter:  vkuznet  |      Owner:  (none)
      Type:  defect   |     Status:  new
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.6.4
Resolution:           |   Keywords:  catalina bigsur
      Port:  openssh  |
----------------------+-----------------------------

Comment (by vkuznet):

 I tried the following:

 {{{
 # step 1
 cd /tmp
 curl -ksLO https://raw.githubusercontent.com/macports/macports-
 ports/dbf07b3da095588d8578fa663a51807a4e91be89/net/openssh/files/openssh-8.1p1
 -gsskex-all-20141021-mp-20201216.patch

 # step 2, locate port area
 port dir openssh
 cd
 /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/openssh

 # step 3, copy over new patch file
 cp openssh-8.1p1-gsskex-all-20141021-mp-20201216.patch openssh-8.1p1
 -gsskex-all-20141021-mp-20201216.patch.orig
 cp /tmp/openssh-8.1p1-gsskex-all-20141021-mp-20201216.patch .

 # step 4, build port
 sudo port build openssh +gsskex+kerberos5+xauth
 }}}

 The port build fails again with

 {{{
 :info:build /usr/bin/clang -pipe -Os -fPIE
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch
 x86_64 -pipe -Wunknown-warning-option -Qunused-arguments -Wall -Wextra
 -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-
 pointer-memaccess -Wno-pointer-sign -Wno-unused-parameter -Wno-unused-
 result -fno-strict-aliasing -mretpoline -D_FORTIFY_SOURCE=2 -ftrapv -fno-
 builtin-memset -fstack-protector-strong -fPIE   -I. -I.
 -I/opt/local/include -I/opt/local/include -I/opt/local/include
 -DBROKEN_STRNVIS=1 -D__APPLE_SANDBOX_NAMED_EXTERNAL__
 -D__APPLE_API_STRICT_CONFORMANCE -D__APPLE_LAUNCHD__
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
 -I/opt/local/include/editline -I/opt/local/include -I/opt/local/include
 -DSSHDIR=\"/opt/local/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/opt/local/bin/ssh\"
 -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/local/libexec/ssh-askpass\"
 -D_PATH_SFTP_SERVER=\"/opt/local/libexec/sftp-server\"
 -D_PATH_SSH_KEY_SIGN=\"/opt/local/libexec/ssh-keysign\"
 -D_PATH_SSH_PKCS11_HELPER=\"/opt/local/libexec/ssh-pkcs11-helper\"
 -D_PATH_SSH_SK_HELPER=\"/opt/local/libexec/ssh-sk-helper\"
 -D_PATH_SSH_PIDDIR=\"/opt/local/var/run\"
 -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c auth2.c -o
 auth2.o
 :info:build sshconnect2.c:270:23: error: implicit declaration of function
 'auth_get_canonical_hostname' is invalid in C99 [-Werror,-Wimplicit-
 function-declaration]
 :info:build                         gss_host =
 xstrdup(auth_get_canonical_hostname(ssh, 1));
 :info:build                                            ^
 :info:build sshconnect2.c:270:23: warning: incompatible integer to pointer
 conversion passing 'int' to parameter of type 'const char *' [-Wint-
 conversion]
 :info:build                         gss_host =
 xstrdup(auth_get_canonical_hostname(ssh, 1));
 :info:build
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 :info:build ./xmalloc.h:23:27: note: passing argument to parameter here
 :info:build char    *xstrdup(const char *);
 :info:build                              ^
 :info:build sshconnect2.c:841:22: error: implicit declaration of function
 'auth_get_canonical_hostname' is invalid in C99 [-Werror,-Wimplicit-
 function-declaration]
 :info:build                 gss_host =
 xstrdup(auth_get_canonical_hostname(ssh, 1));
 :info:build                                    ^
 :info:build sshconnect2.c:841:22: warning: incompatible integer to pointer
 conversion passing 'int' to parameter of type 'const char *' [-Wint-
 conversion]
 :info:build                 gss_host =
 xstrdup(auth_get_canonical_hostname(ssh, 1));
 :info:build
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 :info:build ./xmalloc.h:23:27: note: passing argument to parameter here
 :info:build char    *xstrdup(const char *);
 :info:build                              ^
 :info:build 2 warnings and 2 errors generated.
 :info:build make: *** [sshconnect2.o] Error 1
 :info:build make: *** Waiting for unfinished jobs....
 :info:build make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_openssh/openssh/work/openssh-8.4p1'
 :info:build Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_openssh/openssh/work/openssh-8.4p1"
 && /usr/bin/make -j4 -w all
 :info:build Exit code: 2
 :error:build Failed to build openssh: command execution failed
 :debug:build Error code: CHILDSTATUS 67878 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_openssh/openssh/main.log
 for details.
 }}}

 Again, I'm new to port build workflow and may easily miss something, so I
 need a little bit of guidance.

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


More information about the macports-tickets mailing list