Bug 202782 - security/krb5: fails to build with readline
Summary: security/krb5: fails to build with readline
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-30 21:54 UTC by Andrey Cherkashin
Modified: 2015-10-08 15:05 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Cherkashin 2015-08-30 21:54:54 UTC
Port lists libreadline dependency as an executable and fails to build because of that.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2015-08-31 01:31:38 UTC
Can you post output please?
Comment 2 Andrey Cherkashin 2015-08-31 01:33:21 UTC
(In reply to Cy Schubert from comment #1)
https://gist.github.com/andoriyu/6a87108a9e583bbeba47

Someone in #bsdports suggested that whole section about readline should be replaces with USES= readline.

This is 11-CURRENT by the way.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-08-31 07:18:38 UTC
A commit references this bug:

Author: cy
Date: Mon Aug 31 07:18:24 UTC 2015
New revision: 395651
URL: https://svnweb.freebsd.org/changeset/ports/395651

Log:
  Fix build under 11-CURRENT. r378417 introduced a libreadline link
  workaround due to libtool not working with 11-CURRENT at the time.
  The workaround now causes grief under 11-CURRENT and needs to be
  removed.

  PR:		202782

Changes:
  head/security/krb5/Makefile
  head/security/krb5-112/Makefile
Comment 4 Matthew Rezny freebsd_committer freebsd_triage 2015-08-31 11:02:03 UTC
That last commit causes a build failure on 10-STABLE with this error:

In file included from ss_wrapper.c:30:
In file included from ./kadmin.h:60:
../../include/kdb.h:366:73: error: unknown type name 'time_t'
krb5_error_code krb5_db_get_age ( krb5_context kcontext, char *db_name, time_t *t );
                                                                        ^
../../include/kdb.h:903:32: error: unknown type name 'time_t'
                               time_t *age);
                               ^
2 errors generated.


This addition appears to be the culprit:
CONFIGURE_ARGS+=        --disable-thread-support
Comment 5 elofu17 2015-08-31 15:43:29 UTC
I have two build-jails (using poudriere). Both failed today when building all my ports.

I have no options file for krb5, so it's using the defaults.


End of my logfile:

cc -DHAVE_CONFIG_H  -I../../include -I../../include -I. -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/usr/local/include -I/usr/include -O2 -fstack-protector -fno-strict-aliasing -std=gnu99 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -pedantic -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Wnewline-eof -Werror=uninitialized -Werror=pointer-arith -Werror=declaration-after-statement -Werror-implicit-function-declaration  -c ss_wrapper.c
In file included from kadmin.h:60,
                 from ss_wrapper.c:30:
../../include/kdb.h:366: error: expected declaration specifiers or '...' before 'time_t'
../../include/kdb.h:903: error: expected declaration specifiers or '...' before 'time_t'
Makefile:476: recipe for target 'ss_wrapper.o' failed
gmake[2]: *** [ss_wrapper.o] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/security/krb5/work/krb5-1.13.2/src/kadmin/cli'
Makefile:818: recipe for target 'all-recurse' failed
gmake[1]: *** [all-recurse] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/security/krb5/work/krb5-1.13.2/src/kadmin'
Makefile:1526: recipe for target 'all-recurse' failed
gmake: *** [all-recurse] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/security/krb5.
====>> Cleaning up wrkdir
===>  Cleaning for krb5-1.13.2_3
build of security/krb5 ended at Mon Aug 31 15:23:32 CEST 2015
build time: 00:01:39
!!! build failure encountered !!!
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2015-09-01 04:41:49 UTC
This is unrelated but has been fixed.
Comment 7 John Hein 2015-09-01 13:20:08 UTC
I think you need to use .include <bsd.port.options.mk> ... .include <bsd.port.mk> instead of bsd.port.pre.mk / post.mk.

Otherwise, USES+=readline:ports is set to late and Uses/readline.mk is not included.  'make -V LIB_DEPENDS WITH=READLINE' does not include the devel/readline in the list of dependencies.  Maybe that's why the earlier hack avoided using USES on 11.x (maybe it wasn't an 11.x problem).

Sorry to hijack the bug, but I just happened to be here after investigating the time_t compile bug.  I'll open a new bug if needed.
Comment 8 John Hein 2015-10-08 15:05:08 UTC
Re: comment 7 hijacking, see bug 203639.