Bug 253241

Summary: shells/v7sh: pet pkg-fallout
Product: Ports & Packages Reporter: Chris Hutchinson <portmaster>
Component: Individual Port(s)Assignee: Fernando Apesteguía <fernape>
Status: Closed FIXED    
Severity: Affects Many People CC: fernape, portmaster
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (portmaster)
fernape: merge-quarterly+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff for shells/v7sh pet pkg-fallout
portmaster: maintainer-approval+
svn diff for shells/v7sh (version 2)
portmaster: maintainer-approval+
svn diff for shells/v7sh (version 3)
portmaster: maintainer-approval+
svn diff version 4 portmaster: maintainer-approval+

Description Chris Hutchinson 2021-02-04 02:32:38 UTC
Created attachment 222155 [details]
svn diff for shells/v7sh pet pkg-fallout

The attached svn diff allows shells/v7sh to build again.

Changes
MK_WERROR=no vs NO_WERROR=1

That's it.

Thanks!

--Chris
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-10 06:57:35 UTC
This fails to build for me in {11.4,12.2}{amd64,i386}. It works in current amd64.

name.c:337:12: error: cast from 'STRING' (aka 'char *') to 'BLKPTR' (aka 'struct blk *') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
        THEN    free((BLKPTR) n->namenv);
                     ^~~~~~~~~~~~~~~~~~
name.c:339:12: error: cast from 'STRING' (aka 'char *') to 'BLKPTR' (aka 'struct blk *') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
        ELSE    free((BLKPTR) n->namval);
                     ^~~~~~~~~~~~~~~~~~
name.c:382:3: error: explicitly assigning value of variable of type 'NAMPTR' (aka 'struct namnod *') to itself [-Werror,-Wself-assign]
        n=n;                                    /* GCC */
        ~^~
name.c:402:16: error: cast from 'STKPTR' (aka 'char *') to 'STRING *' (aka 'char **') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
        argnam = er = (STRING *) getstak(namec*BYTESPERWORD+BYTESPERWORD);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
--- macro.o ---
*** [macro.o] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/shells/v7sh/work/v7sh-1.0_1
--- name.o ---
*** [name.o] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/shells/v7sh/work/v7sh-1.0_1
10 errors
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-02-10 10:05:25 UTC
@Fernando -Werror isn't being disabled (presumably what the patch intended to do. In the absence of a permanent upstream fix, CFLAGS+=-Wno-error may well work (overriding the default).
Comment 3 Chris Hutchinson 2021-02-11 01:31:19 UTC
Created attachment 222349 [details]
svn diff for shells/v7sh (version 2)

I may be over complicating this. But here's version 2
that includes a provision for FreeBSD 11 which I had
completely forgotten about.

Thanks!

--Chris
Comment 4 Chris Hutchinson 2021-02-11 03:14:00 UTC
Created attachment 222354 [details]
svn diff for shells/v7sh (version 3)

Oops. Wrong patch. THIS was the one I intended to attach.
Everything else I said before applies. :-)

--Chris
Comment 5 Chris Hutchinson 2021-02-11 03:43:17 UTC
Created attachment 222355 [details]
svn diff version 4

Sigh. Sorry. Looks like I'm trying to do too
many things at the same time. Version 4.
This one is it.

--Chris
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-02-11 14:19:40 UTC
A commit references this bug:

Author: fernape
Date: Thu Feb 11 14:18:44 UTC 2021
New revision: 564954
URL: https://svnweb.freebsd.org/changeset/ports/564954

Log:
  shells/v7sh: pet pkg-fallout

  Unbreak build in FreeBSD < 13

  PR:     253241
  Submitted by:   portmaster@bsdforge.com (maintainer)
  MFH:	2021Q1 (build fix)

Changes:
  head/shells/v7sh/files/Makefile
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-02-11 14:21:41 UTC
A commit references this bug:

Author: fernape
Date: Thu Feb 11 14:21:28 UTC 2021
New revision: 564955
URL: https://svnweb.freebsd.org/changeset/ports/564955

Log:
  MFH: r564954

  shells/v7sh: pet pkg-fallout

  Unbreak build in FreeBSD < 13

  PR:     253241
  Submitted by:   portmaster@bsdforge.com (maintainer)

Changes:
_U  branches/2021Q1/
  branches/2021Q1/shells/v7sh/files/Makefile
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-11 14:22:44 UTC
Committed and merged to 2021Q1.

Note the build was broken if FreeBSD < 13 instead of 12 ;)

Thanks a lot for the patches!