Bug 196848 - devel/libedit fails to compile due to a script transforming input into VI_]ERO instead of VI_ZERO when creating ${WRKSRC}/src/fcns.h during the configure step
Summary: devel/libedit fails to compile due to a script transforming input into VI_]ER...
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: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-18 19:53 UTC by Trond Endrestøl
Modified: 2015-01-19 07:50 UTC (History)
0 users

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


Attachments
config.log from a VM running amd64 base/head r277322 (106.83 KB, text/plain)
2015-01-18 20:43 UTC, Trond Endrestøl
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2015-01-18 19:53:22 UTC
Some rather strange things are taking place while compiling devel/libedit.
I have tracked the issue down to the makelist script while it's creating ${WRKSRC}/src/fcns.h during the configure step. This has occured on amd64 of both base/head and base/stable/10 within the last couple of days. My ports tree is currently at r377334.

I guess the issue can be remedied using in-place sed during post-configure or pre-build, but I figure the scripts, makelist in particular, should be analyzed in more detail and the problem solved there.

Maybe this port really requires GNU awk, and not the awk found in base.

Manually editing ${WRKSRC}/src/fcns.h, replacing VI_]ERO with VI_ZERO solves the problem.

See below for more hints.

--- chared.lo ---
In file included from chared.c:48:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
--- common.lo ---
In file included from common.c:47:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
--- el.lo ---
In file included from el.c:59:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
--- emacs.lo ---
In file included from emacs.c:47:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
1 warning generated.
--- el.lo ---
1 warning generated.
--- common.lo ---
1 warning generated.
--- chared.lo ---
1 warning generated.
--- hist.lo ---
  CC       hist.lo
--- keymacro.lo ---
  CC       keymacro.lo
--- hist.lo ---
In file included from hist.c:48:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
--- map.lo ---
  CC       map.lo
--- chartype.lo ---
--- keymacro.lo ---
In file included from keymacro.c:69:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
--- chartype.lo ---
CC       chartype.lo
--- hist.lo ---
1 warning generated.
--- map.lo ---
In file included from map.c:48:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
map.c:676:12: error: use of undeclared identifier 'VI_ZERO'
        /*  48 */       VI_ZERO,                /* 0 */
                        ^
1 warning and 1 error generated.
*** [map.lo] Error code 1

make[4]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1/src
--- chartype.lo ---
In file included from chartype.c:43:
In file included from ./el.h:106:
In file included from ./chared.h:146:
./fcns.h:105:12: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define VI_]ERO                         101
           ^
--- keymacro.lo ---
1 warning generated.
--- chartype.lo ---
1 warning generated.
1 error

make[4]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1/src
*** [all] Error code 2

make[3]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1/src
1 error

make[3]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1/src
*** [all-recursive] Error code 1

make[2]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1
1 error

make[2]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1
*** [all] Error code 2

make[1]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1
1 error

make[1]: stopped in /usr/ports/workdirs/usr/ports/devel/libedit/work/libedit-20141029-3.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/libedit
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-18 19:53:22 UTC
Auto-assigned to maintainer bapt@FreeBSD.org
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2015-01-18 20:20:15 UTC
Can I see the config.log?

I cannot reproduce and I use the base awk, and I also tried with gnu awk installed
Comment 3 Trond Endrestøl 2015-01-18 20:43:59 UTC
Created attachment 151811 [details]
config.log from a VM running amd64 base/head r277322
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2015-01-18 21:04:34 UTC
Ok I found the same issue back in 2003 in base building libedit it was due to tr messing up with some locales.

Can you try adding to the port Makefile:
MAKE_ENV= LC_ALL=C ?
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-01-19 07:50:31 UTC
A commit references this bug:

Author: bapt
Date: Mon Jan 19 07:49:35 UTC 2015
New revision: 377385
URL: https://svnweb.freebsd.org/changeset/ports/377385

Log:
  Fix build with some locales

  tr(1) has different behaviour depending on the locales. resulting in makelist
  failing to properly generate some files. Encorfing LC_ALL=C during build fixes
  it.

  PR:		196848 [1]
  Reported by:	Trond.Endrestol@ximalas.info [1],
  		Christian Jachmann <Jachmann@unitix.org> (via private mail)
  Tested by:	Christian Jachmann <Jachmann@unitix.org> (via private mail)

Changes:
  head/devel/libedit/Makefile