Bug 262641 - sysutils/screen: build error on stable/12 r371750 (1be600552e5f853c0585742d6b618e66541a81c7)
Summary: sysutils/screen: build error on stable/12 r371750 (1be600552e5f853c0585742d6b...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-18 08:12 UTC by Trond Endrestøl
Modified: 2022-03-18 13:53 UTC (History)
3 users (show)

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


Attachments
patch to fix screen 4.9.0 build with showenc enabled (1.14 KB, patch)
2022-03-18 11:59 UTC, Oleg Sidorkin
no flags Details | Diff
RM downstream patch since this patch was upstreamed (723 bytes, patch)
2022-03-18 12:10 UTC, Oleg Sidorkin
no flags Details | Diff
Fix screen build: remove upsetreamed patch and drop showenc option (1.90 KB, patch)
2022-03-18 12:26 UTC, Oleg Sidorkin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2022-03-18 08:12:46 UTC
I use Synth for building packages. In this instance, I'm running the latest stable/12 for amd64:

=> Building sysutils/screen
Started : Friday, 18 MAR 2022 at 06:39:52 UTC
Platform: 12.3-STABLE FreeBSD 12.3-STABLE #807 r371750: Thu Mar 17 01:48:00 CET 2022     root@[REDACTED]:/usr/obj/usr/src/amd64.amd64/sys/PE1950  amd64

This is how the port is configured:

# This file is auto-generated by 'make config'.
# Options for screen-4.6.2_3
_OPTIONS_READ=screen-4.6.2_3
_FILE_COMPLETE_OPTIONS_LIST=INFO NETHACK SHOWENC SYSTEM_SCREENRC XTERM_256 SOCKETS NAMED_PIPES NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT
OPTIONS_FILE_SET+=INFO
OPTIONS_FILE_SET+=NETHACK
OPTIONS_FILE_SET+=SHOWENC
OPTIONS_FILE_SET+=SYSTEM_SCREENRC
OPTIONS_FILE_SET+=XTERM_256
OPTIONS_FILE_SET+=SOCKETS
OPTIONS_FILE_UNSET+=NAMED_PIPES
OPTIONS_FILE_SET+=NCURSES_DEFAULT
OPTIONS_FILE_UNSET+=NCURSES_BASE
OPTIONS_FILE_UNSET+=NCURSES_PORT

The build didn't go very far before the system compiler had had enough:

--------------------------------------------------------------------------------
--  Phase: build
--------------------------------------------------------------------------------
===>  Building for screen-4.9.0
gmake[1]: Entering directory '/construction/xports/sysutils/screen/work/screen-4.9.0'
CPP="cpp -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"'" srcdir=. sh ./osdef.sh
AWK=/usr/bin/awk CC="cc -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing " srcdir=. sh ./comm.sh
AWK=/usr/bin/awk srcdir=. sh ./term.sh
sh ./tty.sh tty.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  putenv.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  term.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  kmapdef.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  screen.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  ansi.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  fileio.c
cc -c -I. -I.  -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\"\" \
     -O2 -pipe -fno-omit-frame-pointer  -I/usr/include -DCOLORS256 -fstack-protector-strong -fno-strict-aliasing  mark.c
screen.c:1215:5: warning: expression result unused [-Wunused-value]
    *--av;
    ^~~~~
screen.c:2789:10: error: duplicate case value '101'
    case 'e':
         ^
screen.c:2766:7: note: previous case defined here
        case 'e':
             ^
1 warning and 1 error generated.
gmake[1]: *** [Makefile:82: screen.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory '/construction/xports/sysutils/screen/work/screen-4.9.0'
===> 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 /xports/sysutils/screen

The same version of Screen built successfully on fairly recent main and stable/13, both amd64.
Comment 1 Trond Endrestøl 2022-03-18 08:46:35 UTC
The bug is only present when we select the SHOWENC option.
Comment 2 Dani I. 2022-03-18 10:42:31 UTC
Confirm, we got the same issue and also have SHOWENC enabled.

OS: 12.3-RELENG
Comment 3 Oleg Sidorkin 2022-03-18 11:59:07 UTC
Created attachment 232548 [details]
patch to fix screen 4.9.0 build with showenc enabled

Looks like some strange copy-paste bug: both cases are the same.

Attached patch removes one of them and then screen builds fine
Comment 4 Oleg Sidorkin 2022-03-18 12:10:09 UTC
Created attachment 232550 [details]
RM downstream patch since this patch was upstreamed

Better patch. Just remove downstream patch since the change was upstreamed:
https://git.savannah.gnu.org/cgit/screen.git/commit/src?h=v.4.9.0&id=491203b275682673784b867624351d73e16d11d0
Comment 5 Oleg Sidorkin 2022-03-18 12:26:26 UTC
Created attachment 232551 [details]
Fix screen build: remove upsetreamed patch and drop showenc option

showenc options does nothing with new screen so drop it
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-03-18 13:11:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f65342707d226f3685e96f5463ea14921dc27f71

commit f65342707d226f3685e96f5463ea14921dc27f71
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-03-18 13:05:49 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-03-18 13:05:49 +0000

    sysutils/screen: Fix SHOWENC build

    The SHOWENC optional patch is now included in screen 4.9.0. We simply
    enable the option now and build. The patch is redundant.

    PR:             262641
    Reported by:    Trond.Endrestol@ximalas.info, sunpoet, many others
    Fixes:          9bdc78861688

 sysutils/screen/Makefile                      |  2 +-
 sysutils/screen/files/opt-showencoding (gone) | 21 ---------------------
 2 files changed, 1 insertion(+), 22 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-03-18 13:17:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6764f541f9c64b4bfa9683cf039f21e673fbc8d

commit a6764f541f9c64b4bfa9683cf039f21e673fbc8d
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-03-18 13:15:08 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-03-18 13:17:21 +0000

    sysutils/screen: SHOWENC is default now

    screen 4.9.0 enables encodings by default in acconfig.h. Remove the option
    entirely.

    PR:             262641

 sysutils/screen/Makefile | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)