Opened 16 months ago

Last modified 9 months ago

#66601 assigned defect

kerberos5 @1.20.1 build failure: error: implicit declaration of function 'explicit_bzero'

Reported by: fxt44 (fxt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: artkiver (グレェ)
Port: kerberos5 libressl

Description (last modified by jmroot (Joshua Root))

--->  Building kerberos5
Error: Failed to build kerberos5: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/main.log for details.
Error: rev-upgrade failed: Error rebuilding kerberos5

Attachments (1)

main.log (64.6 KB) - added by fxt44 (fxt) 16 months ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/main.log

Download all attachments as: .zip

Change History (9)

Changed 16 months ago by fxt44 (fxt)

Attachment: main.log added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/main.log

comment:1 Changed 16 months ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: set to ryandesign
Status: newassigned
Summary: kerberos5 build failurekerberos5 @1.20.1 build failure: error: implicit declaration of function 'explicit_bzero'

comment:2 Changed 16 months ago by ryandesign (Ryan Carsten Schmidt)

We have had another report of this error in https://github.com/macports/macports-ports/pull/16927#issuecomment-1344734384. There, the user was using libressl instead of openssl. Is that the case for you as well?

comment:3 Changed 16 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: artkiver added
Port: libressl added

When I configure kerberos5 @1.20.1 on my macOS 12 system (with openssl) I get:

checking for explicit_bzero... no

but your log and artkiver's log both show:

:info:configure checking for explicit_bzero... yes

I believe this is a libressl bug which is filed here:

https://github.com/libressl-portable/portable/issues/647

Last edited 16 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 in reply to:  2 Changed 16 months ago by fxt44 (fxt)

Replying to ryandesign:

We have had another report of this error in https://github.com/macports/macports-ports/pull/16927#issuecomment-1344734384. There, the user was using libressl instead of openssl. Is that the case for you as well?

yes, i am also using libressl.

comment:5 Changed 15 months ago by Zweihorn (@Zweihorn)

Tried 'port install kerberos5' on platform

  • macOS 11.7.2 20G1020 x86_64
  • Command Line Tools 13.2.0.0.1.1638488800

and found this:

% port installed | grep ssl
  curl @7.87.0_0+http2+ssl (active)
  libressl @3.6.1_0 (active)
  openssl11 @1.1.1s_0 (active)


% sudo port install kerberos5
. . .
k5buf.c:94:9: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        zap(buf->data, buf->len);
        ^
../../include/k5-platform.h:1028:24: note: expanded from macro 'zap'
# define zap(ptr, len) explicit_bzero(ptr, len)
                       ^
k5buf.c:107:9: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        zap(buf->data, buf->len);
        ^
../../include/k5-platform.h:1028:24: note: expanded from macro 'zap'
# define zap(ptr, len) explicit_bzero(ptr, len)
                       ^
k5buf.c:222:9: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        zap(tmp, strlen(tmp));
        ^
../../include/k5-platform.h:1028:24: note: expanded from macro 'zap'
# define zap(ptr, len) explicit_bzero(ptr, len)
                       ^
k5buf.c:269:9: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        zap(buf->data, buf->len);
        ^
../../include/k5-platform.h:1028:24: note: expanded from macro 'zap'
# define zap(ptr, len) explicit_bzero(ptr, len)
                       ^
4 errors generated.
make[2]: *** [k5buf.so] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/macports-test/var/macports/build/_opt_macports-test_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/work/krb5-1.20.1/src/util/support'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/opt/macports-test/var/macports/build/_opt_macports-test_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/work/krb5-1.20.1/src/util'
make: *** [all-recurse] Error 1
make: Leaving directory `/opt/macports-test/var/macports/build/_opt_macports-test_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/work/krb5-1.20.1/src'
Command failed:  cd "/opt/macports-test/var/macports/build/_opt_macports-test_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/work/krb5-1.20.1/src" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build kerberos5: command execution failed
DEBUG: Error code: CHILDSTATUS 99797 2
DEBUG: Backtrace: command execution failed
DEBUG:     while executing
DEBUG: "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
DEBUG:     invoked from within
DEBUG: "command_exec -callback portprogress::target_progress_callback build"
DEBUG:     (procedure "portbuild::build_main" line 8)
DEBUG:     invoked from within
DEBUG: "$procedure $targetname"
Error: See /opt/macports-test/var/macports/logs/_opt_macports-test_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_kerberos5/kerberos5/main.log for details.

comment:6 Changed 15 months ago by Zweihorn (@Zweihorn)

BTW:

Why was MacPorts starting to install 'openssl3' and 'openssl11' concurrently to an already installed 'libressl' anyway?

AFAIK this behaviour started months ago. Maybe MacPorts 2.8.0 but IMO could be earlier.

Raised a new ticket as #66740

Last edited 15 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 in reply to:  6 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to Zweihorn:

k5buf.c:94:9: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

Right. That's why this ticket is open. When the issue is corrected, the ticket will be closed. You can Cc yourself if you would like to be notified when that happens.

Replying to Zweihorn:

Why was MacPorts starting to install 'openssl3' and 'openssl11' concurrently to an already installed 'libressl' anyway?

Off-topic in this ticket.

comment:8 Changed 9 months ago by Zweihorn (@Zweihorn)

kerberos5 @1.21.1 can be built with LibreSSL again, if we can provide "explicit_bzero", see my PR 19799 at GitHub (1). However, this requires the new port 'libbsd' and we would use subport 'libbsd-devel' (2) until a new version from upstream is available.

  1. https://github.com/macports/macports-ports/pull/19799
  2. https://github.com/macports/macports-ports/pull/19785

A "port install kerberos5 +libressl" should suffice and was tested as described in a.m. PR.

Please note the statement in the Portfile implicitly using 'pkgconfig' output and I would welcome if anybody would know a more elegant solution.

 configure.optflags-append   -DLIBBSD_OVERLAY -isystem ${prefix}/include/bsd -L${prefix}/lib -lbsd

Hope this helps. Feel free.

Note: See TracTickets for help on using tickets.