Bug 252996 - mail/dcc-dccd: sed(1) doesn't understand \s
Summary: mail/dcc-dccd: sed(1) doesn't understand \s
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: Piotr Kubaj
Depends on:
Reported: 2021-01-25 12:58 UTC by Trond.Endrestol
Modified: 2021-04-12 16:53 UTC (History)
1 user (show)

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

Patch for mail/dcc-dccd/Makefile (676 bytes, patch)
2021-01-25 12:58 UTC, Trond.Endrestol
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond.Endrestol 2021-01-25 12:58:30 UTC
Created attachment 221901 [details]
Patch for mail/dcc-dccd/Makefile

On 13.0-ALPHA2, sed(1) complains:

--  Phase: patch
===>  Patching for dcc-dccd-2.3.167_1
/usr/bin/sed -i.bak -e 's,md5.c ,,' /construction/xports/mail/dcc-dccd/work/dcc-2.3.167/clntlib/Makefile.in
/usr/bin/sed -i.bak -e 's,^\(BININSTALL.*\),\1 -s,p'     -e 's,^BIN\(INSTALL\s*=\s*.*\) -s$,SCRIPT\1,' /construction/xports/mail/dcc-dccd/work/dcc-2.3.167/Makefile.inc.in
sed: 1: "s,^BIN\(INSTALL\s*=\s*. ...": RE error: trailing backslash (\)
*** Error code 1

make[1]: stopped in /xports/mail/dcc-dccd
*** Error code 1

The attached patch attempts to correct this problem, only to reveal a new problem:

--- dbclean ---
cc  -fstack-protector-strong    dbclean.o ../srvrlib/libsrvr.a ../clntlib/libclnt.a ../dcclib/libdcc.a -lmd -lm -o dbclean
ld: error: duplicate symbol: grey_on
>>> defined at db.c
>>>            db.o:(grey_on) in archive ../srvrlib/libsrvr.a
>>> defined at clnt_send.c
>>>            clnt_send.o:(.bss+0x400) in archive ../clntlib/libclnt.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [dbclean] Error code 1

make[3]: stopped in /construction/xports/mail/dcc-dccd/work/dcc-2.3.167/dbclean
1 error

make[3]: stopped in /construction/xports/mail/dcc-dccd/work/dcc-2.3.167/dbclean
*** [all] Error code 2

make[2]: stopped in /construction/xports/mail/dcc-dccd/work/dcc-2.3.167
1 error

At this point I'm lost.
Comment 1 Piotr Kubaj freebsd_committer 2021-01-26 02:19:14 UTC
Thanks, I will look at it. Currently I use dcc-dccd on FreeBSD 12, which is why I didn't notice this issue.

Your linking issue can probably be fixed by adding -fcommon to CFLAGS, but I have not yet confirmed it.
Comment 2 Trond.Endrestol 2021-01-27 10:43:51 UTC
(In reply to Piotr Kubaj from comment #1)
It sure did. Thank you.
Comment 3 Gary J. Hayers 2021-04-12 15:29:48 UTC
I am also on 13.0, where does -fcommon go? Is there a patch for it?


Comment 4 commit-hook freebsd_committer 2021-04-12 16:53:24 UTC
A commit in branch main references this bug:

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

commit 57de0ecc339a32d4ca601e67a8cf7f342e9528b3
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-04-12 16:52:07 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-04-12 16:52:07 +0000

    mail/dcc-dccd: fix build on 13.0

    PR:     252996

 mail/dcc-dccd/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)